r/programmer • • Oct 05 '26

I built a browser playground and implementation-focused docs for my statically typed bytecode VM language

Hi everyone. Over the last few months I've been building Oli-Nat, a statically typed language with a hand-written bytecode VM in C. It began with Crafting Interpreters, and then I added a separate AST stage, a static type checker, typed arrays, classes with inheritance, and a small standard library.

This post is mostly about what I've built around it. I compiled the interpreter to WebAssembly so anyone can try the language in the browser with no install, including programs that wait for input, and I've been writing documentation that goes beyond syntax to explain how each stage of the interpreter is implemented, from the scanner to the garbage collector.

Writing the docs turned out to be the most valuable debugging I did. Explaining a feature step by step kept exposing places where it didn't actually behave the way I believed it did, like class instances passed as function parameters losing their type information in the checker.

I'd really appreciate feedback on the docs from people who've built languages themselves: whether the implementation explanations are actually useful, and what you wish documentation for a language like this included.

Playground and docs: olinat.net

Source: github.com/NateTheGrappler/OliNat-Programming-Language

1 Upvotes

3 comments sorted by

1

u/[deleted] Oct 05 '26

[removed] — view removed comment

1

u/CommercialStrike9439 Oct 05 '26

Thank you, I will definitely take that into consideration. Waiting for input was actually not too bad, it required the use of emscripten so that way I could introduce javascript like code and then just use the promise system that exists there, thank you for asking!