freenode/#lisp - IRC Chatlog
Search
23:00:57
no-defun-allowed
well, if you give SORT some conses, it'll adjust the CDRs to taste and it's more than possible whatever cons was first before SORTing could be in the middle
23:02:06
no-defun-allowed
and conses aren't passed by "reference" in a way like arrays are, if you move conses around, there's no telling which is first
23:06:05
aeth
A cons in C terms is (probably, no guarantees) basically just a container of two pointers (actually, more like the union of pointers and the types small enough to fit in the word size with the type tag included). And a list is just something that starts with that or NIL. And a proper list is a list whose final CDR is NIL.
23:06:30
aeth
So with a destructive sort, your list reference could now be pointing to the middle since there is no outer container, just cons-or-NIL.
2:06:18
alexanderbarbosa
"off-topic": as they said, python *is* a good start for those that come from lisp languages. im feeling at home...
2:13:25
no-defun-allowed
alexanderbarbosa: https://www.reddit.com/r/LispMemes/comments/b9phzx/best_lisp_joke_in_existence/
2:14:58
alexanderbarbosa
no-defun-allowed: I was after any pl that was not that weird, by weird i mean, not lispy
5:39:22
LdBeth
However if you want to change the default option there’s :save-runtime-options for save-lisp-and-die