News for hackers. Stuff that matters.
Re:Simplified Common Lisp reference by palad1n on Tuesday May 02, 2017 @04:10AM (#14244772)
First thing I searched for on the page: loop (not found).
Re:Simplified Common Lisp reference by DonaldFisk on Tuesday May 02, 2017 @09:33AM (#14246165)
I don't recommend using loop. Neither does Paul Graham (http://www.paulgraham.com/loop.html) nor John Foderaro, the main developer of Franz Lisp (http://compgroups.net/comp.lang.lisp/re-the-loop-macro-3/195...). Including loop in the Common Lisp standard was a contentious issue, opposed by Scott Fahlman, Guy Steele (3.2 in http://dreamsongs.com/Files/HOPL2-Uncut.pdf), and others (Steven M. Haflich's article on 9/16/02 in https://groups.google.com/forum/#!topic/comp.lang.lisp/tBmK0...).
Re:Simplified Common Lisp reference by dreamcompiler on Tuesday May 02, 2017 @10:16AM (#14246482)
Loop is ugly but sometimes an ugly tool is the best one for the job. Format is ugly too, but same issue.

One of the nice things about CL programmers is that we're all pretty smart and we can disagree while acknowledging each others' points. PG also dislikes CLOS for example. I think he's wrong about that, but I respect his opinions.

Re:Simplified Common Lisp reference by treerex on Tuesday May 02, 2017 @10:26AM (#14246580)
Format is ugly, but like a bulldog it is so ugly it's cute.

If you don't want loop, you can always use iterate. :-)

Re:Simplified Common Lisp reference by dreamcompiler on Tuesday May 02, 2017 @12:32PM (#14247854)
Ack. I've never been able to wrap my head around iterate and it's non-standard, so I ignore it. (I also ignore the pretty printer because I don't understand it, even though it is standard.)
Re:Simplified Common Lisp reference by shakna on Tuesday May 02, 2017 @04:15AM (#14244794)
You have let [0], why would you need a special loop function?

[0] http://jtra.cz/stuff/lisp/sclr/let.html

Edit:

That is to say, this is a simplified reference, and loop is a macro, not a special form.

Re:Simplified Common Lisp reference by juki on Tuesday May 02, 2017 @04:58AM (#14244984)
I assume you're thinking about Schemes `(let loop (...) ...)`, but that doesn't exist in Common Lisp. CL:LOOP is a looping macro with its own small DSL.

    (loop :for i :below 5
          :when (evenp i) :collect i)
    ;=> (0 2 4)
Re:Simplified Common Lisp reference by lispm on Tuesday May 02, 2017 @05:30AM (#14245110)
That's a step up from loops with 'goto':

    (prog ((result '())
           (i 0))
      loop
      (when (>= i 5)
        (return (reverse result)))
      (when (evenp i)
        (push i result))
      (incf i)
      (go loop))
Re:Simplified Common Lisp reference by TeMPOraL on Wednesday May 03, 2017 @07:21AM (#14254715)
tagbody/go is implementation detail of macro expansion though.
Re:Simplified Common Lisp reference by lispm on Wednesday May 03, 2017 @08:00AM (#14254942)
prog + goto was two decades one of the main tools for loops in Lisp...
Re:Simplified Common Lisp reference by kgwgk on Tuesday May 02, 2017 @04:57AM (#14244977)
This response makes no sense. Most of the functions in that page are not special forms. And both "car" and "first" are included! And "cdr" and "rest". And there are other functions that can be trivially obtained by the composition of two functions.
Re:Simplified Common Lisp reference by Koshkin on Tuesday May 02, 2017 @12:31PM (#14247846)
Note that both CAR and CDR refer to parts of a CONS cell which does not necessarily represent a list.
Re:Simplified Common Lisp reference by kgwgk on Wednesday May 03, 2017 @03:57PM (#14259431)
That doesn't change the fact that car and first are two names for one single function (the same applies to cdr and rest). (The point is that the absence of loop cannot be explained because it's not "needed".)
Re:Simplified Common Lisp reference by Grue3 on Tuesday May 02, 2017 @08:02AM (#14245639)
There seems to be a lot of functionality missing. Like, the entire CLOS.