3 ms·
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 "LIS
by AQXt 6y ago
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/jonesforth.S https://github.com/nornagon/jonesforth/blob/master/jonesfort...
- jedimastert 6y agoJonesforth 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.
- kbr2000 6y agoAgreed; also, this book is golden: Threaded Interpretive Languages (R. G. Loeliger)
- LargoLasskhyfv 6y agoSince it seems to be out of print, and on the internet archive I'll drop this: [0] https://archive.org/stream/R.G.LoeligerThreadedInterpretiveLanguagesTheirDesignAndImplementationByteBooks1981 https://archive.org/stream/R.G.LoeligerThreadedInterpretiveL...