Tombstone
kitchen · Grill
Oct 2007 – Jan 2008 · age 25–26
What it was
The scripting language of the kitchen engine, with its own compiler and virtual machine. Grill read like C, with static types, closures, counted loops, a once() expression that evaluated something exactly once and cached the result in place, and request() for persistent named state. A C# compiler built on an ANTLR grammar type-checked each program against the engine's generated field maps and the native service signatures, lifted inline lambdas, and emitted Lisp. A C++ machine lowered that Lisp into register form, then walked the tree, replacing each node's name with an opcode on first visit so every later visit was a switch. All script memory lived in a bump allocator that was reset every frame. Native calls went through stubs generated from a 55-function service description. It ran the tower defense's 450-line script to the very end.
Wins, for the age
- At twenty-five, Jeff built a complete compiler pipeline single-handed: grammar, type checker, free-variable analysis, lambda lifting, an IR, a lowering pass and an interpreter.
- Made the interpreter compile itself as it ran, arriving alongside TraceMonkey (2008) rather than after it. A tree walker, fast enough for a 60 Hz loop.
- Put memoization into the language with
once(), and escaped garbage collection by making sure there was no garbage. - Generated the foreign-function layer from an interface description, finding on their own what SWIG had found in 1996.
What it taught
WellTypingwas the first type checker Jeff wrote that actually rejected programs. The next lesson was to finish it before the language grows: three kinds of type still passed unchecked.- Design a runtime around its constraints. Arenas, in-place promotion and memoization were all answers to "how do I make a script cheap in a frame loop."
- An IDL as the contract between languages removes a whole class of marshalling bugs by construction.
- Knowing a design is wasteful and shipping anyway can be right: three parses through a temp file were fine for a game that needed a script. Bound every buffer, though.
Genealogy
Ancestors: Combo Lang: a tiny compiler that writes the tedious code for you. The Before Times in QBasic: the teenage first attempt at reading a language and emitting a program. Tutor: parsing and walking expression trees, from a computer algebra system. Zen Game System: the conviction that a game engine wants a script layer. Descendants: none on record. Lua kept the niche, and the typed IDL was the part worth keeping. Part of: Kitchen.
Epitaph
Here lies Grill. C syntax in, Lisp out, registers after that, then a tree that learned its own opcodes and forgot everything sixty times a second.