[HN Gopher] Build Your Own Forth Interpreter
       ___________________________________________________________________
        
       Build Your Own Forth Interpreter
        
       Author : AlexeyBrin
       Score  : 34 points
       Date   : 2026-02-21 14:14 UTC (3 days ago)
        
 (HTM) web link (codingchallenges.fyi)
 (TXT) w3m dump (codingchallenges.fyi)
        
       | ithkuil wrote:
       | "if you know one forth, you know one forth"
        
         | js8 wrote:
         | So implement four of them, and you will know them all! First
         | Forth with indirect threaded code, second Forth with direct
         | threaded code, third Forth with subroutine threaded code, and
         | the final fourth with token threaded code.
        
           | n4r9 wrote:
           | I thought this was going to be a pun on the word "fourth",
           | disappointed when I got to "final".
        
         | AlexeyBrin wrote:
         | I doubt you will want to code professionally in Forth unless
         | you work on embedded, so the dialect you learn doesn't matter
         | too much. But it is interesting to implement a small
         | interpreter and play with it.
        
       | iberator wrote:
       | This is a strange article imo.
       | 
       | I was expecting to see FORTH in bare metal C or ASM.
       | 
       | There is a common myth about newbie programmers that FORTH is
       | write-only and that you need to type everything in one line,
       | without comments or function calls etc.
       | 
       | Writing forth is super easy especially if you have a stack
       | machine at your disposal. For example when you are building your
       | own virtual cpu/architecture with assembler and compiler.
       | 
       | It's more trivial than to understand any JavaScript framework lol
       | 
       | Research FORTH more guys - it doesn't need to be strange and hard
       | :)
       | 
       | ps. Lisp SUCKS
       | 
       | /rant
        
         | volemo wrote:
         | I was with you 'till the last line. :P
        
           | iberator wrote:
           | IMO Lisp is harder to implement than Forth, and LESS
           | readable, butt MAYBE i fell into the same trap as others with
           | Forth. hahaha
        
       | spc476 wrote:
       | I've already done that---ANS Forth for the 6809
       | (https://github.com/spc476/ANS-Forth).
        
         | sophacles wrote:
         | Advanced challenge: make it self-hosting.
        
       | dharmatech wrote:
       | Video where I demonstrate how I explore JONESFORTH using GDB:
       | 
       | https://youtu.be/giLsd-bik6A?si=Gwm3NJdUzyrmmopH
        
       ___________________________________________________________________
       (page generated 2026-02-24 23:00 UTC)