
Threaded interpretive languages
by R. G. Loeliger · first published 1981
38mentions
24recommended by
26HN commenters
2009–2026first – last mentioned
92% recommend8% neutral
Why HN recommends it
Clear walkthrough of how Forth-style threaded interpreters work under the hood, including a complete Z-80 implementation; recommended to anyone building their own Forth or wanting to understand its internals.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.







One of my very favourite programming books. Using it, together with "Threaded Interpretive Languages" https://www.amazon.co.uk/Threaded-Interpretive-Languages-R-G... I wrote a couple of Forth implementations in Z80 assembler back in the 1980s, and a Forth-like language for an Adventure writing system…
on “Starting Forth: An Introduction to the Forth Programming Language” ↗You might find R. G. Loeliger's book "Threaded Interpretive Languages: Their Design and Implementation" [1] interesting. Here's a review [2]. The comments on that review list some online resources that might also be useful. It's long out of print, but used copies are cheap,…
on “Forth: The Hacker’s Language” ↗The book “Threaded interpretive languages” by R. G. Loeliger has details on how Forth & Forth like languages are built re: core interpreter & threading of words.
on “Thoughts on Forth Programming” ↗Agreed; also, this book is golden: Threaded Interpretive Languages (R. G. Loeliger)
on “Bootstrapping a Forth in 40 lines of Lua code (2008)” ↗…trying to remember if Forth was created by Charles Moore or Calvin Moores. Charles Moore invented Forth. I really enjoyed reading Starting Forth when it came out. I've used Starting Forth together with Threaded Interpretive Languages: Their Design and Implementation by R. G. Loeliger to create my own Forth system. This second book is not about "threads" as we know them today; threading is a way to very efficiently dispatch the execution…
on “StoneKnifeForth (With a Metacircular Compiler)” ↗…'get next instruction' overhead and generally results in a 10% performance increase. [...] >An excellent work on this subject, containing a complete TIL implementation for the Z-80, is Loeliger's book ("Threaded Interpretive Languages" R.G. Loeliger, Byte Books 1981, ISBN 0-07-038360-X). I have a copy (I should have bought three) that I picked up in the years of Forth's waning "public" popularity. I've seldom had a such a lucid book…
on “Moving Forth (1993)” ↗A book called "Threaded Interpretive Languages" by RG Loeliger is about Forth (not about multi-threading). The author is sufficiently excited about the topic that you can envision him falling out of the chair. It also covers the very basics of how…
on “Forth compiler in one literate x86 assembly file” ↗Forth. Definitely Forth. Start here: http://www.amazon.com/Threaded-Interpretive-Languages-Design...
on “Introduction to the Python Interpreter, Part 1: Function Objects” ↗…Did you look @ the Bob language? It was the spiritual seed for Java by David Betz http://www.xlisp.org/ https://www.google.com/search?tbm=pts&hl=en&q=dr+dobbs+betz I really like http://www.amazon.com/Threaded-Interpretive-Languages-Design... and http://users.ece.cmu.edu/~koopman/stack_computers/
on “How Steve Wozniak Wrote BASIC for the Original Apple From Scratch” ↗…one of those books that takes a tightly-focused problem and shows how to solve it in a beautiful way that doesn't just solve the problem but also creates meaning that transcends the initial problem, is "Threaded Interpretive Languages" by Loeliger.
on “Programming books you might want to consider reading” ↗The wikipedia entry [0] contains some refs. The out-of-print book "Threaded Interpretive Languages" [1] was the definitive treatment of the topic, and what I mostly used back when I was writing Forth compilers. [0] https://en.m.wikipedia.org/wiki/Threaded_code [1] https://www.amazon.com/Threaded-Interpretive-Languages-Desig...
on “Register-based VMs have a higher performance than stack-based VMs” ↗…bought his book Starting FORTH (which is now available online[1]) shortly after reading a 1980 Byte Magazine article on FORTH. It's not hard to implement FORTH. I found that R. G. Loeliger's book[2] Threaded Interpretive Languages: Their Design and Implementation allowed me to easily build my own FORTH inspired system. [1] https://www.forth.com/starting-forth/ [2] https://www.amazon.com/Threaded-Interpretive-Languages-Desig...
on “Thinking Forth – A Language and Philosophy for Solving Problems (1984) [pdf]” ↗…memory-mapped hardware features, and a simple ISA. i.e. a system you can hold in your head all at once, contrasted with modern handhelds or desktops. Two books: (I really enjoyed the first one, multiple times) "Threaded Interpretive Languages", by R. G. Loeliger. "Stack Computers: The New Wave", by Philip Koopman. Two short papers: (maybe not profound, but they're short and available online) "Handling Multiple Data Types in Forth", by John…
on “My history with Forth and stack machines (2010)” ↗…program is truly unique to the task at hand. The fundamental "must learn" idea is the "threaded-interpreted language model". Words invoke words which invoke words... it is "kittens all the way down". "Threaded Interpretive Languages: Their Design and Implementation" by R. G. Loeliger is a must-read book. These ideas don't show up elsewhere. FORTH can be implemented in 4K (that's kilobytes). This is a language that "isn't a language".…
on “Languages you must know #4 (FORTH)” ↗I feel obliged to mention Loeliger's Threaded Interpretive Languages. It really helped me figure out what was going on under the hood w/ FORTH. That might be my only "beef" w/ FORTH back in the day, introductory documentation was easy to find, but intermediate and advanced…
on “Forth: A New Way to Program a Mini Computer (1974)” ↗