10:25:52phoemy algorithm: grab references to 1st and 2nd cons of the list. set the CDR of the first cons to the 3rd cons, set the CDR of the first cons to the CDDDR of the first cons, set the CDR of the second cons to the CDDDR of the second cons. Use the CDRs of the first and second cons as the new values for the first and second cons, loop until the CDRs of the lists are NIL.
10:26:50axionThe simplest code can be continually made 'fastest possible' over a lifetime for a programmer. I should have known better to phrase that a bit better
10:33:12axionbeach: So is a lot of things here, such as algorithm efficiency and Emacs buffer data structures being a bad data structure for their use :)
13:14:41rk[ghost]it would probably suit me to spend a few days reading the common lisp hyperspec more or reading others code more than programming.. as it seems like every day i come across a new library function which implements something i already spent time implementing by hand.
13:24:22pjbrk[ghost]: notice that: (let* ((k1 "k1") (k2 "k2") (a (acons k1 1 (acons k2 2 nil)))) (assoc k2 a)) #| --> ("k2" . 2) |# works perfectly with strings and without :test.
13:26:12pjbrk[ghost]: on the other hand: (assoc :foo '((bar . 1) (foo . 2))) #| --> nil |# doesn't work as you expect without :test! (assoc :foo '((bar . 1) (foo . 2)) :test (function string=)) #| --> (foo . 2) |#
13:26:24pjbrk[ghost]: it's not a matter of string or not string!
13:35:41axionshka_: It doesn't make much sense to use an intermediary vector when the input and output must be a list as mentioned
18:50:09flip214When the accessor functions for a class are in a different package, is there a shorter way than the 2-symbols-version of WITH-ACCESSORS to map them to symbols in the local package?