Not sure if this counts as an implementation, but this is my Forth compiler, written in the high-level language Go [0]. This is also a challenge, as Forth usually requires machine language, call stack access, and is naturally written in assembler. Took several tries until I found working data structures.
The funniest thing is, you can easily write and invent your own control structures in Forth, as well as change the behavior existing ones such as the do/while loop.
\ alter the behavior of do by printing the current index in each loop.
: do immediate
[COMPILE] do \ first compile previous do impl.
' i , \ then print current index
' . ,
;
> This is also a challenge, as Forth usually requires machine language, call stack access, and is naturally written in assembler.
Not really. Many implementations indeed do that, but only in pursuit of performance - the weakness of interpreted languages is speed. Otherwise one can just implement it as a bytecode interpreter, like e.g. Lua.
I think for most people they would be better off developing their Forth in a high level language and writing their own software stacks and the core words. Once you have that start implementing other features in that high level language instead of in yourth Forth, add functions and scope, OOP, data structures, anything you can think of, you will learn a great deal about programming languages, their design and how they work. Doing things the Forth way of a minimal Forth and building everything out in Forth is useful for those who want to learn the low level stuff but once you have implemented that minimal Forth, most of what you learn is Forth.
The funniest thing is, you can easily write and invent your own control structures in Forth, as well as change the behavior existing ones such as the do/while loop.
[0] https://github.com/s-macke/Forthly