3 ms·
Cool. Here are some other resources that I've encountered along the way of learning Forth: - JonesForth: https://github.com/nornagon/jonesforth/blob/master/jon
by xelxebar 3y ago
Cool. Here are some other resources that I've encountered along the way of learning Forth:
- JonesForth: https://github.com/nornagon/jonesforth/blob/master/jonesforth.S https://github.com/nornagon/jonesforth/blob/master/jonesfort...
This is legit a text that goes the an x86 Forth implementation. Actually, it's just an implementation with really extensive comments. That said, including whitespace and comments, it's just 2000 lines and the pedagogy is excellent. Highly recommended for anyone who would rather see behind the curtain before picking up a larger text.
- SmithForth: https://dacvs.neocities.org/SF/ https://dacvs.neocities.org/SF/
So, Smith decided to hand-write a Forth directly in x86-64 opcodes (well, the corresponding ascii hex bytes). It's incredibly slim and enlightening how you can bootstrap a language in just a couple hundred bytes or so.
This project actually inspired me to really learn the x86-64 architecture, so I ended up hand-decompiling the SmithForth binary instead of going through his commented implementation. Hand-decompilation is an absolutely fascinating exercise. You learn all about ELF structure, opcode encodings, and actually start to see the gaps where microarchitectural details shine through. Highly recommended for any hacker that really wants to grok low level details.
- Mecrisp: https://mecrisp.sourceforge.net/ https://mecrisp.sourceforge.net/
An amazingly fast Forth implementation for MSP430, ARM, RISC-V, MIPS, and some FPGAs. This gave me one really nice understanding of Forth as
A REPL into your hardware!
- ##forth on libera.chat
Really active and helpful members there. Definitely worth dropping by.
- sph 3y agoDon't forget eForth, which I believe is a better, and more "Forthy" implementation than JonesForth is, though not as easy to understand for a newcomer. http://www.exemark.com/FORTH/eForthOverviewv5.pdf http://www.exemark.com/FORTH/eForthOverviewv5.pdf https://www.forth.org/OffeteStore/1013_eForthAndZen.pdf https://www.forth.org/OffeteStore/1013_eForthAndZen.pdf Another outstanding resources are the post from Bradford J. Rodriguez. Can't write a Forth implementation without going through the wisdom that's condensed in those links (see the first section): https://www.bradrodriguez.com/papers/index.html https://www.bradrodriguez.com/papers/index.html
- idatum 3y ago> A REPL into your hardware! This is what got me interested in Forth using ARM STM32 devices a couple years ago. Specifically, I put Mecrisp-Stellaris Forth on an STM32F401. It was fun! You can experiment and quickly learn (fail fast) trying different features -- could try features of the chip as I read the datasheet. I was able to translate those learnings to a C implementation as well.