Most software is built like a pyramid. Each layer is piled on the one below, by brute force, until the whole thing is enormous and there’s no room inside. It stands up because it’s heavy, not because it’s designed.
Alan Kay has used this comparison for decades. You can build a doghouse out of anything: nail some boards together and it stands. Scale the same approach up a hundred times and it collapses, so people pile on more material and plaster over it. An arch does the same job with a tiny fraction of the stone, because the arrangement does the work.
And then there’s biology. Gears jam somewhere around a thousand parts. A body runs on a hundred trillion cells. Each cell is sealed, does its own job, and talks to the others by sending messages, and the whole thing keeps working while every part of it is replaced.
The principle. Build the computer the way biology builds things: one small kind of part, sealed, talking by messages, and able to change while it’s alive.
The rest of this essay is what that looks like when you actually do it.
One kind of thing
Everything you see in Amaze is the same kind of thing: a box. A ball is a box, a button is a box, the menu bar is a box, and so is the world they sit in. A box has a handful of values, and each value is a formula over other values, like a cell in a spreadsheet.
That’s the whole programming model. There are no event handlers to write and nothing to keep in sync by hand: when one value changes, everything that depends on it follows. Here is the basketball as that graph, with values read from the running world.
Because every box is built the same way, anything you learn about one applies to all of them, including the parts of Amaze itself.
One engine reads everything
Cells all read the same genetic code. Amaze has something like it: every language, file format and network protocol it understands is described the same way, as a short grammar, and one small engine reads them all.
The program you write, the drawing on a ball, the rules of physics and a TCP packet all go through it. Learn to read one grammar and you can read every one, because there’s nothing else.
So a new language is cheap
Once a grammar is a few lines, making a new language stops being a project. Most computers make you learn their languages. Amaze lets you make your own: write a few rules for what a sentence looks like, give a box the grammar, and talk to it in words that fit the job.
The rail yard here speaks one made up this way, with tracks, signals, stations and timetables, in five rules.
word = ws alpha (alpha | digit)*, num = ws '-'? digit+, item = num | word, stmt = ws word item*, program = line* ws
track west M -100 130 L -100 -130 station mine west 130 load station mill east 130 unload train express west at 100 speed 100 cars 3 stops mine mill
A language can be a whole tool
A language can carry a lot. Say what a structure is, where the joints sit, which are pinned, which rods join them, what weight it carries, and the truss language turns those sentences into constraints and solves them every frame.
Rods turn red when they’re stretched and blue when they’re squeezed, and snap past their limit. The screenshot is Amaze running this exact program, and the language itself is under 200 lines, loaded into a running world rather than built in.
joint a -160 40 joint b -80 40 joint c 0 40 joint d 80 40 joint e 160 40 joint f -120 -40 joint g -40 -40 joint h 40 -40 joint i 120 -40 pin a pin e rod a b rod b c rod c d rod d e rod f g rod g h rod h i rod a f rod f b rod b g rod g c rod c h rod h d rod d i rod i e load c 120 gravity 2 stiffness 60 passes 6 break 112

joint a -150 40a point, in pixelspin aa joint that doesn’t moverod a bits length is a constraintload c 120a weight pulling a joint downgravity 2on every free jointdamping 98how much speed a joint keeps each framestiffness 60how much of each rod’s error is fixed per passpasses 6solver passes per framebreak 112a rod stretched past 112% snapsEach frame, every free joint keeps its momentum and feels gravity and its load. Then each rod pulls its two ends back toward its rest length, six times over, and the pins hold still. What’s left over is the strain each rod shows.
; each unbroken rod pulls its ends toward its rest length; pins stay
(define (truss-relax! rods stiffness passes)
(if (<= passes 0) nil
(begin (truss-relax-pass! rods stiffness)
(truss-relax! rods stiffness (- passes 1)))))
The picture can be the program
The internet’s own specifications describe every packet with a little box diagram. Amaze already reads every packet with a grammar. Next, the diagram itself becomes that grammar, so the documentation and the code are the same picture.
Click any field in the diagram to see it picked out of a real packet.
Nothing is fixed
A cell doesn’t stop to be upgraded. Neither does Amaze. Very little is decided when it’s built: fonts, network security, file formats and new languages all arrive as ordinary definitions, loaded into the running world.
So none of it is baked in, and any of it can be replaced without a restart. Bind late, and you can still change your mind once you understand what you actually needed.
Try anything
A world that can change while it runs needs a safe way to try things. The plan is to let you sprout a copy of your world, change whatever you like inside it, then keep the result or throw it away. Undo comes free, and so does “what if”: run three versions side by side and pick one.
This one isn’t built yet. It’s small, a few dozen lines over the way boxes read and write values, and it’s what makes everything above safe to play with, so it’s high on the list.
It can rewrite itself
The last thing small buys you is the strangest. The whole of Amaze, every line, fits in front of a language model at once, about 170,000 tokens. So the model doesn’t guess how your computer works. It reads all of it, and can change any part of it in a single request.
You talk to it in the Studio, a chat that sits in your world next to whatever it’s building. Here it’s asked for a cipher. Taken further, this is how a room can write its own program while you cook: see Grown in Place.
One book
Put together, these choices keep the whole computer small: under 20,000 lines from the screen to the metal, about the length of one book. Not because small is a goal in itself, but because it’s what lets a person read it, change it, and hand it to a model whole.
Read every line of it, or follow one basketball all the way down.