Table of Contents

LongForth - A Persistent Version of Forth

For me, personally, the best way to start learning about the design of persistent virtual machines is to create a working persistent implementation of the Forth Programming Language.

Forth is a wonderfully minimal programming language that hosts it's own interactive development environment.

Within a simple Forth implementation essential topics are explored, including:

NibbleForth

Rather than working from a specification, I will be using NibbleForth as my model of Forth. I've chosen NibbleForth because it implements a fully functioning, minimalistic, version of Forth using Python code that is easy to read and understand.

I have chosen NibbleForth over more compact implementations such as Tiny Forth because of this simplicity and clarity of implementation.

NibbleForth was written by Ben Hoyt as an experiment on compact code. The source can be found in his GitHub account: https://github.com/benhoyt/nibbleforth.

One limitation to NibbleForth is that it does not support Progressive Word Definitions. It just maintains a dictionary of word definitions as text rather than compiling to execution tokens. I will need to fix this.

My Approach

I don'st have much spare time to spend on this project, so I need to break the whole think up into neat little chunks. I expect this to keep my busy until at least the end of 2025.

The goal is to move as quickly as possible to a SQL driven VM with an debugger API that can be accessed through a web application.

  1. Simple Execution
  2. Compilation