3 ms·
Show HN: MiniForth – A Minimal Forth
- davidjade 6y agoI was inspired by the recent Forth-week on HN to dig up a minimal Forth that I created a while back. It is so minimal that it only runs one statically declared Forth program but that also makes it really easy to understand how little there is to a Forth interpreter and how they work. As simple as this one is, this interpreter implements a handful of stack manipulation Words and fully supports DO/LOOP looping and IF/ELSE/THEN branching as well as VARIABLE, CONSTANT, and ALLOT style arrays. Forth is a really simple yet powerful concept. This one strives for clarity of understand over pure efficiency and is written in C.
- tomcam 6y agoSuper clean code. Really good to see a classic implementation like this, and I happen to be partial to implementations in C myself