CuiForth is a Forth language interpreter built on Smalltalk, featuring an interactive REPL. It adheres to the Forth Standard while allowing space for creative and implementation-specific words, blending the flexibility of Forth with Smalltalk's powerful object-oriented environment.
This repository is paired with a series of articles explaining the implementation of this Forth interpreter. The full series list (link).
Smalltalk meets Forth: Episode I: For this first session we would like to end with a fully working Forth REPL with at least some of the basic math words implemented. Also, a pretty basic error handling would be good to have from the beginning. (v0.0.1)
CuiForth is a package for Cuis-Smalltalk. So, clone this repository or copy the CuiForth.pck.st
file into the directory of your choice.
To install packages (.pck.st files) in Cuis, use the FileList, accessible from the World Menu [Open] > [FileList]. Navigate to the appropriate directory, select the package file and click on [Install Package].
After intallation of CuiForth, you can start a CuiForth REPL by executing ForthREPL new open.
in a Workspace.
CuiForth is built on top of Cuis-Smalltalk, a modern, lightweight and free Smalltalk environment. Cuis-Smalltalk is a fork of Squeak, and it keeps the spirit of a Smalltalk-80 system, simplicity and power. Cuis-Smalltalk is a great choice for programming language implementation, especially for learning and experimentation, and it's also a great tool for learning Smalltalk.
CuiForth is released under the MIT License. LICENSE