libera/commonlisp - IRC Chatlog
Search
21:26:53
Nilby
jcowan: Good question. I really don't remember. I assume it must have been one of the PDP8 Lisps on this page http://www.softwarepreservation.net/projects/LISP/other#DECUS_LISP_ I remember it fit on some number of "big" floppies, some of which had the "AI" Eliza and "ML" guess an animal.
21:33:30
Bike
but usually things aren't organized in such a way that you need to force anything to be anything
21:34:05
Nilby
lisp123: There's a number of CL functions that get errors or are undefined for not proper lists, but otherwise it's up to the code your using.
21:39:35
lisp123
benefit of not allowing dotted lists is you don't have to always check if the CDR is a cons
22:13:46
pjb
but since you have to test for null, you can as well test for consp. Then if not consp, you can check for a dotted list with null only on the last cdr.
2:36:11
mfiano
Random thought: Should library authors that have public-facing interfaces that accept any specific or subset of sequences as input, is it a good idea to always use COPY-TREE or the appropriate function before mutating a list "from the outside" that you didn't create, or should the caller always be informed of the semantics and it's their responsibility not to pass a list literal...or both,
2:43:49
mfiano
Nevermind. That question didn't come out the way I wanted it to, and it doesn't make a lot of sense.
3:11:20
Bike
destructive interfaces are ok as long as they are documented as such (and "may destroy" versus "mutates in this particular way" is indicated)
3:11:45
Bike
and often a good idea practically speaking, since consing up a bunch of needless intermediate results slows things down
4:34:38
mfiano
One thing that upsets me about the standard, and I just had to double-check to make sure I was remembering correctly, is there is no way to get a lazy sequence of the keys stored in a hash table, except within the lexical environment of with-hash-table-iterator, and there are all sorts of UB around trying to make it dynamically scoped with a closure or whatnot.
4:35:54
mfiano
I really would like a non-consing alternative to MAPHASH-ing to retrieve all keys, as the starting state in a custom iterator, which is more or less, what I'm trying to accomplish.