Skip to content
TNPL

Free sample

The Preface and Chapter 1, free

Thirteen pages. No email, no form, no list. Chapter 1 is the whole argument in miniature — three eras, two transitions, and the objection that keeps returning.
Download the sample (PDF)

13 pages · ~85 KB

From the Preface

This book is about a programming language that does not exist yet, and about why it has to.

When a model writes a program for you, it writes it in Python. Or TypeScript, or Java, or Go. There was never a clean-sheet decision that these were the right targets for a machine author. They are heavily represented in the training distribution, and unsurprisingly they are what tends to come out.

This book is about what should come out instead.

The answer turns on one property, and it is not the one most people expect. The usual assumption is that a language for machine authors should be easier to generate — terser, more regular, closer to what a model already produces. That is the wrong half of the problem. Generation is the part that already works. What does not work is what happens after the code exists and turns out to be wrong: the faulty assumption was never written down anywhere, the representation gives you nothing to point at, and so the cheapest available fix is to generate the whole thing again and hope.

The property that matters is the ability to correct a program deterministically after it has been produced — to name the thing that is wrong, bound how much of the program may change in response, and confirm that the change was enough.

The first half of this book is the argument. The second half is the language.

From Chapter 1

The same function, four times

Here is a function that returns the number 42, written four ways.

x86-64machine code
b8 2a 00 00 00 c3
x86-64assembly
mov eax, 42
ret
high-level sourcec
int answer(void) { return 42; }
englishprose
Write a function that returns 42.

Only the first one is bytes. The rest are descriptions of bytes, and they get less specific as you go down.

Compile that C for x86-64 with optimisation on and the frame pointer omitted and you get exactly b8 2a 00 00 00 c3 back. Leave the frame pointer in — the default on macOS — and you get five more bytes of prologue and epilogue around it. Compile it on the Apple Silicon laptop this was written on and you get eight entirely different bytes:

arm64machine code
40 05 80 52 c0 03 5f d6

Same C. Same meaning. Different machine, different bytes, and nothing in the source said which.

That is the whole progression in one example. As you move down the list you stop writing the bytes and start describing them — and you hand somebody else the decision about what they actually turn out to be. The English at the bottom hands over the most of all.

The sample continues for another eleven pages

Including “So isn’t English the fourth language?”, the objection that keeps returning, and why a model writes Python.

Then there are twenty-six more chapters

And a language that parses, verifies, compiles and runs.