Pep and Nom

home | blog | all blog posts

14 feb 2025

A parsing trail

I was aimlessly reading the web when somebody on reddit recommended the website craftinginterpreters.com which is a book by Robert Nystrom who clearly knows what he is talking about. I know this because he appears to be one of the main developers/designers of the dart language which has been developed by Google as a cross platform app-development language.

The book is available in its entirety on the website above. Apart from Dart, he also seems to develop hobby languages which I found interesting because I am really a hobby programmer.

Mr Nystrom also mentions the a very unusual site, namely wiki.xxiivv.com/site/devine_lu_linvega.html who has developed a system which I don't understand at all. But his website is interesting because it takes the Forth language seriously.

Forth is not really a language, because it is just a series of words separated by whitespace. But a Forth system contains several truly amazing ideas. One of these ideas is the pair of stacks: one for data and one for procedure return addresses (although you can put data on it if you want). All data for procedures is placed on the data stack, so there are no parameters. Another idea is the linked-list dictionary of “words” (procedures) that resides in memory. Forth reached the peak of its popularity in the the 1990's and then just slowly faded away. It still has some niche users in the microcontroller world, because the whole system can be very small (maybe 5K or less if required) and because a forth system contains its own compiler and interpreter. This means that the whole system can run on the microcontroller.

Anyway, I found all this surprising because an influential main-stream modern language designer was having a serious conversation with someone who believes in the power of Forth-like systems. This is pretty rare.