this post was submitted on 18 Nov 2023
1 points (100.0% liked)

Lisp

53 readers
3 users here now

founded 1 year ago
MODERATORS
 

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.

you are viewing a single comment's thread
view the rest of the comments
[–] jacobb11@alien.top 1 points 1 year ago

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.