Re:Ask HN: Guide for Implementing Common Lisp
by Tomte on Thursday February 01, 2024 @02:04AM
(#39213442)
Lisp in Small Pieces is the standard recommendation.
[ Parent
| on HN ]
Re:Ask HN: Guide for Implementing Common Lisp
by HexDecOctBin on Thursday February 01, 2024 @02:53AM
(#39213685)
Thanks. I skimmed through it a while back, so my memory might be faulty, but I think it implemented a Lisp in a Lisp. Do they actually implement this whole machinery, or do they simply use the existing mechanisms?
Re:Ask HN: Guide for Implementing Common Lisp
by i_don_t_know on Thursday February 01, 2024 @12:10PM
(#39218292)
The later chapters talk about compilation to byte-code and IIRC how you implement that in a VM in C. But it doesn't talk about memory management and garbage collection. It has a chapter on macros.
SICP goes a little further from compiling Scheme to virtual assembly, a VM and memory management with garbage collection in their last chapter. It's all implemented in Scheme itself, including the VM, but at that point it's low-level enough that you should be able to make the step to C. It doesn't talk about macros.
https://mitp-content-server.mit.edu/books/content/sectbyfn/b...
Neither of which really talk about Common Lisp though and read macros etc. I'm also not sure how similar Scheme and Common Lisp compilers are.