Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

Debian Hint #6: There is no hint #6. Submit a hint today!


comp / comp.lang.lisp / Re: Loop macro

SubjectAuthor
* Re: Loop macroB. Pym
`- Re: Loop macroB. Pym

1
Subject: Re: Loop macro
From: B. Pym
Newsgroups: comp.lang.lisp, comp.lang.scheme
Organization: A noiseless patient Spider
Date: Sat, 21 Sep 2024 03:08 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Nobody447095@here-nor-there.org (B. Pym)
Newsgroups: comp.lang.lisp,comp.lang.scheme
Subject: Re: Loop macro
Date: Sat, 21 Sep 2024 03:08:29 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 110
Message-ID: <vcldb8$1f71r$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Date: Sat, 21 Sep 2024 05:08:29 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="884758efe45e032ec9a22b0c8e948aa6";
logging-data="1547323"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bP2h1+e1fnvWm3XNVPRJA"
User-Agent: XanaNews/1.18.1.6
Cancel-Lock: sha1:8rW+R8NIQDLhzKge3Ln1G87Q/8A=
View all headers

Chris Riesbeck wrote:

> LOOP ... COLLECT vs. MAPCAR -- LAMBDA is a tie for me,
> but if you want to collect only certain values, then
>
> (loop for x in l
> when <test x>
> collect x)
>
> is hands-down clearer than
>
> (mapcan #'(lambda (x)
> (when <test x> (list x)))
> l)

Why didn't the creature simply write "(lambda" instead
of "#'(lambda"?

"(function (lambda ...)) is a pleonasm. lambda is a macro that
already expands to (function (lambda ...))."

Disciples of CL are the most mindless "programmers" on the
planet. Furthermore, they are very eager to make their
code as ugly as possible.

>
> while
>
> (remove-if-not #'(lambda (x) <test x>) l)

Why didn't the creature simply write
"(remove-if-not <test> l)"?

Disciples of CL are the most mindless "programmers" on the
planet. Furthermore, they are very eager to make their
code as ugly as possible.

>
> is OK but that double-negative leaves me cold.

Gauche Scheme:

(filter odd? (liota 22))
===>
(1 3 5 7 9 11 13 15 17 19 21)

See how much better it is when one uses a Lisp instead of
CL (COBOL-Like)?

Paul Graham:

"The good news is, it's not Lisp that sucks, but Common Lisp."

Paul Graham:

"Do you really think people in 1000 years want to be
constrained by hacks that got put into the foundations of
Common Lisp because a lot of code at Symbolics depended on
it in 1988?"

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."

Jeffrey M. Jacobs:

"The CL effort resembles a bunch of spoiled children,
each insisting 'include my feature or I'll pull out, and
then we'll all go down the tubes'. Everybody had vested
interests, both financial and emotional."

Jeffrey M. Jacobs:

"CL is a nightmare; it has effectively killed LISP
development in this country. It is not commercially viable
and has virtually no future outside of the traditional
academic/defense/research arena."

Bernard Lang:

"Common Lisp did kill Lisp. Period. (just languages take a
long time dying ...) It is to Lisp what C++ is to C. A
monstrosity that totally ignores the basics of language
design, simplicity and orthogonality to begin with."

Subject: Re: Loop macro
From: B. Pym
Newsgroups: comp.lang.lisp, comp.lang.scheme
Organization: A noiseless patient Spider
Date: Sat, 21 Sep 2024 03:20 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Nobody447095@here-nor-there.org (B. Pym)
Newsgroups: comp.lang.lisp,comp.lang.scheme
Subject: Re: Loop macro
Date: Sat, 21 Sep 2024 03:20:48 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 131
Message-ID: <vcle29$1fa1s$1@dont-email.me>
References: <vcldb8$1f71r$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Date: Sat, 21 Sep 2024 05:20:48 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="2dce09030b16512dfbe240663cdf12c5";
logging-data="1550396"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/oPiW8eG21l8NOdvSyZ/Lc"
User-Agent: XanaNews/1.18.1.6
Cancel-Lock: sha1:mUrDGxNpi536I9OikAs6VzVfyGg=
View all headers

B. Pym wrote:

> Chris Riesbeck wrote:
>
> > LOOP ... COLLECT vs. MAPCAR -- LAMBDA is a tie for me,
> > but if you want to collect only certain values, then
> >
> > (loop for x in l
> > when <test x>
> > collect x)
> >
> > is hands-down clearer than
> >
> > (mapcan #'(lambda (x)
> > (when <test x> (list x)))
> > l)
>
>
> Why didn't the creature simply write "(lambda" instead
> of "#'(lambda"?
>
> "(function (lambda ...)) is a pleonasm. lambda is a macro that
> already expands to (function (lambda ...))."
>
> Disciples of CL are the most mindless "programmers" on the
> planet. Furthermore, they are very eager to make their
> code as ugly as possible.
>
>
>
> >
> > while
> >
> > (remove-if-not #'(lambda (x) <test x>) l)
>
>
> Why didn't the creature simply write
> "(remove-if-not <test> l)"?
>
> Disciples of CL are the most mindless "programmers" on the
> planet. Furthermore, they are very eager to make their
> code as ugly as possible.
>
>
>
> >
> > is OK but that double-negative leaves me cold.
>
> Gauche Scheme:
>
> (filter odd? (liota 22))
> ===>
> (1 3 5 7 9 11 13 15 17 19 21)
>
>
> See how much better it is when one uses a Lisp instead of
> CL (COBOL-Like)?
>
> Paul Graham:
>
> "The good news is, it's not Lisp that sucks, but Common Lisp."
>
>
>
> Paul Graham:
>
> "Do you really think people in 1000 years want to be
> constrained by hacks that got put into the foundations of
> Common Lisp because a lot of code at Symbolics depended on
> it in 1988?"
>
> 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."
>
> Jeffrey M. Jacobs:
>
> "The CL effort resembles a bunch of spoiled children,
> each insisting 'include my feature or I'll pull out, and
> then we'll all go down the tubes'. Everybody had vested
> interests, both financial and emotional."
>
> Jeffrey M. Jacobs:
>
> "CL is a nightmare; it has effectively killed LISP
> development in this country. It is not commercially viable
> and has virtually no future outside of the traditional
> academic/defense/research arena."
>
> Bernard Lang:
>
> "Common Lisp did kill Lisp. Period. (just languages take a
> long time dying ...) It is to Lisp what C++ is to C. A
> monstrosity that totally ignores the basics of language
> design, simplicity and orthogonality to begin with."

Don Geddis wrote

> I don't know about you, but it's _much_ easier for me to understand this
> oh-so-common idiom with the extended loop:
>
> (loop for x in *big-list*
> collect (1+ x) )

Why not:

(mapcar '1+ '(200 300 400 500))
===>
(201 301 401 501)

1

rocksolid light 0.9.8
clearnet tor