Re:Bootstrapping a Forth in 40 lines of Lua code (2008)
by stevekemp on Monday September 14, 2020 @01:32PM
(#24472764)
I hacked up a quick implementation of your writeup in go just now, as I said at the time your summary was wonderfully direct and "obvious".
Thanks again, four years later!
I'll get the compilation phase done tomorrow, barring surprises.
This would be reasonable afternoon project (except for the optimization stuff).
None of the C code is complex or tricky or big. You could easily do it in assembly instead. That's why these kind of languages are great for a lot of embedded applications. You only need to write a small assembly core to support your language, plus assembly function to support your hardware, and then you can do everything else in your higher level FORTH-like language.
[1] https://news.ycombinator.com/item?id=13082825