3 ms·
If you want to build a Forth check out R. G. Loeliger's "Threaded Interpretive Languages Their Design And Implementation" https://archive.org/details/R.G.Loelig
by carapace 4y ago
If you want to build a Forth check out R. G. Loeliger's "Threaded Interpretive Languages Their Design And Implementation" https://archive.org/details/R.G.LoeligerThreadedInterpretiveLanguagesTheirDesignAndImplementationByteBooks1981 https://archive.org/details/R.G.LoeligerThreadedInterpretive...
(Jonesforth has already been mentioned.)
Read "Starting Forth" and "Thinking Forth" too, even if you don't want to write a Forth or program in Forth. It'll still expand your mind in useful and fun ways.
- zabzonk 4y agothese are all great recommendations, particularly the TIL book, which taught me so much about Z80 assembly language, though you really only needed a little bit to implement a forth back then - i went a bit bonkers in my implementation. i also used a a forth-like language implemented in C++ for an "adventure" writing system that taught me a lot about C++. you can't go wrong with implementing a forth if you want to learn.
- marttt 4y agoBYTE magazine dedicated an entire issue to Forth in 1980 (vol 5, no 8). Interestingly, they used the exact same cover image as the Loeliger book, lol: https://archive.org/details/byte-magazine-1980-08 https://archive.org/details/byte-magazine-1980-08
- stevekemp 4y agoYou can also read the following "tutorial" on implementing the basic facilities of a forth right here: https://news.ycombinator.com/item?id=13082825 https://news.ycombinator.com/item?id=13082825 I used that as a starting point to implement a trivial forth in golang.