Sprak is an implementation of Thornston Ball Monkey Programming Language in Odin. It closely follows Thornston Ball's books.
Why Sprak? Since Odin is a Norse god, I was looking for a Norse name for Monkey. Unfortunately, the Old Norse hadn't travel as far as Africa yet and didn't had a word for Monkey. Instead, I decided to just use the Norse word for language: språk. For convenience, I am dropping the overring accent over the a.
If you want to follow along, you need a copy of Thornston Ball's Writing an Interpreter in Go.
You also need to install the Odin compiler.
The code follows pretty much the book organization. The functionality is organized along the following files:
lexer.odincontains the types and procedures required for the lexer phase, this include the token and token type definitions.repl.odincontains the code for the Read Eval Print Loop running the Monkey interpreter from the command line.main.odinis the stub for the interpreter. During development, it is also used to host whatever fragment of code we need to debug.
- Beef up the README
The Odin code is copyrighted Robert Monnet 2026 and is provided under the MIT License.
The book and its original code are obviously copyrighted Thornston Ball 2016-2018.