• Re: A Long Piece Of Lisp Code

    From B. Pym@Nobody447095@here-nor-there.org to comp.lang.lisp on Thu Aug 21 23:26:38 2025
    From Newsgroup: comp.lang.lisp

    (defun map-> (fn start test-fn succ-fn)
    (do ((i start (funcall succ-fn i))

    Why "(funcall succ-fn i))"? Why not simply "(succ-fn i))"?

    What a clunky, bloated, and hideous language!

    Daniel Weinreb, 24 Feb 2003:

    Having separate "value cells" and "function cells" (to use
    the "street language" way of saying it) was one of the most
    unfortunate issues. We did not want to break pre-existing
    programs that had a global variable named "foo" and a global
    function named "foo" that were distinct. We at Symbolics
    were forced to insist on this, in the face of everyone's
    knowing that it was not what we would have done absent
    compatibility constraints. It's hard for me to remember all
    the specific things like this, but if we had had fewer
    compatibility issues, I think it would have come out looking
    more like Scheme in general.

    Daniel Weinreb, 28 Feb 2003:

    Lisp2 means that all kinds of language primitives have to
    exist in two versions, or be parameterizable as to whether
    they are talking about the value cell or function cell. It
    makes the language bigger, and that's bad in and of itself.


    Just as a dung beetle treasures excrement, disciples of CL
    treasure all of the deformities of their repulsive language.


    (result nil))
    ((funcall test-fn i) (nreverse result))

    Why "(funcall test-fn i)"? Why not simply "(test-fn i)"?

    (push (funcall fn i) result)))

    Why "(funcall fn i)"? Why not simply "(fn i)"?


    Testing:

    (map-> 'exp 1 (lambda(n)(> n 4)) '1+)
    ===>
    (2.7182817 7.389056 20.085537 54.59815)


    Let's show the CL disciple the right way to use "do":

    (define (map-> fn start test-fn succ-fn)
    (do ((i start (succ-fn i))
    (result '() (cons (fn i) result)))
    ((test-fn i) (reverse result))))


    (map-> exp 1 (lambda(n)(> n 4)) (pa$ + 1))
    ===>
    (2.718281828459045 7.38905609893065 20.085536923187668 54.598150033144236)
    --
    [T]he problem is that lispniks are as cultish as any other devout group and basically fall down frothing at the mouth if they see [heterodoxy].
    --- Kenny Tilton
    The good news is, it's not Lisp that sucks, but Common Lisp. --- Paul Graham --- Synchronet 3.21a-Linux NewsLink 1.2
  • From B. Pym@Nobody447095@here-nor-there.org to comp.lang.lisp on Fri Aug 22 02:40:48 2025
    From Newsgroup: comp.lang.lisp

    B. Pym wrote:

    (defun map-> (fn start test-fn succ-fn)
    (do ((i start (funcall succ-fn i))

    Why "(funcall succ-fn i))"? Why not simply "(succ-fn i))"?

    What a clunky, bloated, and hideous language!

    Daniel Weinreb, 24 Feb 2003:

    Having separate "value cells" and "function cells" (to use
    the "street language" way of saying it) was one of the most
    unfortunate issues. We did not want to break pre-existing
    programs that had a global variable named "foo" and a global
    function named "foo" that were distinct. We at Symbolics
    were forced to insist on this, in the face of everyone's
    knowing that it was not what we would have done absent
    compatibility constraints. It's hard for me to remember all
    the specific things like this, but if we had had fewer
    compatibility issues, I think it would have come out looking
    more like Scheme in general.

    Daniel Weinreb, 28 Feb 2003:

    Lisp2 means that all kinds of language primitives have to
    exist in two versions, or be parameterizable as to whether
    they are talking about the value cell or function cell. It
    makes the language bigger, and that's bad in and of itself.


    Just as a dung beetle treasures excrement, disciples of CL
    treasure all of the deformities of their repulsive language.


    (result nil))
    ((funcall test-fn i) (nreverse result))

    Why "(funcall test-fn i)"? Why not simply "(test-fn i)"?

    (push (funcall fn i) result)))

    Why "(funcall fn i)"? Why not simply "(fn i)"?


    Testing:

    (map-> 'exp 1 (lambda(n)(> n 4)) '1+)
    ===>
    (2.7182817 7.389056 20.085537 54.59815)


    Let's show the CL disciple the right way to use "do":

    (define (map-> fn start test-fn succ-fn)
    (do ((i start (succ-fn i))
    (result '() (cons (fn i) result)))
    ((test-fn i) (reverse result))))


    (map-> exp 1 (lambda(n)(> n 4)) (pa$ + 1))
    ===>
    (2.718281828459045 7.38905609893065 20.085536923187668 54.598150033144236)

    When I posted the above, I didn't realize that this
    function is from Paul Graham's "On Lisp" (p. 54):

    (defun map-> (fn start test-fn succ-fn)
    (do ((i start (funcall succ-fn i))
    (result nil))
    ((funcall test-fn i) (nreverse result))
    (push (funcall fn i) result)))

    This is further evidence that anybody who has embraced
    CL cannot be a top-notch programmer.
    Anybody who is a top-notch programmer couldn't stand
    to embrace CL.

    As I showed above, he wasn't even able to use "do"
    in the correct manner.
    --
    [T]he problem is that lispniks are as cultish as any other devout group and basically fall down frothing at the mouth if they see [heterodoxy].
    --- Kenny Tilton
    The good news is, it's not Lisp that sucks, but Common Lisp. --- Paul Graham --- Synchronet 3.21a-Linux NewsLink 1.2