3 ms·
Write one! Forths are so simple that you can write one in minutes if you understand it, and a bit more if you don't know anything about it. Having your own fort
by unsafecast 4y ago
Write one! Forths are so simple that you can write one in minutes if you understand it, and a bit more if you don't know anything about it. Having your own forth is both really gratifying, and gives you an opportunity to play around with the internals and change things up to see what happens (and why the choices made were made).
Forth is one of the languages where you have to know the internals to write it, but the internals are really simple.
- jabits 4y agoSounds good. Any recommended starter guides? Thanks!
- t-3 4y agoIf you know C, retroforth's nga vm is ~300 lines and quite simple. I found it to be enlightening. https://git.sr.ht/~crc_/retroforth/tree/master/item/doc/Nga.md https://git.sr.ht/~crc_/retroforth/tree/master/item/doc/Nga.... - this is the "literate" version, there are a few variants of the source in the tree if you look.
- bear8642 4y agoJones Forth[0] is a good literate programming implementation that explains the internals as he goes. [0]https://github.com/nornagon/jonesforth/blob/master/jonesforth.S https://github.com/nornagon/jonesforth/blob/master/jonesfort...