Mike Fluff Press
JavaScript: From Closures to Autonomous Systems
How the runtime took over the programmer’s work
For thirty years the JavaScript runtime kept taking work off the programmer. The next thing it is asked to check is an AI agent.
Full draft · 20 chapters, 4 interludes · free · ≈ 3 h of reading
Chapter one opens straight away; the rest needs only a confirmed email. I do not charge for the book, and you can donate from any chapter.

About the book
I learned to program on Meteor, back when JavaScript had no promises yet. The code looked synchronous, data arrived in the browser by itself, the screen redrew itself, and for a long time I did not ask who was doing all that, or what would happen when it stopped.
In May 1995 Brendan Eich wrote the prototype of JavaScript in ten days. Thirteen years later Google, Mozilla and Apple were competing over whose engine could run it fastest, and V8 did it with a technique invented in the early nineties for the Self language. Since then the runtime has decided by itself how to lay an object out in memory and what machine code to turn a function into. The event loop, promises and Meteor’s fibers took over the waiting, and Meteor, reactive graphs and CRDTs took over keeping shared state in sync. Each handover left the programmer a share of the work, and the book goes into that share in detail, with eighteen reproducible experiments wherever, without a measurement, you would have to take it on trust.
The last chapters are about a new executor, a language model that makes mistakes no ordinary program can make, and the harness written around it in JavaScript. Responsibility, as I try to show with examples throughout the book, moves to whoever can check it more cheaply, and comes back to the programmer when there is no one left to check it.
Contents · 25 chapters
- Part I. Language as a Computational Model01An Accidental RevolutionFree
- 02Objects Without ClassesFree with email
- 03Functions as DataFree with email
- 04Types Checked LaterFree with email
- Part II. A Machine That Learns to Run Code05From Interpreter to JITFree with email
- 06The Engine WarsFree with email
- 07Speculative ExecutionFree with email
- 08Garbage, Profiles, and the Limits of JITFree with email
- Part III. Time09The Event LoopFree with email
- 10ContinuationsFree with email
- 11Meteor's FibersFree with email
- 12Time as Part of the ProgramFree with email
- ·Interlude. Before the Abstraction ExistedFree with email
- Part IV. Distributed Reactivity13From MVC to the Reactive GraphFree with email
- ·Interlude. After MeteorFree with email
- 14Meteor: The Application as One SystemFree with email
- ·Interlude. Meteor Under LoadFree with email
- 15Distributed StateFree with email
- 16Reactivity Under Access ControlFree with email
- 17The Limits of ConsistencyFree with email
- ·Interlude. Revoking What Has Already Been DeliveredFree with email
- Part V. An Executor That Can Be Wrong18A Runtime for a Nondeterministic ExecutorFree with email
- 19The Durable AgentFree with email
- 20The Responsibility BoundaryFree with email
- 21ExperimentsFree with email