Post AZRNOg2U7oApK1nlEO by eichin@mastodon.mit.edu
 (DIR) More posts by eichin@mastodon.mit.edu
 (DIR) Post #AZRNOZDDVVbC9HljUG by eichin@mastodon.mit.edu
       2023-09-04T19:27:12Z
       
       0 likes, 1 repeats
       
       https://mastodon.mit.edu/@ratfactor@mastodon.art/110724395484652351 -> https://ratfactor.com/forth/the_programming_language_that_writes_itself.html is an amazing 30k word traipse through the history of computing itself, using Forth as a guide-rail, going from pre-retro-computing (IBM 704) up through modern "Forth In Space" applications - https://www.forth.com/space-shuttle-robot-arm/ to tie in my recent https://mastodon.mit.edu/@eichin/111005779684422063 photo postings.
       
 (DIR) Post #AZRNOaxh0CMxZiWMZE by eichin@mastodon.mit.edu
       2023-09-04T19:33:02Z
       
       0 likes, 0 repeats
       
       The article is an excellent collection of reference material, but given the recent spike in popularity of the Z80 as a modern-hardware retro-platform (via https://rc2014.co.uk/ and the like) I'd recommend one additional book: "Threaded Interpretive Languages: Their Design and Implementation" by R. G. Loeliger. It walks you through the essentials and bootstrapping your own (Z80) forth in 45 bytes or so of code. When I ran across it, I'd written an unplayably-slow version of Breakout…
       
 (DIR) Post #AZRNOcL7sYhxqgUajQ by eichin@mastodon.mit.edu
       2023-09-04T19:36:55Z
       
       0 likes, 0 repeats
       
       … in TRS-80 BASIC. Now, I was one of those weirdos that started with 8080 machine code in hex, from books, and learned basic later - primarily as a way to load machine code in, since TRS-80s didn't have front panels like real machines - but it seemed tedious to try and write an entire game in machine code. Enter Forth - wrote an inner interpreter, then some words for doing pixel graphics and scanning the keyboard - the first version that actually ran was *too fast* for the frame rate :-)
       
 (DIR) Post #AZRNOdh8qBue3Fngga by eichin@mastodon.mit.edu
       2023-09-04T19:40:59Z
       
       0 likes, 0 repeats
       
       Turns out this was much less weird than I realized at the time - in my commercial work (not that much later) I came upon https://en.wikipedia.org/wiki/Grammatik which was written in Forth for CP/M - ended up spending more time "cracking" the software to get at the outer-interpreter prompt and use it as a Forth, than using it for writing. Their motivation seemed to be more about compressing a complex system to fit in 64k of RAM, than speed, but it still had verbose function(word) names, no token obfuscation...
       
 (DIR) Post #AZRNOg2U7oApK1nlEO by eichin@mastodon.mit.edu
       2023-09-04T19:48:45Z
       
       0 likes, 0 repeats
       
       At some point I should dip my toes in and try implementing a forth in WASM (yes, there are several, that's not the point - the learning comes from *implementing* it, not using someone else's - it's sort of a "Jedi build their own lightsabers" thing, with the usual caveat that jedi are not particularly known for having any skills at *working with others*, it's absolutely a personal "feeling of power" path .) But it is more tempting to solder up a Z80 board and start there instead :-)