Random writing on computing, baking, life. Find me on Mastodon too.

Let's write a Smalltalk interpreter

Over the Christmas break of 2022, I started reading the excellent book “Crafting Interpreters” by Robert Nystrom. In this book you write a parser and interpreter, and later bytecode interpreter, for a object oriented scripting language named Lox.

I’m going through this book, implementing the language per the exercises in Java (a tree-walk interpreter) and then the bytecode interpreter in C.

For approximately 12 years, I’ve wanted to write my own Smalltalk implementation. Squeak, and the Cog VM, are excellent, but I want to write my own. I’ve read the “Blue Book” and it tells you exactly how the Smalltalk-80 VM was built.

For my own implementation, I’ve chosen to write the VM and compiler in Ada, as I don’t like writing C code.

My vision is for a NeXTSTEP like system, because I adore the GUI, with Smalltalk as the basis for the whole system.

This project is going to take a long time, but I’ll post as I write it.