Two great articles on implementing classic languages: FORTH and Lisp
I am currently reading through two very interesting articles on implementing classic programming languages in assembler:
- Implementing a FORTH interpreter in i386 assembler
- Implementing Lisp in assembler for the Raspberry Pi
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.
Please login first in order for you to submit comments
- Page :