Bootstrapping a Forth in 40 lines of Lua code

The article discusses bootstrapping a Forth system in Lua in just 40 lines of code, taking a unique approach starting from the outer interpreter instead of the inner one. The author highlights the extensibility of Forth and compares it to Lisp, proposing Lua as a base language for building extensible languages. The concept of “modes” in Forth is introduced, allowing for dynamic addition of new modes in the system. The article provides example programs in miniforth and traces of their execution, showcasing the power and flexibility of the implemented system. A detailed breakdown of the inner workings of the system is also provided.

http://angg.twu.net/miniforth-article.html

To top