A compile has a shape. Your code climbs from flat text up into meaning, squeezes through one narrow universal neck, then descends into a specific machine. Many languages pour in the top; many machines catch at the bottom; everything passes through the same load-bearing 0 in the middle.
Two slopes meet at the neck. Up the front you climb into meaning; down the back you fall into machine. They mirror each other in shape but not in nature — and the tree you climbed turns into a graph on the way down.
Start at the bottom: flat characters, print("hi"). Group them into words, build them into a tree, ascend toward the most abstract, best-understood form — the point where the compiler finally knows what you meant. Lossless, deterministic, a clean funnel.
From the neck, descend toward one specific chip: IR → optimized IR → assembly → machine code → micro-ops. But here the optimizer rolls downhill on a cost surface, choosing the cheapest path — a gradient-style search. So the descent is lumpy where the climb was smooth.
You climb a tree and descend a graph — and the shape changes exactly at the neck, because going up is decomposition (always a tree) and coming down requires dependency (always a graph). List → tree → graph, all in one compile.
The thinness is the whole point. One universal middle is what lets both ends be wide and various — and it's what kills the combinatorial explosion.
thousands of apps above, thousands of networks below — one skinny waist, IP, that everything crosses.
thousands of genes up top, thousands of functions below — one waist, the genetic code the ribosome reads.
many languages, many chips — one waist, the IR. it's why LLVM exists, and why it won.
Every floor of this hourglass — the whole idea of a machine that runs programs — traces back to one engine and the first person to write code for it.
In 1823 the British government funded his Difference Engine — arguably the first public money ever spent on a computer. He went on to design the Analytical Engine: a general machine that could be programmed, borrowing punched cards from the Jacquard loom. The hardware the whole tower stands on.
His collaborator — not his wife. In 1843, translating an account of the Analytical Engine, she added notes containing the first published algorithm and the leap no one else made: that the machine could manipulate any symbols, not just numbers — music, logic, anything. That's the seed of the programs a compiler feeds.