v2.29.4 · 819 tests passing

Watch a programming language work.

A small, hand-rolled language — tokenize, parse, execute, compile to bytecode — with every step animated in front of you. ~25,000 lines, no exec(), no compile-to-Python.

Live demostep 1/14
Source
1i = 1
2while (i <= 3) {
3 if (i == 3) {
4 coutln("Fizz")
5 } else {
6 coutln(i)
7 }
8 i = i + 1
9}
Output
(waiting…)
Readtokens
i=1
Parseast node
Assign(i, 1)
Runeffect
i←1
Version
v2.29.4
Lines of code
~25,000
Tests passing
819
Opcodes (M2 VM)
38

The pipeline

Six stages, from raw characters to printed output. The playground animates every one of them.

Open the playground →

Watch each stage

Self-contained loops, one per major pipeline stage. The full playground threads them together.

Read the internals docs →
Lexerlive
characters
coutln("hi")
tokens
A char-by-char tokenizer. Groups characters into typed tokens that carry line + column.
Parserlive
tokens
1+2*3
ast
(waiting…)
Recursive descent for statements, Pratt for expressions. Operator precedence falls out naturally.
VMlive
bytecode
  1. 0 LOAD_CONST 42
  2. 1 STORE_NAME i
  3. 2 LOAD_NAME i
  4. 3 RETURN
stack
empty
env
(empty)
Bytecode runs on a stack machine — same shape as CPython, Lua, or the JVM, just smaller.

What's inside

The whole language lives in six files. Each one is small enough to read in a sitting.

Read the design retrospective (PDF)

Demos

Open a sample in the playground and step through it statement by statement.