The Big web/ Move and Parser Migrations
Moving the web app under web/, migrating three parsers to Pest and Pratt, and getting the Z-Machine opcode engine executing.
On this page
The web app has lived at the repo root since the project started, and today I moved it. One git mv, then two hours chasing Vite alias formats and broken build scripts. Moving the files took seconds; making every assumption about paths explicit took the rest of the morning.
The Web Move
The frontend now lives under web/src, with Vite’s root set to web/ and path aliases pointing into the right places. Rollup’s alias option needs the array form rather than the object form: the dev server accepts either, but the production build fails silently with the object form. Reshaping that one config entry cost me two hours of debugging.
By the end of the day I could draw the project layout without guessing: CPU cores, languages, and assemblers at the repo root, the web UI in web/.
Parser Migrations
I migrated three language parsers to Pest today: BASIC, Prolog, and VisiCalc. The hand-rolled tokenizers worked, but extending any of them meant reopening code I did not enjoy reading. A grammar file is at least explicit about what it accepts.
The BASIC grammar now covers the full C64/VIC-20 keyword set. The Prolog lexer collapses a pile of edge-case branches into readable rules while producing the same token stream. VisiCalc’s formula parser moved to a Pratt parser, which handles the operator precedence that the old code special-cased in five different places.
Z-Machine, Now Executable
The Z-Machine decoder handles 2OP, 1OP, 0OP, and VAR forms, and I wrote the tests alongside it so encoding mistakes surfaced immediately instead of three weeks later when a game crashes on turn 47. The opcode execution engine can now step through real story files. Operand decoding was the part worth getting right first; with that fixed, adding instructions is mechanical.
Signal Cleanup
One bug cut across several backends: on disconnect, some CPU backends left DTR/RTS asserted, so the next session began with stale control signals. The fix was small. The effect was that reconnect behaviour stopped looking random, which had been costing me time on unrelated bugs.
What’s Next
The layout is settled. Tomorrow I’ll look at making it deployable; the web/ move should make containerization cleaner. After that, more CPU cores and more peripherals.
Previous: 2026-01-26