5:58:57asarchOne stupid question: why SBCL and not GNU Common Lisp?
5:59:58asarchIs it because GCL is Lisp-1 and SBCL Lisp-2?
6:00:20no-defun-allowedGCL isn't a conforming Common Lisp implementation, and it doesn't have a native code compiler that makes JVM weenies fear for their lives[citation needed].
6:01:10jackdanielGCL implements CLtL2 with effort to support ANSI CL (and it is Lisp-2)
6:01:11no-defun-allowedGCL, if it is supposed to be a Common Lisp implementation, has to be a Lisp-2. There should be zero difference in semantics when running portable CL programs on conforming implementations.
6:01:13dialecticDidn't GNU Common Lisp turn into Kyoto Common Lisp?
13:52:56pjbI was thinking about (defun take (n list) (loop repeat n for current := list :then (rest current) collect (first current))) but then (take 2 '(1)) #| --> (1 nil) |#
16:37:06dimjust noticed that the topic here says SBCL 1.4.16 is current, but I see _The most recent version is SBCL 1.5.4, released June 29, 2019_ over at sbcl.org... do we want to maintain the topic version numbers?
16:39:08ck_I'd put the urls in the topic if they fit -- I'd be surprised if anybody depended on the topic of #lisp on freenode for their release updates
16:40:12ck_or maybe those are there in case of rhetorical emergencies. "What version do you run? I'm sorry. We only discuss sbcl 1.4.16 in here!"
16:42:22aethI'm reading the backlog but I'm confused because the topic says 1.5.4
16:42:41aethMaybe I should go back to reading in backwards order
16:55:36aethpjb: ggole has the correct answer. LOOP will terminate at the shorter iteration, so it will either repeat n times or for loop the length of the list, whichever ends first
16:55:48aethsort of like how mapcar uses the shortest list
17:12:18aethif you wanted to have a filler value you'd have to let the user specify a default because the user might have a list of NILs as the input!
17:17:40aethI think the best TAKE in CL style, though, would be sequence-generic and have an ETYPECASE with Bike's (subseq sequence 0 (min n (length sequence))) solution for non-list sequences (ideally vectors, but a user-extensible sequence might be used).