I have a minimal amount of experience with Lisp and have read the blog posts on how to implement the basic special forms which are needed to define a Lisp. I'm considering trying to write my own Lisp as a scripting language for a platform whose primary language is something that I don't like. Thing is, I don't really want to write code using a minimal set of primitives. I want to write in a full Lisp.
Are there any "bring your own bootstrap" Lisp implementations, which provide a more full-featured language once the basic primitives have been provided? Something that would let me go more quickly from a couple hundred lines of bootstrap code into a more full fledged language, even if the runtime is slow.
Hello,
I have implemented a full Lisp, which my company has accepted to put in open source. The documentation is here: https://github.com/naver/lispe/wiki.
The list of all available functions are here:
https://github.com/naver/lispe/wiki/5.-Description-of-Functions,-Operators-and-Libraries
And you can find the code over here: https://github.com/naver/lispe
The engine is implemented in C++11 and can compile on any platforms: Windows, Mac and Linux. I also provide installers for Windows and Mac OS, and a Web Assembly version.
You can use it as an external library in a C++ program or in a Python program.
In the documentation, I have documented how the internal engine is built.
You can very easily add external libraries and extend the instruction set as you wish.
The engine also proposes many methods to handle Unix commands and retrieve their content as a list of strings.
I find your implementation of lists with shared vectors rather than cons cells very interesting. However, I am surprised that function cons (prepending an element the front of the list) is relatively inefficient, since its performance is assumed by so much code to be constant time. Have you considered changing the storage underlying the shared vectors from arrays to rings? It's not a fully baked idea, but I think it would permit prepending an element to be as efficient as appending one.