3 ms·
I think writing a toy Forth interpreter is a good way to learn about the language. It's easy and I had a lot of fun with it. But it is so ridiculously easy, at
by mordechai9000 2y ago
I think writing a toy Forth interpreter is a good way to learn about the language. It's easy and I had a lot of fun with it. But it is so ridiculously easy, at least up to a certain point, some may find it too elementary, or too tempting to go beyond a toy implementation.
- int_19h 2y agoEven just reading through an existing implementation can be very enlightening. E.g. JonesForth (where like 90% of the assembly source is comments explaining everything in detail): https://github.com/nornagon/jonesforth/blob/master/jonesforth.S https://github.com/nornagon/jonesforth/blob/master/jonesfort...
- PittleyDunkin 2y agoI really liked JonesForth, and I ported it to powerpc about a decade ago (maybe longer, I don't unfortunately have it around anymore to check, nor a machine to run it on). One thing that was very frustrating was finding out that the macro system was much more limited under darwin's assembler—this resulted in a painful translation process and too much M4 usage. If you do go down this route, I highly recommend fully exploring the capabilities of the assembler's macro system before diving in.