Tiny VM
PUSH, ADD, MUL, DUP, PRINT, SWAP — enough ops to teach stack thinking without a textbook.
// coding puzzle aesthetic · compile locally
World of Code is a browser puzzle dressed like a midnight IDE: drag instruction tiles, watch the virtual machine glow, and chase a clean compile streak.
PUSH, ADD, MUL, DUP, PRINT, SWAP — enough ops to teach stack thinking without a textbook.
Each level states a glowing condition. Run to see pass/fail with a readable trace.
Successful compiles increment a local streak. Break the assert? Streak resets, ego survives.
Drag opcodes into the program strip (or click to append). Hit Run. Satisfy the assert to level up.
In the year the satellites forgot their names, a caretaker process kept a rooftop garden of glowing stacks. Visitors were not asked for résumés—only whether they could make out == "OK" without overflowing the soil (the stack).
World of Code is that garden, shrunk into a tab. You are not applying for a job. You are learning the poetry of order: what must be pushed before it can be added, what must be duplicated before it can be printed twice.
Every green assert is a small harvest. Failures are compost.
It tells you the required output string and sometimes a peak stack size.
Click opcodes from the palette. Click chips in the program strip to remove them.
Trace lines show stack state after each op. Fix, re-run, advance.
PUSH n — push literal. ADD/MUL — pop two, push result. DUP — duplicate top. SWAP — swap top two. PRINT — pop and append to output.
No. The VM is fictional and tiny. Stack intuition helps in real languages later, but the demo stands alone.
Absolutely not. It is an aesthetic puzzle with educational side effects.
Streak and level index store locally. Programs are ephemeral—screenshot if you love a solution.
www.mainbrain.fun funds curious browser experiments like this.