Our great sponsors
-
secd
A simple implementation of the SECD abstract machine (https://en.wikipedia.org/wiki/SECD_machine)
Arguably, it's a bit silly, in the same way that the one page Lisp definitions written in Lisp are a bit silly. It's a naive implementation. It basically maps the SECD machine, directly to the underlying Clojure environment, which being Lisp, is very close in semantics. (Since SECD was first intended to implement Lisp.)
Consider how it evaluates a variable in an environment: https://github.com/zachallaun/secd/blob/master/src/secd/mach... It's the simplest, and worst, solution -- iterate over the linked list from the start until you find the value you want. Performance degrades exponentially the more variables you have. In a more "serious" interpreter or compiler, you'd want to do a transform at some point, and slip in the value directly, if possible. And if not, you want to call out to a fast lookup method, like a hash table or balanced tree.
-
I've actually recently read "FUNCTIONAL PROGRAMMING: Application and Implementation", by Peter Henderson from 1980, which contains a description of the SECD machine and a compiler for a simple purely-functional Lisp dialect called Lispkit.
This <https://github.com/carld/lispkit> looks like a good repo if you want to know more, although I'm not related to it in any way.
I can't say how it compares the book by Kogge mentioned in this post since I haven't read that, but I can say I think it's an excellent book and worth reading if you're interested in this kind of thing.
-
InfluxDB
Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.
-
Might be of interest: the ocaml interpreter runs on some kind of ZINC machine iirc, which is implemented here: https://github.com/ocaml/ocaml/blob/trunk/runtime/interp.c