Re:The FORTH code for Chipwits is released in the game's 40t...
by mordechai9000 on Thursday November 21, 2024 @02:53PM
(#42207931)
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.
[ Parent
| on HN ]
Re:The FORTH code for Chipwits is released in the game's 40t...
by int_19h on Thursday November 21, 2024 @04:25PM
(#42208822)
Even 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/jonesfort...
Re:The FORTH code for Chipwits is released in the game's 40t...
by PittleyDunkin on Friday November 22, 2024 @03:45PM
(#42217240)
I 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.