libera/#lisp - IRC Chatlog
Search
20:39:48
kiki_lamb
So, someone I'm talking to is making themselves a toy Lisp, and they seem like they're entertaining the idea of having many/most of the 'lists' actually being implemented as some kind of vector/array under the hood. How bad of an idea is this? Are there examples of this being done? It seems like it's going to be at least a bit awkward, with special cases needed for handling shared tails and circular
20:45:10
pjb
kiki_lamb: implementation details don't matter. They just may have an impact on performance or implementation complexity.
20:46:56
kiki_lamb
sure... this language is just a toy, they're basically a student, so I'm trying to offer advice that keeps the implementation simple, it's the first time they've implemented any parser or language.
20:48:14
kiki_lamb
Apparently the language they're implementing in makes true linked lists a bit awkwards, which seems like a shame... actually using linked lists in the implementation seems like it would be a simpler implementation, to me.
20:55:28
jcowan
kiki_lamb: http://www.faqs.org/faqs/lisp-faq/part2/section-9.html describes cdr-coding
21:08:33
kiki_lamb
pjb: heh, could be. I'd been teaching them how to do this in C, but they're also working on a parrallel implementation in Rust (with which I am not familiar). They're pasting me things from their Rust chat where people are saying that, apparently, the object ownership/GC details can be strange for linked lists with loops or shared tails in Rust. *shrugs*
21:09:49
kiki_lamb
Hopefully they will eventually give up on the Rust implementation and return to focussing on the C one... or perhaps even see the light, and take my advice of using C++ instead.
21:14:23
jcowan
So we must add a third category of languages: there is Lisp, and there is Blub, which is any language that is not a Lisp, and there is Super-Blub, which is any language in which you cannot even *implement* a Lisp.
21:19:01
kiki_lamb
Also the dependent type SuperBlurb<Person>, with SuperBlurb<me> describing those languages in which I personally could not write a Lisp.
21:30:42
iisi
Only thing I remember from looking at Cobol excerpts is the possibility of lots of consecutive periods, which must have exactly the right count.