Crafting Interpreters https://craftinginterpreters.com is a super friendly, step-by-step guide to building your own language and VM, looking forward to seeing what kind of language you come up with too!
We’ve been building Mochi, a small statically typed language for querying structured data like JSON, CSV, and in-memory lists. In the latest release (v0.10.5), you can write SQL/LINQ-style queries with from, where, join, and group by, all fully type-checked and testable inline.
What makes it different: queries compile to a register-based bytecode VM (written in Go) with compiler passes like constant folding, liveness analysis, and dead code elimination. It’s meant to feel like writing SQL inside a real language, backed by actual compiler infrastructure.
If you’re interested in how query engines, DSLs, or virtual machines work, this might be worth exploring.
This thread was the final push I needed to add logic programming to Mochi https://github.com/mochilang/mochi — a small statically typed scripting language I’m building for agents and real-time data.
I gave OpenAI Codex a single prompt with a sample like:
reply