4 ms·
I wrote an interpreter on a whim a long time ago. Mainly to show a friend how quick it was to get something going. I continued working on it, had great fun. Unt
by rags2riches 4y ago
I wrote an interpreter on a whim a long time ago. Mainly to show a friend how quick it was to get something going. I continued working on it, had great fun. Until I got to quasiquoting. That's where my head started spinning and I lost steam.
- sph 4y agoWhy would it be hard to implement? (Keep in mind I have never written a lisp so my comment is uneducated) Quasiquoting means creating a list where some elements are evaluated at runtime. Not dissimilar to string interpolation.
- KineticLensman 4y ago> Quasiquoting means creating a list where some elements are evaluated at runtime Take a look at the awesome 'Make A Lisp' (MAL), in particular the section on quoting: https://github.com/kanaka/mal/blob/master/process/guide.md#step-7-quoting https://github.com/kanaka/mal/blob/master/process/guide.md#s... This has a fairly good description of what happens during quasi-quoting.
- kazinator 4y agoI don't recommend this; it is pretty awful, and mostly particular to the internal structure and conventions of its respective project. The actual Lisp information sources, which are numerous, cover this ground more than adequately; there is no need to turn to the internal documentation of a polyglot mock Lisp.
- KineticLensman 4y ago> there is no need to turn to the internal documentation of a polyglot mock Lisp Well, unless you want to be able to say "I have built a self-hosting Lisp from scratch, and I understand what it is doing". Including eval, quoting and tail recursion. Getting my C# implementation of MAL to interpret itself was one of the most compelling learning experiences in my recent programming history.
- rags2riches 4y agoThat's just how I remember how it went. Up until then, everything just flowed without any big problems.