Tombstone
eduLang
Aug 2005 · age 23
What it was
An interpreter for a small C-like teaching language, written in C# over an ANTLR grammar, whose real product was not the answer but the trace. Run a program and it wrote out a JavaScript listing of every step: the source pretty-printed with the line about to run in red, the call stack with argument values in each frame's name, the local variables, the heap drawn as tables whose cells glowed for last read and last write, and the console so far. The program itself could switch tracing on and off, so a selection sort traced only its inner comparison and still produced nearly two thousand frames. Frames were compressed as substring copies of the one before, and every operation was tallied into a cost profile. The tracer worked; the web page meant to replay the traces was never built.
Wins, for the age
- At twenty-three, on the eve of a semester of graduate mathematics and teaching, Jeff built a complete interpreter and tracer in three August days.
- Heap cells that remember their last read and write, five years before Python Tutor (2010) made heap visualization for learners popular. Python Tutor still lacks the read and write marks.
- Delta-compressed trace frames, also five years ahead of Python Tutor (2010), because the hard part of a trace is its size.
- Found on their own what
set -xand gdb backtraces had long known: trace only what matters, and let the stack double as a call log.
What it taught
- A tree-walking interpreter over a generic node type is easier to change than one over generated classes; printing the AST as an s-expression and reading it back was a hack that became an architecture.
- Treat the execution trace as the product and the interpreter as the means. That habit outlasted the project.
- Reference counting with shared references goes wrong subtly, and this primate learned it by getting it wrong.
- Teaching materials are software too, and deserve a compiler.
Genealogy
Ancestors: BNJv3: pseudocode that steps in lockstep with a live algorithm. Mathml: an early expression evaluator. Memorando: software built to teach. Vec4U: a typed little language, compiled one expression at a time. Descendants: Adama Tooling: time travel through a program's history. Tutor: teaching software that shows its work.
Epitaph
Here lies eduLang, which sorted a handful of numbers and wrote two thousand frames explaining how. The page to watch them never came, but the idea that a program should narrate itself did.