News for hackers. Stuff that matters.
Re:Bootstrapping a Forth in 40 lines of Lua code (2008) by AQXt on Monday September 14, 2020 @03:45AM (#24467799)
If you want to understand Forth, I recommend this article:

A sometimes minimal FORTH compiler and tutorial for Linux / i386 systems by Richard W.M. Jones

"LISP is the ultimate high-level language, and features from LISP are being added every decade to the more common languages. But FORTH is in some ways the ultimate in low level programming. Out of the box it lacks features like dynamic memory management and even strings. In fact, at its primitive level it lacks even basic concepts like IF-statements and loops.

Why then would you want to learn FORTH? There are several very good reasons. First and foremost, FORTH is minimal. You really can write a complete FORTH in, say, 2000 lines of code. I don't just mean a FORTH program, I mean a complete FORTH operating system, environment and language. You could boot such a FORTH on a bare PC and it would come up with a prompt where you could start doing useful work. (...)

Secondly FORTH has a peculiar bootstrapping property. By that I mean that after writing a little bit of assembly to talk to the hardware and implement a few primitives, all the rest of the language and compiler is written in FORTH itself. Remember I said before that FORTH lacked IF-statements and loops? Well of course it doesn't really because such a lanuage would be useless, but my point was rather that IF-statements and loops are written in FORTH itself."

https://github.com/nornagon/jonesforth/blob/master/jonesfort...

Re:Bootstrapping a Forth in 40 lines of Lua code (2008) by jedimastert on Monday September 14, 2020 @09:36AM (#24469929)
Jonesforth is just an absolutely incredible piece. For me it was both an introduction to Forth and an introduction to assembler and somehow managed to be fairly effective at both.
Re:Bootstrapping a Forth in 40 lines of Lua code (2008) by kbr2000 on Monday September 14, 2020 @12:49PM (#24472290)
Agreed; also, this book is golden: Threaded Interpretive Languages (R. G. Loeliger)
Re:Bootstrapping a Forth in 40 lines of Lua code (2008) by LargoLasskhyfv on Monday September 14, 2020 @06:44PM (#24475997)
Since it seems to be out of print, and on the internet archive I'll drop this:

[0] https://archive.org/stream/R.G.LoeligerThreadedInterpretiveL...