Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

You will visit the Dung Pits of Glive soon.


comp / comp.lang.scheme / (lambda (x) (list (car x) (length x))) using Cut or Cute?

SubjectAuthor
* (lambda (x) (list (car x) (length x))) using Cut or Cute?HenHanna
`* (lambda (x) (list (car x) (length x))) using Cut or Cute?HenHanna
 `- Re: (lambda (x) (list (car x) (length x))) using Cut or Cute?Kaz Kylheku

1
Subject: Re: on the evolution of lisp
From: HenHanna
Newsgroups: comp.lang.lisp, comp.lang.scheme
Organization: A noiseless patient Spider
Date: Mon, 17 Jun 2024 07:07 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna@devnull.tb (HenHanna)
Newsgroups: comp.lang.lisp,comp.lang.scheme
Subject: Re: on the evolution of lisp
Date: Mon, 17 Jun 2024 00:07:48 -0700
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <v4onc4$hh2o$1@dont-email.me>
References: <87sf2ac185.fsf@yaxenu.org> <v4ldd0$3mt2i$2@dont-email.me>
<8734pcjumt.fsf@yaxenu.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 17 Jun 2024 09:07:49 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="8b1e823bd3e444c0f005056897c95b12";
logging-data="574552"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/6OhkyCLe69r6eqjEvTufvzWEBWL6mm14="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:hl6cvXNL+sY8j8ru1ex8PgTOUR8=
Content-Language: en-US
In-Reply-To: <8734pcjumt.fsf@yaxenu.org>
View all headers

On 6/16/2024 5:11 PM, Julieta Shem wrote:
> HenHanna <HenHanna@devnull.tb> writes:
>
>> On 2/2/2024 7:52 AM, Julieta Shem wrote:
>
> [...]
>
>>> (*) Alan Bawden
>>> Hey, Alan! I didn't know who you were. (I like not to know who I'm
>>> talking to.) The document spoke very highly of you. It first mentions
>>> you were in the Commmon Lisp Group and eventually calls you a
>>> backquote-meister. Impressive!
>>> The backquote syntax was particularly powerful when nested. This
>>> occurred primarily within macro-defining macros; because such were
>>> coded primarily by wizards, the ability to write and interpret nested
>>> backquote expressions was soon surrounded by a certain mystique. Alan
>>> Bawden of MIT acquired a particular reputation as backquote-meister in
>>> the early days of the Lisp Machine.
>>> We also learned about synctatic closures. Very cool.
>>
>>
>> yes, he is the backquote-meister --- Checkout his paper on it.
>
> (It's great to have the experts around.)
>
> There are so many papers. I suppose you mean
>
> Bawden, Alan. ``Quasiquotation in Lisp.'' PEPM, 1999.
>
> Thanks.

yes. i think that's the one....
i think there are 2 PDF versions (floating around).

_________________________the following Backquotes aren't really nested.

(define-macro (ave x)
`(/ (+ ,@ (map (lambda (n) `(+ ,@ (make-list n 1))) (cadr x)))
(+ ,@ (map (lambda (n) 1) (cadr x)))))

(print (ave '(1)))
(print (ave '(1 2 3)))

gosh> (macroexpand '(ave '(1 2 3)))
==> (/ (+ (+ 1) (+ 1 1) (+ 1 1 1)) (+ 1 1 1))

Subject: (lambda (x) (list (car x) (length x))) using Cut or Cute?
From: HenHanna
Newsgroups: comp.lang.scheme, comp.lang.lisp
Organization: A noiseless patient Spider
Date: Thu, 11 Jul 2024 09:30 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: HenHanna@devnull.tb (HenHanna)
Newsgroups: comp.lang.scheme,comp.lang.lisp
Subject: (lambda (x) (list (car x) (length x))) using Cut or Cute?
Date: Thu, 11 Jul 2024 02:30:37 -0700
Organization: A noiseless patient Spider
Lines: 7
Message-ID: <v6o8nv$2d5j8$1@dont-email.me>
References: <v45dl4$3s5s5$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 11 Jul 2024 11:30:39 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="5997fecf5cbee109c90816f0e589a653";
logging-data="2528872"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+5QGIntX/Fy61CAlkrb9jNsbThmghMuU8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:6G0dx7vHspFB5ZaNN9i+Bwbhdow=
In-Reply-To: <v45dl4$3s5s5$2@dont-email.me>
Content-Language: en-US
View all headers

There's no way to write

  (lambda (x) (list (car x) (length x)))

       using Cut or Cute ???

Subject: Re: (lambda (x) (list (car x) (length x))) using Cut or Cute?
From: Kaz Kylheku
Newsgroups: comp.lang.scheme, comp.lang.lisp
Organization: A noiseless patient Spider
Date: Thu, 11 Jul 2024 10:13 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 643-408-1753@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.scheme,comp.lang.lisp
Subject: Re: (lambda (x) (list (car x) (length x))) using Cut or Cute?
Date: Thu, 11 Jul 2024 10:13:50 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <20240711030229.170@kylheku.com>
References: <v45dl4$3s5s5$2@dont-email.me> <v6o8nv$2d5j8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 11 Jul 2024 12:13:51 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="1c1b3c01db2e58828e57902abb355a3e";
logging-data="2539091"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rX8nYY+jBmG5Ru0O7G+cXURkYwmdfY3Y="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:WtCERu+061tyKygmWWGVS+QpDGU=
View all headers

On 2024-07-11, HenHanna <HenHanna@devnull.tb> wrote:
>
> There's no way to write
>
>   (lambda (x) (list (car x) (length x)))
>
>        using Cut or Cute ???

That's more of a job for a jig called juxt:

This is the TXR Lisp interactive listener of TXR 294.
Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet.
TXR's car insurance now offers cdr coverage for bumper-to-bumper
protection.
1> [juxt car length]
#<intrinsic fun: 0 param + variadic>
2> [*1 '(1 2 3)]
(1 3)
3> [*1 '(1 2 3 4 5 6)]
(1 6)

juxt takes functions as its arguments and returns a function.
When that function is invoked, it passes its argument to each
of the child functions, and returns a list of the values.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

1

rocksolid light 0.9.8
clearnet tor