Two great articles on implementing classic languages: FORTH and Lisp

Posted by on in Blogs

I am currently reading through two very interesting articles on implementing classic programming languages in assembler:

Both these are not really articles - they are in fact extremely well-commented source code, but so well commented that they are, effectively, an article with the occasional bit of assembler.  Both are very worth reading, even if you have no prior assembly, FORTH, or Lisp knowledge; they explain the implementations so well that you learn the languages along the way.  I could only wish all assembly code I've seen was so well written and so well documented.

FORTH is particularly interesting because it executes in an environment, and you can modify the environment on the fly.  I feel we have lost some of the power of this concept of dynamically modifiable code even in languages that have RTTI or reflection, and are partly inspired by Smalltalk, such as Delphi.

Lisp is a classic language to implement and one I'd like to do in my *ahem* non-existent spare time; it would be great to have it implemented in both idiomatic C++ and idiomatic Delphi.  Recently, I've been trying to implement my examples and projects in both languages, such as for my recent CodeRage talk on mazes. I feel it can be educational for someone who speaks only one of those to see the same project in another language.

I naturally wondered how many Lisp implementations there are in Delphi.  Quite a few, I'd imagine; there are at least three on the first page of Google.  A couple to highlight:

  • DLISP looks clear and well-written with a modern approach, although sadly not very commented
  • Lisp-like language by Roman Yankovsky, author of FixInsight, a Delphi static analysis tool.

There are also plenty in C++.

But read those first two articles!  They are fascinating; I think all programmers with an interest in languages or just reading something new and interesting will find them as enthralling as I do.

Gold User, No rank,
C++ Product Manager, looking after C++Builder as well as the IDE.


  • Rudy Velthuis
    Rudy Velthuis Saturday, 2 December 2017

    Note that JonesForth is a terribly incomplete and non-standard implementation of Forth, even at a basic level. I also dabbled with writing a Forth in 386 asm, and started with JonesForth as an example, but soon found I had to rewrite most of it to make it work properly.

  • David Millington
    David Millington Wednesday, 13 December 2017

    What did you end up having to change?

  • Please login first in order for you to submit comments
  • Page :
  • 1

Check out more tips and tricks in this development video: