unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Lisp anime video
@ 2021-08-29  5:28 Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29  5:30 ` Emanuel Berg via Users list for the GNU Emacs text editor
                   ` (2 more replies)
  0 siblings, 3 replies; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-29  5:28 UTC (permalink / raw)
  To: help-gnu-emacs

https://www.youtube.com/watch?v=a0YrCABCOEY

I wonder who made it? And why?

Is there really a "cudder"?

And that code for factorial doesn't work, at least not
in Elisp.

Close tho,

(defun fac (n)
  (if (> n 1)
      (* n (fac (1- n)))
    1) )

(fac 10) ; 3 628 800

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29  5:28 Lisp anime video Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-29  5:30 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29  5:43 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29  7:40 ` tomas
  2 siblings, 0 replies; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-29  5:30 UTC (permalink / raw)
  To: help-gnu-emacs

> I wonder who made it? And why?

The name SICP leads to "Structure and Interpretation of
Computer Programs".

https://en.wikipedia.org/wiki/Structure_and_Interpretation_of_Computer_Programs

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29  5:28 Lisp anime video Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29  5:30 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-29  5:43 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29  7:40 ` tomas
  2 siblings, 0 replies; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-29  5:43 UTC (permalink / raw)
  To: help-gnu-emacs

> Is there really a "cudder"?
>
> And that code for factorial doesn't work, at least not
> in Elisp.

Is that Scheme?

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29  5:28 Lisp anime video Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29  5:30 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29  5:43 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-29  7:40 ` tomas
  2021-08-29  8:11   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29  8:14   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2 siblings, 2 replies; 54+ messages in thread
From: tomas @ 2021-08-29  7:40 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 277 bytes --]

On Sun, Aug 29, 2021 at 07:28:18AM +0200, Emanuel Berg via Users list for the GNU Emacs text editor wrote:
> https://www.youtube.com/watch?v=a0YrCABCOEY
> 
> I wonder who made it? And why?
> 
> Is there really a "cudder"?

That's a cuter name for `cdr'

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29  7:40 ` tomas
@ 2021-08-29  8:11   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29 10:00     ` tomas
  2021-08-29 11:01     ` Philip Kaludercic
  2021-08-29  8:14   ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 2 replies; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-29  8:11 UTC (permalink / raw)
  To: help-gnu-emacs

tomas wrote:

>> Is there really a "cudder"?
>
> That's a cuter name for `cdr'

Let me guess, a cuter name for `cddr' is cuddder?

But anyway, the source still doesn't work.

You can do it like this tho

;; this file:
;;   https://dataswamp.org/~incal/scheme/fac.scm

(define (fac n)
  (if (> n 1)
      (* n (fac (- n 1)))
    1) )

(fac 10) ; 3 628 800

with MIT/GNU Scheme. Do (load "fac.scm") after 'scheme' in the
shell. The interpreter is in the mit-scheme Debian package.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29  7:40 ` tomas
  2021-08-29  8:11   ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-29  8:14   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29  8:25     ` Omar Polo
                       ` (2 more replies)
  1 sibling, 3 replies; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-29  8:14 UTC (permalink / raw)
  To: help-gnu-emacs

tomas wrote:

>> Is there really a "cudder"?
>
> That's a cuter name for `cdr'

What does lambda-eval-apply refer to? Is that a lispy combo
I've overlooked?

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29  8:14   ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-29  8:25     ` Omar Polo
  2021-09-04 10:52       ` Wayne Harris via Users list for the GNU Emacs text editor
  2021-08-29 10:03     ` tomas
  2021-08-29 15:07     ` Arthur Miller
  2 siblings, 1 reply; 54+ messages in thread
From: Omar Polo @ 2021-08-29  8:25 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs


Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes:

> tomas wrote:
>
>>> Is there really a "cudder"?
>>
>> That's a cuter name for `cdr'
>
> What does lambda-eval-apply refer to? Is that a lispy combo
> I've overlooked?

I guess it's just some random lisp terminology (yes, it's not only tied
to lisp, but it's a distinctive tract of the language IMHO)

I found the video funny thought, thanks for sharing :)



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29  8:11   ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-29 10:00     ` tomas
  2021-08-29 10:57       ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29 11:01     ` Philip Kaludercic
  1 sibling, 1 reply; 54+ messages in thread
From: tomas @ 2021-08-29 10:00 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 778 bytes --]

On Sun, Aug 29, 2021 at 10:11:30AM +0200, Emanuel Berg via Users list for the GNU Emacs text editor wrote:
> tomas wrote:
> 
> >> Is there really a "cudder"?
> >
> > That's a cuter name for `cdr'
> 
> Let me guess, a cuter name for `cddr' is cuddder?
> 
> But anyway, the source still doesn't work.

What do you mean by "doesn't work"? You're by now for long in
the business to know that "doesn't work" doesn't work :)

> You can do it like this tho
> 
> ;; this file:
> ;;   https://dataswamp.org/~incal/scheme/fac.scm
> 
> (define (fac n)
>   (if (> n 1)
>       (* n (fac (- n 1)))
>     1) )
> 
> (fac 10) ; 3 628 800

That looks for me like a pretty reasonable value for (fac 10).
Actually, more reasonable that any other value?

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29  8:14   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29  8:25     ` Omar Polo
@ 2021-08-29 10:03     ` tomas
  2021-08-29 15:07     ` Arthur Miller
  2 siblings, 0 replies; 54+ messages in thread
From: tomas @ 2021-08-29 10:03 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

On Sun, Aug 29, 2021 at 10:14:06AM +0200, Emanuel Berg via Users list for the GNU Emacs text editor wrote:
> tomas wrote:
> 
> >> Is there really a "cudder"?
> >
> > That's a cuter name for `cdr'
> 
> What does lambda-eval-apply refer to? Is that a lispy combo
> I've overlooked?

Do yourself and all of us a favour and go read SICP. The PDF should be
online (start, e.g. here [1]). It's a very enjoyable read and you'll
understand the video (thanks for the link, the video is cute :)

Cheers
[1] https://en.wikipedia.org/wiki/SICP
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29 10:00     ` tomas
@ 2021-08-29 10:57       ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29 12:06         ` tomas
  0 siblings, 1 reply; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-29 10:57 UTC (permalink / raw)
  To: help-gnu-emacs

tomas wrote:

>> ;; this file:
>> ;;   https://dataswamp.org/~incal/scheme/fac.scm
>> 
>> (define (fac n)
>>   (if (> n 1)
>>       (* n (fac (- n 1)))
>>     1) )
>> 
>> (fac 10) ; 3 628 800
>
> That looks for me like a pretty reasonable value for (fac
> 10). Actually, more reasonable that any other value?

Yes, but I wrote that. In the video they show another piece of
code which doesn't work in MIT/GNU Scheme what I can see.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29  8:11   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29 10:00     ` tomas
@ 2021-08-29 11:01     ` Philip Kaludercic
  2021-08-29 17:42       ` [External] : " Drew Adams
                         ` (2 more replies)
  1 sibling, 3 replies; 54+ messages in thread
From: Philip Kaludercic @ 2021-08-29 11:01 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> tomas wrote:
>
>>> Is there really a "cudder"?
>>
>> That's a cuter name for `cdr'
>
> Let me guess, a cuter name for `cddr' is cuddder?

I think the recorded SICP lectures from 1986 mention how they used to
pronounce c[ad]*r functions.

-- 
	Philip Kaludercic



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29 10:57       ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-29 12:06         ` tomas
  2021-08-29 15:44           ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 54+ messages in thread
From: tomas @ 2021-08-29 12:06 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 872 bytes --]

On Sun, Aug 29, 2021 at 12:57:15PM +0200, Emanuel Berg via Users list for the GNU Emacs text editor wrote:
> tomas wrote:
> 
> >> ;; this file:
> >> ;;   https://dataswamp.org/~incal/scheme/fac.scm
> >> 
> >> (define (fac n)
> >>   (if (> n 1)
> >>       (* n (fac (- n 1)))
> >>     1) )
> >> 
> >> (fac 10) ; 3 628 800
> >
> > That looks for me like a pretty reasonable value for (fac
> > 10). Actually, more reasonable that any other value?
> 
> Yes, but I wrote that. In the video they show another piece of
> code which doesn't work in MIT/GNU Scheme what I can see.

So the difference is (1- n) vs (- n 1)? Why don't you say that,
instead of letting people find out?

Perhaps the function `1-' is just missing in "your" Scheme. You
can have it with

  (def (1- n) (- n 1))

if you want :)

Note: Guile knows about `1-'.

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29  8:14   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29  8:25     ` Omar Polo
  2021-08-29 10:03     ` tomas
@ 2021-08-29 15:07     ` Arthur Miller
  2 siblings, 0 replies; 54+ messages in thread
From: Arthur Miller @ 2021-08-29 15:07 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes:

> tomas wrote:
>
>>> Is there really a "cudder"?
>>
>> That's a cuter name for `cdr'
>
> What does lambda-eval-apply refer to? Is that a lispy combo
> I've overlooked?

You might wish to look in this book for some early Lisp history, among why car/cdr etc:

https://github.com/amno1/as-powerful-as-possible



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29 12:06         ` tomas
@ 2021-08-29 15:44           ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29 16:04             ` tomas
  0 siblings, 1 reply; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-29 15:44 UTC (permalink / raw)
  To: help-gnu-emacs

tomas wrote:

>> Yes, but I wrote that. In the video they show another piece
>> of code which doesn't work in MIT/GNU Scheme what
>> I can see.
>
> So the difference is (1- n) vs (- n 1)? Why don't you say
> that, instead of letting people find out? [...] Note: Guile
> knows about `1-'.

Here is a screenshot of the code from the video:

  https://dataswamp.org/~incal/scheme/lisp-maybe.png

What I can see, it says exactly

(cond (=1 n)
  (* n
     (fac (- n
             1))
  n)

which doesn't work in MIT/GNU Scheme or GNU Guile.

$ scheme --version
MIT/GNU Scheme microcode 15.3
Copyright (C) 2019 Massachusetts Institute of Technology
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

Image saved on Wednesday June 10, 2020 at 2:59:57 PM
  Release 10.1.11   || Microcode 15.3 || Runtime 15.7 || SF 4.41
  LIAR/x86-64 4.118
Ceterum censeo Carthaginem esse delendam.

$ guile --version
guile (GNU Guile) 3.0.5
Packaged by Debian (3.0.5-deb+3.0.5-4)
Copyright (C) 2021 Free Software Foundation, Inc.

License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29 15:44           ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-29 16:04             ` tomas
  2021-08-29 16:10               ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 54+ messages in thread
From: tomas @ 2021-08-29 16:04 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 812 bytes --]

On Sun, Aug 29, 2021 at 05:44:47PM +0200, Emanuel Berg via Users list for the GNU Emacs text editor wrote:
> tomas wrote:
> 
> >> Yes, but I wrote that. In the video they show another piece
> >> of code which doesn't work in MIT/GNU Scheme what
> >> I can see.
> >
> > So the difference is (1- n) vs (- n 1)? Why don't you say
> > that, instead of letting people find out? [...] Note: Guile
> > knows about `1-'.
> 
> Here is a screenshot of the code from the video:
> 
>   https://dataswamp.org/~incal/scheme/lisp-maybe.png
> 
> What I can see, it says exactly
> 
> (cond (=1 n)
>   (* n
>      (fac (- n
>              1))
>   n)
> 
> which doesn't work in MIT/GNU Scheme or GNU Guile.

This looks somehow garbled. Cond doesn't work like
that. But I give up for now.

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29 16:04             ` tomas
@ 2021-08-29 16:10               ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-29 16:10 UTC (permalink / raw)
  To: help-gnu-emacs

tomas wrote:

>> Here is a screenshot of the code from the video:
>> 
>>   https://dataswamp.org/~incal/scheme/lisp-maybe.png
>> 
>> What I can see, it says exactly
>> 
>> (cond (=1 n)
>>   (* n
>>      (fac (- n
>>              1))
>>   n)
>> 
>> which doesn't work in MIT/GNU Scheme or GNU Guile.
>
> This looks somehow garbled. Cond doesn't work like
> that. But I give up for now.

Strange mistake for this kind of video, don't you think?

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* RE: [External] : Re: Lisp anime video
  2021-08-29 11:01     ` Philip Kaludercic
@ 2021-08-29 17:42       ` Drew Adams
  2021-08-29 17:44         ` Drew Adams
                           ` (2 more replies)
  2021-08-29 17:42       ` Drew Adams
  2021-09-04 10:49       ` Wayne Harris via Users list for the GNU Emacs text editor
  2 siblings, 3 replies; 54+ messages in thread
From: Drew Adams @ 2021-08-29 17:42 UTC (permalink / raw)
  To: Philip Kaludercic, help-gnu-emacs@gnu.org

> I think the recorded SICP lectures from 1986 mention
> how they used to pronounce c[ad]*r functions.

Used to?  How else to read Lisp out loud? ;-)

I thing I've pointed this list (and emacs-devel)
to the videos of those lectures, maybe more than
once.  You won't get a better presentation about
programming or Lisp, IMO.  A worthwhile help in
learning, at all levels (though no substitute for
practice, of course).

Starts from scratch - zero knowledge of programming.
(But some of the examples are helped by some minimal
math.)  The course is the intro course on "Computer
Science" at MIT.  The text for the course was SICP -
soon thereafter to become the text for courses on
many campuses.

Here are links to the lecture videos.  I recommend
using the YouTube ones, because you have more control
over the pace etc.  You can turn on captioning, see a
full transcript, and, most of all, speed things up
(several speeds, from slower than normal up to twice
normal - all with perfectly understandable sound.

For example, when you feel you know some details of
code being written on the blackboard and what's said
about it, you might want to go to speed 1.25, 1.5,
or 1.75x.  And you can of course repeat something
that you find a bit tricky to grasp on the fly.
There's a _lot_ in this course.

I recommend the entire series: 20 lectures.  But
even just the first lecture is worth it, no matter
how familiar you think you are with programming or
Lisp.  Bon fin de weekend !  Enjoy.

And yes, it's Scheme, which has only lexical binding
(except for top-level constructs like `define'), and
which is a Lisp-1, not a Lisp-2 (so no `symbol-value'
vs `symbol-function', and no `funcall').

Series videos hosted by MIT:

https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/video-lectures/

Series videos on YouTube - Lecture 1A (links to
follow-up lectures are on the same page etc.):

https://www.youtube.com/watch?v=-J_xL4IGhJA




^ permalink raw reply	[flat|nested] 54+ messages in thread

* RE: [External] : Re: Lisp anime video
  2021-08-29 11:01     ` Philip Kaludercic
  2021-08-29 17:42       ` [External] : " Drew Adams
@ 2021-08-29 17:42       ` Drew Adams
  2021-09-04 10:49       ` Wayne Harris via Users list for the GNU Emacs text editor
  2 siblings, 0 replies; 54+ messages in thread
From: Drew Adams @ 2021-08-29 17:42 UTC (permalink / raw)
  To: Philip Kaludercic, help-gnu-emacs@gnu.org

> I think the recorded SICP lectures from 1986 mention how they used to
> pronounce c[ad]*r functions.

Yes, talking about code out loud, with no black/whiteboard
or terminal, i.e., doing code in collective heads, there
were (are) pronunciations for various car-cdr combinations:
cadr, caddr, cadar, etc.



^ permalink raw reply	[flat|nested] 54+ messages in thread

* RE: [External] : Re: Lisp anime video
  2021-08-29 17:42       ` [External] : " Drew Adams
@ 2021-08-29 17:44         ` Drew Adams
  2021-08-30 22:59           ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-29 18:03         ` Philip Kaludercic
  2021-08-30  0:19         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2 siblings, 1 reply; 54+ messages in thread
From: Drew Adams @ 2021-08-29 17:44 UTC (permalink / raw)
  To: Drew Adams, Philip Kaludercic, help-gnu-emacs@gnu.org

> I thing I've pointed this list (and emacs-devel)

  s/thing/think



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [External] : Re: Lisp anime video
  2021-08-29 17:42       ` [External] : " Drew Adams
  2021-08-29 17:44         ` Drew Adams
@ 2021-08-29 18:03         ` Philip Kaludercic
  2021-08-29 18:05           ` Drew Adams
  2021-08-30  0:19         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2 siblings, 1 reply; 54+ messages in thread
From: Philip Kaludercic @ 2021-08-29 18:03 UTC (permalink / raw)
  To: Drew Adams; +Cc: help-gnu-emacs@gnu.org

Drew Adams <drew.adams@oracle.com> writes:

>> I think the recorded SICP lectures from 1986 mention
>> how they used to pronounce c[ad]*r functions.
>
> Used to?  How else to read Lisp out loud? ;-)

I don't get the opportunity to do so. At least without talking out loud
with myself ^^

-- 
	Philip Kaludercic



^ permalink raw reply	[flat|nested] 54+ messages in thread

* RE: [External] : Re: Lisp anime video
  2021-08-29 18:03         ` Philip Kaludercic
@ 2021-08-29 18:05           ` Drew Adams
  0 siblings, 0 replies; 54+ messages in thread
From: Drew Adams @ 2021-08-29 18:05 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: help-gnu-emacs@gnu.org

> >> I think the recorded SICP lectures from 1986 mention
> >> how they used to pronounce c[ad]*r functions.
> >
> > Used to?  How else to read Lisp out loud? ;-)
> 
> I don't get the opportunity to do so. At least without talking out loud
> with myself ^^

That in itself might be interesting. ;-)



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [External] : Re: Lisp anime video
  2021-08-29 17:42       ` [External] : " Drew Adams
  2021-08-29 17:44         ` Drew Adams
  2021-08-29 18:03         ` Philip Kaludercic
@ 2021-08-30  0:19         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-30 11:57           ` Marcin Borkowski
  2 siblings, 1 reply; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-30  0:19 UTC (permalink / raw)
  To: help-gnu-emacs

Drew Adams wrote:

> Here are links to the lecture videos. I recommend using the
> YouTube ones, because you have more control over the pace
> etc.

You are probably the first person to ever say anything like
that, and I have to agree with everyone else :) that says an
even better method is to download the videos with youtube-dl
or yt-dlp. (But not the repo's version(s) - they're always
too old.)

Then you can play the files with mpv - and now we're talking
control! You can do everything - reposition the screen, zoom
in and out, take screenshots, set the
brightness/color/saturation and playback speed, inch your way
forward frame by frame, even play two videos at the same time
next to/on top of each other on the display, or create an
endless loop within the same video, perhaps around the part
where they explain recursion ... you can apply audio filters
on the fly to do normalization (e.g. if gunfire is too loud,
but talk is too silent in the original file). You can just do
so much! mpv is a fork of, but IMO cannot be compared to,
mplayer, at least not it terms of usability. It is at
another level.

And if you can't do enough it is extensible - but not with
Lisp unfortunately, but with Lua.

But thanks for the video URL ... I'll get them :)

https://dataswamp.org/~incal/conf/.zsh/dl
https://dataswamp.org/~incal/conf/.zsh/ytdl
https://dataswamp.org/~incal/conf/.zsh/movie-yt (maybe doesn't work?)
https://dataswamp.org/~incal/conf/.zsh/mpv
https://dataswamp.org/~incal/conf/mpv/input.conf

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [External] : Re: Lisp anime video
  2021-08-30  0:19         ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-30 11:57           ` Marcin Borkowski
  2021-08-30 15:13             ` Colin Baxter
  0 siblings, 1 reply; 54+ messages in thread
From: Marcin Borkowski @ 2021-08-30 11:57 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs


On 2021-08-30, at 02:19, Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:

> Then you can play the files with mpv - and now we're talking
> control! You can do everything - reposition the screen, zoom
> in and out, take screenshots, set the
> brightness/color/saturation and playback speed, inch your way
> forward frame by frame, even play two videos at the same time
> next to/on top of each other on the display, or create an
> endless loop within the same video, perhaps around the part
> where they explain recursion ... you can apply audio filters
> on the fly to do normalization (e.g. if gunfire is too loud,
> but talk is too silent in the original file). You can just do
> so much! mpv is a fork of, but IMO cannot be compared to,
> mplayer, at least not it terms of usability. It is at
> another level.
>
> And if you can't do enough it is extensible - but not with
> Lisp unfortunately, but with Lua.

You can also drive it from Emacs, btw.
https://github.com/rndusr/subed

Best,

-- 
Marcin Borkowski
http://mbork.pl



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [External] : Re: Lisp anime video
  2021-08-30 11:57           ` Marcin Borkowski
@ 2021-08-30 15:13             ` Colin Baxter
  0 siblings, 0 replies; 54+ messages in thread
From: Colin Baxter @ 2021-08-30 15:13 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: help-gnu-emacs, Emanuel Berg

>>>>> Marcin Borkowski <mbork@mbork.pl> writes:

    > On 2021-08-30, at 02:19, Emanuel Berg via Users list for the GNU
    > Emacs
    > text editor <help-gnu-emacs@gnu.org> wrote:

    >> Then you can play the files with mpv - and now we're talking
    >> control! You can do everything - reposition the screen, zoom in
    >> and out, take screenshots, set the brightness/color/saturation
    >> and playback speed, inch your way forward frame by frame, even
    >> play two videos at the same time next to/on top of each other on
    >> the display, or create an endless loop within the same video,
    >> perhaps around the part where they explain recursion ... you can
    >> apply audio filters on the fly to do normalization (e.g. if
    >> gunfire is too loud, but talk is too silent in the original
    >> file). You can just do so much! mpv is a fork of, but IMO cannot
    >> be compared to, mplayer, at least not it terms of usability. It
    >> is at another level.
    >> 
    >> And if you can't do enough it is extensible - but not with Lisp
    >> unfortunately, but with Lua.

    > You can also drive it from Emacs, btw.
    > https://github.com/rndusr/subed

I notice <https://github.com/rndusr/subed> is licensed according to the
REUSE Specification <https://reuse.software/spec/>, which I think is
favoured by the Free Software Foundation Europe. Does anyone know any
more? I know this is sort of off-topic, but I suppose a few responses
should be ok.

Best wishes,




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [External] : Re: Lisp anime video
  2021-08-29 17:44         ` Drew Adams
@ 2021-08-30 22:59           ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-31  2:14             ` Drew Adams
  2021-09-04 10:45             ` Wayne Harris via Users list for the GNU Emacs text editor
  0 siblings, 2 replies; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-08-30 22:59 UTC (permalink / raw)
  To: help-gnu-emacs

Drew Adams wrote:

>> I thing I've pointed this list (and emacs-devel)
>
>   s/thing/think

I thing we should have a video page on the Emacs Wiki.
We already have the anime Lisp video and the 20 Lisp lectures
at MIT. Now we only need <something else> as well and we're
all set :)

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* RE: [External] : Re: Lisp anime video
  2021-08-30 22:59           ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-08-31  2:14             ` Drew Adams
  2021-09-04 10:45             ` Wayne Harris via Users list for the GNU Emacs text editor
  1 sibling, 0 replies; 54+ messages in thread
From: Drew Adams @ 2021-08-31  2:14 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'

[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]

> >> I thing I've pointed this list (and emacs-devel)
> >
> >   s/thing/think
> 
> I thing we should have a video page on the Emacs Wiki.
> We already have the anime Lisp video and the 20 Lisp lectures
> at MIT. Now we only need <something else> as well and we're
> all set :)

Please. Do. Create one.

Anyone can contribute to the wiki - create pages, delete pages, edit pages.  See "How to use this site" on the SiteMap page (emacswiki.org).
___

There actually is a video page, at least one for Emacs demos and for how to create such videos: page `Emacs Screencasts'.

https://www.emacswiki.org/emacs/EmacsScreencasts

And searching for "video" shows some other pages: EMMS, W Three M Youtube, Emacs Application Framework.
___

But I think you meant a page with links to videos about using Emacs, and Lisp, and such.

For that you'd want to create a "category" page: CategoryVideo.  The front page, aka SiteMap, is essentially just links to the category pages.  You'd add link there to the CategoryVideo page.

Each wiki page typically has one or more links to category pages at its bottom, and it's in turn linked from each of those category pages. (I mean, someone added such links - nothing is automatic.)

If you want to create a category page and add it to the SiteMap page, see the note at the beginning of the SiteMap: "Please check `Comments on SiteMap' before editing this SiteMap page"  That page is here:

https://www.emacswiki.org/emacs/Comments_on_SiteMap

[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 14346 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [External] : Re: Lisp anime video
  2021-08-30 22:59           ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-08-31  2:14             ` Drew Adams
@ 2021-09-04 10:45             ` Wayne Harris via Users list for the GNU Emacs text editor
  1 sibling, 0 replies; 54+ messages in thread
From: Wayne Harris via Users list for the GNU Emacs text editor @ 2021-09-04 10:45 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> Drew Adams wrote:
>
>>> I thing I've pointed this list (and emacs-devel)
>>
>>   s/thing/think
>
> I thing we should have a video page on the Emacs Wiki.
> We already have the anime Lisp video and the 20 Lisp lectures
> at MIT. Now we only need <something else> as well and we're
                            ^^^^^^^^^

Somethink else.  Please be consistent on this mail list.

> all set :)

All good. :)




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29 11:01     ` Philip Kaludercic
  2021-08-29 17:42       ` [External] : " Drew Adams
  2021-08-29 17:42       ` Drew Adams
@ 2021-09-04 10:49       ` Wayne Harris via Users list for the GNU Emacs text editor
  2021-09-04 13:44         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2 siblings, 1 reply; 54+ messages in thread
From: Wayne Harris via Users list for the GNU Emacs text editor @ 2021-09-04 10:49 UTC (permalink / raw)
  To: help-gnu-emacs

Philip Kaludercic <philipk@posteo.net> writes:

> Emanuel Berg via Users list for the GNU Emacs text editor
> <help-gnu-emacs@gnu.org> writes:
>
>> tomas wrote:
>>
>>>> Is there really a "cudder"?
>>>
>>> That's a cuter name for `cdr'
>>
>> Let me guess, a cuter name for `cddr' is cuddder?
>
> I think the recorded SICP lectures from 1986 mention how they used to
> pronounce c[ad]*r functions.

I don't think they gave the pronunciation of cddr as an example.  I
suppose that should be something like ``cududder''.  The example that
Sussman enjoyed to give was caddr.  I still remember the smirk ---
``cadader''.




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-08-29  8:25     ` Omar Polo
@ 2021-09-04 10:52       ` Wayne Harris via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 54+ messages in thread
From: Wayne Harris via Users list for the GNU Emacs text editor @ 2021-09-04 10:52 UTC (permalink / raw)
  To: help-gnu-emacs

Omar Polo <op@omarpolo.com> writes:

> Emanuel Berg via Users list for the GNU Emacs text editor
> <help-gnu-emacs@gnu.org> writes:
>
>> tomas wrote:
>>
>>>> Is there really a "cudder"?
>>>
>>> That's a cuter name for `cdr'
>>
>> What does lambda-eval-apply refer to? Is that a lispy combo
>> I've overlooked?
>
> I guess it's just some random lisp terminology (yes, it's not only tied
> to lisp, but it's a distinctive tract of the language IMHO)

He's enjoying himself with sarcasm.  Sometimes a question is a
statement.




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-09-04 10:49       ` Wayne Harris via Users list for the GNU Emacs text editor
@ 2021-09-04 13:44         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-04 15:12           ` Wayne Harris via Users list for the GNU Emacs text editor
  2021-09-04 15:39           ` FW: [External] : " Drew Adams
  0 siblings, 2 replies; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-04 13:44 UTC (permalink / raw)
  To: help-gnu-emacs

Wayne Harris via Users list for the GNU Emacs text editor wrote:

> I don't think they gave the pronunciation of cddr as an
> example. I suppose that should be something like
> ``cududder''. The example that Sussman enjoyed to give was
> caddr. I still remember the smirk --- ``cadader''.

`cddr' and `caddr' are here (in subr.el or lisp/subr.el.gz),
but not "cadader".

In subr.el, lines 517-655, are

  caar
  cadr
  cdar
  cddr
  caaar
  caadr
  cadar
  caddr
  cdaar
  cdadr
  cddar
  cdddr
  caaaar (from here on, the docstrings buttonize `car' and `cdr')
  caaadr
  caadar
  caaddr
  cadaar
  cadadr
  caddar
  cadddr
  cdaaar
  cdaadr
  cdadar
  cdaddr
  cddaar
  cddadr
  cdddar
  cddddr

Also, what does this do?

  (declare (compiler-macro internal--compiler-macro-cXXr))

They all have it. Still the definitions are normal Lisp?
`internal--compiler-macro-cXXr' (line 503) is as well, for
that matter (not a macro with `defmacro'.) What does that
mean? You get one version when you byte-compile and one when
you don't?

Also, it says (lines 500-502)

  ;; Note: `internal--compiler-macro-cXXr' was copied from
  ;; `-compiler-macro-cXXr' in macs.el. If you amend
  ;; either one, you may want to amend the other, too.

Why have the same thing in two places?

As for CL, there are, in Elisp

  cl-caaar 
  cl-caadr 
  cl-cadar 
  cl-caddr 
  cl-cdaar 
  cl-cdadr 
  cl-cddar 
  cl-cdddr 
  cl-caaaar
  cl-caaadr
  cl-caadar
  cl-caaddr
  cl-cadaar
  cl-cadadr
  cl-caddar
  cl-cadddr
  cl-cdaaar
  cl-cdaadr
  cl-cdadar
  cl-cdaddr
  cl-cddaar
  cl-cddadr
  cl-cdddar
  cl-cddddr

They are aliases tho, 24, the original were 28, this is
because these

  caar
  cadr
  cdar
  cddr

don't have any cl- aliases.

BTW the docstrings for aliases, e.g.

  cl-caaaar is an alias for ‘caaaar’ in ‘cl-lib.el’.

is a little confusing, to mean it looks like `caaaar' is in
cl-lib.el - better

  cl-caaaar is an alias in ‘cl-lib.el’, for ‘caaaar’.

or even better

  cl-caaaar is an alias in ‘cl-lib.el’, for ‘caaaar‘ in ‘subr.el’.

GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, cairo version
1.16.0) of 2021-08-27

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-09-04 13:44         ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-04 15:12           ` Wayne Harris via Users list for the GNU Emacs text editor
  2021-09-04 22:55             ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-04 15:39           ` FW: [External] : " Drew Adams
  1 sibling, 1 reply; 54+ messages in thread
From: Wayne Harris via Users list for the GNU Emacs text editor @ 2021-09-04 15:12 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> Wayne Harris via Users list for the GNU Emacs text editor wrote:
>
>> I don't think they gave the pronunciation of cddr as an
>> example. I suppose that should be something like
>> ``cududder''. The example that Sussman enjoyed to give was
>> caddr. I still remember the smirk --- ``cadader''.
>
> `cddr' and `caddr' are here (in subr.el or lisp/subr.el.gz),
> but not "cadader".

Forgive me.  By ``cadader'' I mean just the pronunciation of caddr, not
the name of a procedure.

[...]




^ permalink raw reply	[flat|nested] 54+ messages in thread

* FW: [External] : Re: Lisp anime video
  2021-09-04 13:44         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-04 15:12           ` Wayne Harris via Users list for the GNU Emacs text editor
@ 2021-09-04 15:39           ` Drew Adams
  2021-09-04 16:31             ` Stefan Monnier via Users list for the GNU Emacs text editor
  2021-09-24  5:38             ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 2 replies; 54+ messages in thread
From: Drew Adams @ 2021-09-04 15:39 UTC (permalink / raw)
  To: 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'; +Cc: Emanuel Berg

[-- Attachment #1: Type: text/plain, Size: 307 bytes --]

https://www.cs.drexel.edu/~jpopyack/Courses/AI/Sp20/extras/LISP/CADDDR.html

where "cou" is as in the word "could".

Any pronunciation you like is fine, but it
really should differentiate things like
cddr and caddr and cadar.  IOW, in particular
it needs to distinguish things like cdr and
cdar.


[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 13430 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: FW: [External] : Re: Lisp anime video
  2021-09-04 15:39           ` FW: [External] : " Drew Adams
@ 2021-09-04 16:31             ` Stefan Monnier via Users list for the GNU Emacs text editor
  2021-09-04 17:51               ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-04 19:16               ` FW: " Drew Adams
  2021-09-24  5:38             ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 2 replies; 54+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2021-09-04 16:31 UTC (permalink / raw)
  To: help-gnu-emacs

> Any pronunciation you like is fine, but it
> really should differentiate things like
> cddr and caddr and cadar.  IOW, in particular
> it needs to distinguish things like cdr and
> cdar.

In my book, the pronounciation of those cXXXr is the least of
their problems.  They make the code hard to understand anyway.
I strongly recommend limiting oneself to cXr and cXXr, and preferring
`nth` and `nthcdr` or defining new types with `cl-defstruct` so you can
use proper names for the relevant fields.

cXXXr is Lisp's equivalent to writing assembly code IMO (tho without
the speed benefit).


        Stefan




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: FW: [External] : Re: Lisp anime video
  2021-09-04 16:31             ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2021-09-04 17:51               ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-04 19:16               ` FW: " Drew Adams
  1 sibling, 0 replies; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-04 17:51 UTC (permalink / raw)
  To: help-gnu-emacs

Stefan Monnier via Users list for the GNU Emacs text editor wrote:

>> Any pronunciation you like is fine, but it really should
>> differentiate things like cddr and caddr and cadar. IOW, in
>> particular it needs to distinguish things like cdr
>> and cdar.
>
> In my book, the pronounciation of those cXXXr is the least
> of their problems. They make the code hard to understand
> anyway. I strongly recommend limiting oneself to cXr and
> cXXr, and preferring `nth` and `nthcdr` or defining new
> types with `cl-defstruct` so you can use proper names for
> the relevant fields.

Without a doubt ...

Still there's some coolness to it ...

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* FW: FW: [External] : Re: Lisp anime video
  2021-09-04 16:31             ` Stefan Monnier via Users list for the GNU Emacs text editor
  2021-09-04 17:51               ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-04 19:16               ` Drew Adams
  1 sibling, 0 replies; 54+ messages in thread
From: Drew Adams @ 2021-09-04 19:16 UTC (permalink / raw)
  To: 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)', Stefan Monnier

[-- Attachment #1: Type: text/plain, Size: 2476 bytes --]

> > Any pronunciation you like is fine, but it
> > really should differentiate things like
> > cddr and caddr and cadar.  IOW, in particular
> > it needs to distinguish things like cdr and
> > cdar.
> 
> In my book, the pronounciation of those cXXXr is the least of
> their problems.  They make the code hard to understand anyway.
> I strongly recommend limiting oneself to cXr and cXXr, and preferring
> `nth` and `nthcdr` or defining new types with `cl-defstruct` so you can
> use proper names for the relevant fields.
> 
> cXXXr is Lisp's equivalent to writing assembly code IMO (tho without
> the speed benefit).

Yes.  (And but/no...)

Certainly, code that goes much beyond just car
and cdr, and even some code that uses car & cdr,
can typically benefit from instead using names
specific to the data or its current use.

For local naming, `let'.  For general naming,
e.g., for a global, complex structure, either
something like `defstruct' (named fields/slots)
or Lisp macros for accessing the various parts.
IOW, use names that are _meaningful for the
given context_.
___

OTOH, cXXXr patterns are just that: patterns.
With some getting used to, it's not so hard to
view their use that way.  That can (and does)
happen naturally/unconsciously.

Certainly seeing the simplest ones, such as cadr,
over and over and over makes their meaning/use
somewhat second nature.

I'm sure you don't think twice when you see cadr.
You just think "second"; you don't visualize
taking the cdr and then taking the car of that
result.  You "see" the cadr.  Your mental
processing is declarative and direct at that
point, not procedural.  Maybe the same for caddr
("third") or cadddr ("fourth").

After a while, seeing cXXXr can be essentially
the same as "seeing through" parentheses - same
idea/reflex.  Just as you can see (this bit)
within (x y z (this bit)), so you can see it as
the cadddr.

[The cons is (x . (y . (z . ((this bit) . nil)))).]

Neither "seeing through" parens nor reading
cXXXr directly are obvious, but being able to
do one is about the same as being able to do
the other, I think.

It's like driving a car or riding a bike or
playing an instrument naturally.  You don't
think, "Turn on the blinker, turn the wheel
to the left,..." - you just do it.
___

(Again, to be clear, I do _not_ advocate using
cXXXr in general - better to use helpful,
context-relevant names for specific bits of
data.)

[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 14642 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-09-04 15:12           ` Wayne Harris via Users list for the GNU Emacs text editor
@ 2021-09-04 22:55             ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-05  0:13               ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-04 22:55 UTC (permalink / raw)
  To: help-gnu-emacs

Wayne Harris via Users list for the GNU Emacs text editor wrote:

> Forgive me. By ``cadader'' I mean just the pronunciation of
> caddr, not the name of a procedure.

Yeah, well, when I read stuff and don't understand it, I don't
think it's anyone else's fault :)

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-09-04 22:55             ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-05  0:13               ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-05  1:20                 ` [External] : " Drew Adams
  2021-09-05  7:29                 ` tomas
  0 siblings, 2 replies; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-05  0:13 UTC (permalink / raw)
  To: help-gnu-emacs

> Yeah, well, when I read stuff and don't understand it,
> I don't think it's anyone else's fault :)

And ... another thing I don't know/understand is, what kind of
computer use/programming style is one to do with all the `car'
and `cdr'? OK, head, tail, one, rest, I get that ... but the
others, what kind of style relies on that, and why?

How did programming look then
(I don't even know how it looks now)
but I still wonder how it looked then? :)

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* RE: [External] : Re: Lisp anime video
  2021-09-05  0:13               ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-05  1:20                 ` Drew Adams
  2021-09-05  1:27                   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-05  7:29                 ` tomas
  1 sibling, 1 reply; 54+ messages in thread
From: Drew Adams @ 2021-09-05  1:20 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'

[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]

> what kind of computer use/programming style is
> one to do with all the `car' and `cdr'? OK,
> head, tail, one, rest, I get that ... but the
> others, what kind of style relies on that, and why?
> 
> How did programming look then
> (I don't even know how it looks now)
> but I still wonder how it looked then? :)

No difference, now and then, IMO.

For some structure that's important or gets
used a lot, access functions (ultimately
cars + cdrs) get defined.  Or intermediate
`let' vars get defined, or defstruct slots
are defined - for more clarity.

When that's not so important, or if someone
just doesn't care enough, they might just
use car's & cdr's, or nth's & nthcdr's.

What's clear to one person at one time
isn't necessarily so clear to someone else
or to the same person at another time.
`cadr' in some context might always be
clear to one person, but it might not be
so clear to another.

The more sharing, communication, or code
modification is needed, the more important
it can be to add names for clarity.  Lisp
is the language par excellence for defining
domain-specific languages, and that's all
about using domain-relevant names.

(But speaking of adding intermediate `let'
variable names: taken to an extreme that's
essentially assembly-language style - no
nested functional calls, etc.  Separate
assignments, one after the other after the
other after the other.  See also C etc.)

There's nothing special or mysterious about
any of this.  car & cdr are just head & tail,
and the cXXXr are just abbreviations.  Use
them or don't use them.  No magic.

In compiled code, macro access functions
don't cost anything, and neither do `let'
variables.  There's no a priori reason not
to use them.

Introducing umpteen intermediate `let' vars
can be verbose, but if someone finds that
aids, rather than hurts, clarity, then great.
What's clearer or more elegant to one person
can be less so to another.

Do what works for you and those you share
code with.

[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 14454 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [External] : Re: Lisp anime video
  2021-09-05  1:20                 ` [External] : " Drew Adams
@ 2021-09-05  1:27                   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-05 15:14                     ` Drew Adams
  0 siblings, 1 reply; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-05  1:27 UTC (permalink / raw)
  To: help-gnu-emacs

Drew Adams wrote:

> Do what works for you and those you share
> code with.

Yeah but what kind of general data is accessed? And why it is
so important?

You juggle that around so you have to have all the access
methods to extract it, from the holster, even?

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-09-05  0:13               ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-05  1:20                 ` [External] : " Drew Adams
@ 2021-09-05  7:29                 ` tomas
  2021-09-05 14:46                   ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 1 reply; 54+ messages in thread
From: tomas @ 2021-09-05  7:29 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

On Sun, Sep 05, 2021 at 02:13:38AM +0200, Emanuel Berg via Users list for the GNU Emacs text editor wrote:

[...]

> How did programming look then
> (I don't even know how it looks now)
> but I still wonder how it looked then? :)

That's [1] how programming looked back then.

That said, and jokes aside, the list srtucture (i.e. something
consisting of head (a thing) and tail (a list of things, possibly
empty), born in Lisp land, has established itself throughout many
influential programming languages (Prolog, Haskell), although
they don't tell you how it's implemented (Prolog) or prudishly
hide it behind some ADT academic talk (Haskell).

(Now please language fans: don't take anything here personally.
Consider smileys plastered over it everywhere, like this ;-P

Cheers

[1] https://xkcd.com/224/

 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-09-05  7:29                 ` tomas
@ 2021-09-05 14:46                   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-05 15:05                     ` tomas
  0 siblings, 1 reply; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-05 14:46 UTC (permalink / raw)
  To: help-gnu-emacs

tomas wrote:

> That said, and jokes aside, the list srtucture (i.e.
> something consisting of head (a thing) and tail (a list of
> things, possibly empty), born in Lisp land, has established
> itself throughout many influential programming languages
> (Prolog, Haskell), although they don't tell you how it's
> implemented (Prolog) or prudishly hide it behind some ADT
> academic talk (Haskell).

Yeah, head and tail I get, that is more related to the list
data structure and if you have that in any language then that
language should have the basic operators on that, of course.

So maybe it is that simple, not only does Lisp have a list,
Lisp is all about lists (the list processor) so then every
type of getter and setter and manipulator one could think of
were added?

And not that people were handling huge and complicated nested
data structures? Which sounds very impractical and error prone?
Only they were so skilled it still worked? With `car', `cdr',
and, literally, 28 combinations?

Or what is the reason?

> https://xkcd.com/224/

I never understood that, well, in general, but specifically,
what are "patterns and metapatterns" and how/when is it that
"we" use those?

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-09-05 14:46                   ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-05 15:05                     ` tomas
  2021-09-05 15:11                       ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-05 19:55                       ` Arthur Miller
  0 siblings, 2 replies; 54+ messages in thread
From: tomas @ 2021-09-05 15:05 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 751 bytes --]

On Sun, Sep 05, 2021 at 04:46:04PM +0200, Emanuel Berg via Users list for the GNU Emacs text editor wrote:

[...]
> Yeah, head and tail I get, that is more related to the list

[...]

> And not that people were handling huge and complicated nested
> data structures? Which sounds very impractical and error prone?
> Only they were so skilled it still worked? With `car', `cdr',
> and, literally, 28 combinations?

Never forget that a list's car can also be... a list. That's the
fun part :-)

> Or what is the reason?
> 
> > https://xkcd.com/224/
> 
> I never understood that, well, in general, but specifically,
> what are "patterns and metapatterns" and how/when is it that
> "we" use those?

All the time :)

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-09-05 15:05                     ` tomas
@ 2021-09-05 15:11                       ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-05 19:55                       ` Arthur Miller
  1 sibling, 0 replies; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-05 15:11 UTC (permalink / raw)
  To: help-gnu-emacs

tomas wrote:

>> And not that people were handling huge and complicated
>> nested data structures? Which sounds very impractical and
>> error prone? Only they were so skilled it still worked?
>> With `car', `cdr', and, literally, 28 combinations?
>
> Never forget that a list's car can also be... a list.
> That's the fun part :-)

Indeed, the universal data structure is a list (or a pair
even) ... with that you can express, store, and compute
everything and anything (that is computable).

>> I never understood that, well, in general, but
>> specifically, what are "patterns and metapatterns" and
>> how/when is it that "we" use those?
>
> All the time :)

Do tell ...

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* RE: [External] : Re: Lisp anime video
  2021-09-05  1:27                   ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-05 15:14                     ` Drew Adams
  2021-09-05 15:16                       ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 54+ messages in thread
From: Drew Adams @ 2021-09-05 15:14 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'

[-- Attachment #1: Type: text/plain, Size: 308 bytes --]

> > Do what works for you and those you share
> > code with.
> 
> Yeah but what kind of general data is accessed? And why it is
> so important?
> 
> You juggle that around so you have to have all the access
> methods to extract it, from the holster, even?

Sorry; I don't understand the questions.

[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 13630 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: [External] : Re: Lisp anime video
  2021-09-05 15:14                     ` Drew Adams
@ 2021-09-05 15:16                       ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-05 15:16 UTC (permalink / raw)
  To: help-gnu-emacs

Drew Adams wrote:

>> Yeah but what kind of general data is accessed? And why it
>> is so important?
>> 
>> You juggle that around so you have to have all the access
>> methods to extract it, from the holster, even?
>
> Sorry; I don't understand the questions.

Okay, I don't know how to put it in any other way ... anyone
understands what I mean? :)

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-09-05 15:05                     ` tomas
  2021-09-05 15:11                       ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-05 19:55                       ` Arthur Miller
  2021-09-05 21:02                         ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 1 reply; 54+ messages in thread
From: Arthur Miller @ 2021-09-05 19:55 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 875 bytes --]

<tomas@tuxteam.de> writes:

> On Sun, Sep 05, 2021 at 04:46:04PM +0200, Emanuel Berg via Users list for the GNU Emacs text editor wrote:
>
> [...]
>> Yeah, head and tail I get, that is more related to the list
>
> [...]
>
>> And not that people were handling huge and complicated nested
>> data structures? Which sounds very impractical and error prone?
>> Only they were so skilled it still worked? With `car', `cdr',
>> and, literally, 28 combinations?
>
> Never forget that a list's car can also be... a list. That's the
> fun part :-)

Indeed lists can be fun. I think it is fun that there is no explicit data
structure called list in traditional lisps, it just a way to work with conses.

By the way, I found a nice little program to show cons structures (lists) and
converted it to elisp. It is cool, looks like box drawings in early papers.

cheers

- "always angry"


[-- Attachment #2: draw-cons-tree.el --]
[-- Type: text/plain, Size: 5671 bytes --]

;;; draw-cons-tree.el Draw ascii image of a cons tree.  -*- lexical-binding: t; -*-
;; Ported from scheme to common lisp
;; http://www.t3x.org/s9fes/draw-tree.scm.html
;; It was in the public domain before so it will stay that way now.
;; Ported from common lisp to emacs lisp from
;; https://github.com/cbaggers/draw-cons-tree

;; Version: 1.0


(require 'cl-lib)

;;; Customize

(defgroup draw-cons-tree nil
  "Visualize lists as cons boxes."
  :tag "Draw cons tree"
  :prefix "draw-cons-tree-"
  :group 'tools)

(defcustom draw-cons-tree-prettify nil
  "Use box-drawing unicode characters for horizontal and vertical bars."
  :type 'boolean
  :group 'draw-cons-tree)

;;; Entry function
(defun draw-cons-tree (n)
  (cl-labels
      ((%draw-tree (n)
                   (unless (draw-cons-tree--donep n)
                     (insert "\n")
                     (draw-cons-tree--draw-bars n)
                     (insert "\n")
                     (%draw-tree (draw-cons-tree--draw-members n)))))
    (if (not (consp n))
        (draw-cons-tree--draw-atom n)
      (%draw-tree (draw-cons-tree--mark-visited
                   (draw-cons-tree--draw-conses n))))
    (insert "\n")))
\f
;;; Internal functions
;;;; Helpers

(defconst draw-cons-tree--nothing (cons 'N nil))
(defconst draw-cons-tree--visited (cons 'V nil))

(defun draw-cons-tree--mark-visited (x)
  (cons draw-cons-tree--visited x))

(defun draw-cons-tree--members-of-x (x)
  (cdr x))

(defun draw-cons-tree--emptyp (x)
  (equal x draw-cons-tree--nothing))

(defun draw-cons-tree--visitedp (x)
  (equal (car x) draw-cons-tree--visited))

(defun draw-cons-tree--donep (x) 
  (and (consp x) (draw-cons-tree--visitedp x) (null (cdr x))))

(defun draw-cons-tree--all-verticalp (n)
  (or (not (consp n))
      (and (null (cdr n))
           (draw-cons-tree--all-verticalp (car n)))))

(defun draw-cons-tree--skip-empty (n)
  (if (and (consp n)
           (or (draw-cons-tree--emptyp (car n))
               (draw-cons-tree--donep (car n))))
      (draw-cons-tree--skip-empty (cdr n))
    n))

(defun draw-cons-tree--remove-trailing-nothing (n)
  (reverse (draw-cons-tree--skip-empty (reverse n))))
\f
;;;; Drawing

(defun draw-cons-tree--draw-fixed-string (s)
  (let* ((b (make-string 8 ?\s))
         (k (length s))
         (s (if (> k 7) (cl-subseq s 0 7) s))
         (s (if (< k 3 ) (cl-concatenate 'string " " s) s))
         (k (length s)))
    (insert (cl-concatenate 'string s (cl-subseq b 0 (- 8 k))))))

(defun draw-cons-tree--draw-atom (n)
  (draw-cons-tree--draw-fixed-string (format "%s" n)))

(defun draw-cons-tree--draw-conses (n &optional r)
  (cond ((not (consp n))
         (draw-cons-tree--draw-atom n)
         (setq r (nreverse r)))
        ((null (cdr n))
         (insert "[o|/]")
         (setq r (nreverse (cons (car n) r))))
        (t
         (insert
          (if draw-cons-tree-prettify "[o|o]───" "[o|o]---"))
         (draw-cons-tree--draw-conses (cdr n) (cons (car n) r)))))

(defun draw-cons-tree--draw-bars (n)
  (cl-labels
      ((%draw-bars (n)
                   (cond ((not (consp n)))
                         ((draw-cons-tree--emptyp (car n))
                          (draw-cons-tree--draw-fixed-string "")
                          (%draw-bars (cdr n))
                          )
                         ((and (consp (car n)) (draw-cons-tree--visitedp (car n)))
                          (%draw-bars (draw-cons-tree--members-of-x (car n)))
                          (%draw-bars (cdr n)))
                         (t (draw-cons-tree--draw-fixed-string
                             (if draw-cons-tree-prettify "│" "|"))
                            (%draw-bars (cdr n))))))
    (%draw-bars (draw-cons-tree--members-of-x n))))

(defun draw-cons-tree--draw-members (n)
  (cl-labels
      ((%draw-members (n r)
                      (cond ((not (consp n))
                             (draw-cons-tree--mark-visited
                              (draw-cons-tree--remove-trailing-nothing
                               (setq r (nreverse r)))))
                            ((draw-cons-tree--emptyp (car n))
                             (draw-cons-tree--draw-fixed-string "")
                             (%draw-members (cdr n) (cons draw-cons-tree--nothing r)))
                            ((not (consp (car n)))
                             (draw-cons-tree--draw-atom (car n))
                             (%draw-members (cdr n) (cons draw-cons-tree--nothing r)))
                            ((null (cdr n))
                             (%draw-members
                              (cdr n)
                              (cons (draw-cons-tree--draw-final (car n)) r)))
                            ((draw-cons-tree--all-verticalp (car n))
                             (draw-cons-tree--draw-fixed-string "[o|/]")
                             (%draw-members (cdr n) (cons (caar n) r)))
                            (t (draw-cons-tree--draw-fixed-string
                                (if draw-cons-tree-prettify "│" "|"))
                               (%draw-members (cdr n) (cons (car n) r))))))
    (%draw-members (draw-cons-tree--members-of-x n) nil)))

(defun draw-cons-tree--draw-final (n)
  (cond ((not (consp n))
         (draw-cons-tree--draw-atom n)
         draw-cons-tree--nothing)
        ((draw-cons-tree--visitedp n)
         (draw-cons-tree--draw-members n))
        (t
         (draw-cons-tree--mark-visited (draw-cons-tree--draw-conses n)))))

(provide 'draw-cons-tree)
;;; draw-cons-tree.el end here

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-09-05 19:55                       ` Arthur Miller
@ 2021-09-05 21:02                         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-06  5:08                           ` Arthur Miller
  0 siblings, 1 reply; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-05 21:02 UTC (permalink / raw)
  To: help-gnu-emacs

Arthur Miller wrote:

> Indeed lists can be fun. I think it is fun that there is no
> explicit data structure called list in traditional lisps, it
> just a way to work with conses.

Hm ... interesting ...

There is no explicit _list data type_ in Elisp,

  (defvar  num-list nil)      ; nil
  (setq    num-list '(1 2 3)) ; (1 2 3)
  (listp   num-list)          ; t   
  (type-of num-list)          ; cons

But there is an explicit _list function_, i.e., `list', that
returns a list, made up out of (car cdr) (or cons cells)
but nonetheless ...

Does that mean there is an explicit list data structure
in Elisp? Or is it implicit?

Or is it just implicit in '(1 2 3)?

> By the way, I found a nice little program to show cons
> structures (lists) and converted it to elisp. It is cool,
> looks like box drawings in early papers.

Can it do the other thing around?

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: Lisp anime video
  2021-09-05 21:02                         ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-06  5:08                           ` Arthur Miller
  0 siblings, 0 replies; 54+ messages in thread
From: Arthur Miller @ 2021-09-06  5:08 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes:

> Arthur Miller wrote:
>
>> Indeed lists can be fun. I think it is fun that there is no
>> explicit data structure called list in traditional lisps, it
>> just a way to work with conses.
>
> Hm ... interesting ...
>
> There is no explicit _list data type_ in Elisp,
>
>   (defvar  num-list nil)      ; nil
>   (setq    num-list '(1 2 3)) ; (1 2 3)
>   (listp   num-list)          ; t   
>   (type-of num-list)          ; cons
>
> But there is an explicit _list function_, i.e., `list', that
> returns a list, made up out of (car cdr) (or cons cells)
> but nonetheless ...
>
> Does that mean there is an explicit list data structure
> in Elisp? Or is it implicit?
Cons is an explicit data structure, so is vector, hash table etc.

Linked list is a bunch of nodes (conses) that form a list by data stored in
them. But yes it is a diffuse line. I guess only truly explicit data in a CPU is
a register.

> Or is it just implicit in '(1 2 3)?
>
>> By the way, I found a nice little program to show cons
>> structures (lists) and converted it to elisp. It is cool,
>> looks like box drawings in early papers.
>
> Can it do the other thing around?

It is left for you as an exercise to make it ;)



^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: FW: [External] : Re: Lisp anime video
  2021-09-04 15:39           ` FW: [External] : " Drew Adams
  2021-09-04 16:31             ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2021-09-24  5:38             ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-24  6:53               ` tomas
  1 sibling, 1 reply; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-24  5:38 UTC (permalink / raw)
  To: help-gnu-emacs

Drew Adams wrote:

> https://www.cs.drexel.edu/~jpopyack/Courses/AI/Sp20/extras/LISP/CADDDR.html
>
> where "cou" is as in the word "could"

Cool site!

I think `car' and `cdr' are cool but it isn't obvious what the
rest is for, `nth' and other methods are better for them.

`cadr' etc is like having not only `max' but "maax" (or
something similar) for the 2nd biggest element ...

But not saying they should be removed or anything ...

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: FW: [External] : Re: Lisp anime video
  2021-09-24  5:38             ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-24  6:53               ` tomas
  2021-09-24  7:30                 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 54+ messages in thread
From: tomas @ 2021-09-24  6:53 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

On Fri, Sep 24, 2021 at 07:38:57AM +0200, Emanuel Berg via Users list for the GNU Emacs text editor wrote:
> Drew Adams wrote:
> 
> > https://www.cs.drexel.edu/~jpopyack/Courses/AI/Sp20/extras/LISP/CADDDR.html
> >
> > where "cou" is as in the word "could"
> 
> Cool site!
> 
> I think `car' and `cdr' are cool but it isn't obvious what the
> rest is for, `nth' and other methods are better for them.

OTOH they are a very tangible hint at the sad fact that
access times are O(n). The function's name's length is
roughly proportional to the computational price paid by
your users.

IOW, if you find yourself writing "cdddddddddddddddddr"
all to often, you might want to rethink your strategy :)

Cheers

[0] Yeah, I know "cdddddddddddddddddr" isn't "official
   API".

 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: FW: [External] : Re: Lisp anime video
  2021-09-24  6:53               ` tomas
@ 2021-09-24  7:30                 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-24 16:39                   ` Drew Adams
  0 siblings, 1 reply; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-24  7:30 UTC (permalink / raw)
  To: help-gnu-emacs

tomas wrote:

> OTOH they are a very tangible hint at the sad fact that
> access times are O(n). The function's name's length is
> roughly proportional to the computational price paid by
> your users.

People say that Elisp is slow and thinking of all functions
like `abbrev--suggest-get-active-tables-including-parents'
that seems to be true indeed!

We should start shortening the syntax immediately!

> Yeah, I know "cdddddddddddddddddr" isn't "official API".

`cddddr' is the longest I think ...

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* RE: FW: [External] : Re: Lisp anime video
  2021-09-24  7:30                 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-24 16:39                   ` Drew Adams
  2021-09-24 17:03                     ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 54+ messages in thread
From: Drew Adams @ 2021-09-24 16:39 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

> > Yeah, I know "cdddddddddddddddddr" isn't "official API".
> `cddddr' is the longest I think ...

(defun cdddddddddddddddddr (list)
  "Return the 17th cdr of LIST."
  (nthcdr 17 list))

or

(defun cdddddddddddddddddr (list)
  "Return the 17th cdr of LIST."
  (declare (compiler-macro internal--compiler-macro-cXXr))
  (cddddr (cddddr (cddddr (cddddr (cdr list))))))


(setq foo '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19))
(cdddddddddddddddddr foo)

[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 13526 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

* Re: FW: [External] : Re: Lisp anime video
  2021-09-24 16:39                   ` Drew Adams
@ 2021-09-24 17:03                     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-24 18:44                       ` Drew Adams
  0 siblings, 1 reply; 54+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-24 17:03 UTC (permalink / raw)
  To: help-gnu-emacs

Drew Adams wrote:

>>> Yeah, I know "cdddddddddddddddddr" isn't "official API".
>>
>> `cddddr' is the longest I think ...
>
> (defun cdddddddddddddddddr (list)
>   "Return the 17th cdr of LIST."
>   (nthcdr 17 list))
>
> or
>
> (defun cdddddddddddddddddr (list)
>   "Return the 17th cdr of LIST."
>   (declare (compiler-macro internal--compiler-macro-cXXr))
>   (cddddr (cddddr (cddddr (cddddr (cdr list))))))
>
> (setq foo '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19))
> (cdddddddddddddddddr foo)

It seems "cdddddddddddddddddr" is theoretically as well as
practically possible however it also seems to hold that it
isn't in the official API - perhaps report a bug with your
code so they will add it to the next Emacs ...

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 54+ messages in thread

* RE: FW: [External] : Re: Lisp anime video
  2021-09-24 17:03                     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-24 18:44                       ` Drew Adams
  0 siblings, 0 replies; 54+ messages in thread
From: Drew Adams @ 2021-09-24 18:44 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: 'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'

[-- Attachment #1: Type: text/plain, Size: 243 bytes --]

> It seems "cdddddddddddddddddr" is theoretically as well as
> practically possible however it also seems to hold that it
> isn't in the official API - perhaps report a bug with your
> code so they will add it to the next Emacs ...

;-)

[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 13378 bytes --]

^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2021-09-24 18:44 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-29  5:28 Lisp anime video Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29  5:30 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29  5:43 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29  7:40 ` tomas
2021-08-29  8:11   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 10:00     ` tomas
2021-08-29 10:57       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 12:06         ` tomas
2021-08-29 15:44           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 16:04             ` tomas
2021-08-29 16:10               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 11:01     ` Philip Kaludercic
2021-08-29 17:42       ` [External] : " Drew Adams
2021-08-29 17:44         ` Drew Adams
2021-08-30 22:59           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-31  2:14             ` Drew Adams
2021-09-04 10:45             ` Wayne Harris via Users list for the GNU Emacs text editor
2021-08-29 18:03         ` Philip Kaludercic
2021-08-29 18:05           ` Drew Adams
2021-08-30  0:19         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-30 11:57           ` Marcin Borkowski
2021-08-30 15:13             ` Colin Baxter
2021-08-29 17:42       ` Drew Adams
2021-09-04 10:49       ` Wayne Harris via Users list for the GNU Emacs text editor
2021-09-04 13:44         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-04 15:12           ` Wayne Harris via Users list for the GNU Emacs text editor
2021-09-04 22:55             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05  0:13               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05  1:20                 ` [External] : " Drew Adams
2021-09-05  1:27                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05 15:14                     ` Drew Adams
2021-09-05 15:16                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05  7:29                 ` tomas
2021-09-05 14:46                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05 15:05                     ` tomas
2021-09-05 15:11                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05 19:55                       ` Arthur Miller
2021-09-05 21:02                         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-06  5:08                           ` Arthur Miller
2021-09-04 15:39           ` FW: [External] : " Drew Adams
2021-09-04 16:31             ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-09-04 17:51               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-04 19:16               ` FW: " Drew Adams
2021-09-24  5:38             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-24  6:53               ` tomas
2021-09-24  7:30                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-24 16:39                   ` Drew Adams
2021-09-24 17:03                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-24 18:44                       ` Drew Adams
2021-08-29  8:14   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29  8:25     ` Omar Polo
2021-09-04 10:52       ` Wayne Harris via Users list for the GNU Emacs text editor
2021-08-29 10:03     ` tomas
2021-08-29 15:07     ` Arthur Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).