unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* `max-specpdl-size' and `max-lisp-eval-depth'
@ 2021-09-26  1:48 Hongyi Zhao
  2021-09-26  2:36 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-26  3:53 ` [External] : " Drew Adams
  0 siblings, 2 replies; 22+ messages in thread
From: Hongyi Zhao @ 2021-09-26  1:48 UTC (permalink / raw)
  To: help-gnu-emacs

I noticed the following messages triggered frequently by Emacs:

File mode specification error: (error Variable binding depth exceeds
max-specpdl-size)
Emacs: nesting exceeds `max-lisp-eval-depth'

Any hints/suggestions or rule of thumb to set these variables?

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-26  1:48 `max-specpdl-size' and `max-lisp-eval-depth' Hongyi Zhao
@ 2021-09-26  2:36 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-26  6:33   ` Hongyi Zhao
  2021-09-26  3:53 ` [External] : " Drew Adams
  1 sibling, 1 reply; 22+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-26  2:36 UTC (permalink / raw)
  To: help-gnu-emacs

Hongyi Zhao wrote:

> I noticed the following messages triggered frequently by
> Emacs:
>
> File mode specification error: (error Variable binding depth
> exceeds max-specpdl-size) Emacs: nesting exceeds
> `max-lisp-eval-depth'
>
> Any hints/suggestions or rule of thumb to set
> these variables?

Infinite loop/recursion ...

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




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

* RE: [External] : `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-26  1:48 `max-specpdl-size' and `max-lisp-eval-depth' Hongyi Zhao
  2021-09-26  2:36 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-26  3:53 ` Drew Adams
  2021-09-26  4:09   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-26  7:09   ` [External] : `max-specpdl-size' and `max-lisp-eval-depth' Hongyi Zhao
  1 sibling, 2 replies; 22+ messages in thread
From: Drew Adams @ 2021-09-26  3:53 UTC (permalink / raw)
  To: Hongyi Zhao, help-gnu-emacs

> I noticed the following messages triggered frequently by Emacs:
> 
> File mode specification error: (error Variable binding depth exceeds
> max-specpdl-size)
> Emacs: nesting exceeds `max-lisp-eval-depth'
> 
> Any hints/suggestions or rule of thumb to set these variables?

You generally shouldn't need to change them.
You're likely coding an infinite recursion, so
the stack overflows.  Check your code - or
narrow the problem down to some bit of code
and post it here, if you can't see how/why
you've cause an infinite recursion.

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

* Re: [External] : `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-26  3:53 ` [External] : " Drew Adams
@ 2021-09-26  4:09   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-28  3:45     ` Google vi (was: Re: [External] : `max-specpdl-size' and `max-lisp-eval-depth') Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-26  7:09   ` [External] : `max-specpdl-size' and `max-lisp-eval-depth' Hongyi Zhao
  1 sibling, 1 reply; 22+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-26  4:09 UTC (permalink / raw)
  To: help-gnu-emacs

Drew Adams wrote:

>> I noticed the following messages triggered frequently by
>> Emacs:
>> 
>> File mode specification error: (error Variable binding
>> depth exceeds max-specpdl-size) Emacs: nesting exceeds
>> `max-lisp-eval-depth'
>> 
>> Any hints/suggestions or rule of thumb to set
>> these variables?
>
> You generally shouldn't need to change them. You're likely
> coding an infinite recursion, so the stack overflows.
> Check your code - or narrow the problem down to some bit of
> code and post it here, if you can't see how/why you've cause
> an infinite recursion.

Or google "recursion"...

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




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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-26  2:36 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-26  6:33   ` Hongyi Zhao
  2021-09-26  7:13     ` tomas
  0 siblings, 1 reply; 22+ messages in thread
From: Hongyi Zhao @ 2021-09-26  6:33 UTC (permalink / raw)
  To: Emanuel Berg, help-gnu-emacs

On Sun, Sep 26, 2021 at 10:37 AM Emanuel Berg via Users list for the
GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
>
> Hongyi Zhao wrote:
>
> > I noticed the following messages triggered frequently by
> > Emacs:
> >
> > File mode specification error: (error Variable binding depth
> > exceeds max-specpdl-size) Emacs: nesting exceeds
> > `max-lisp-eval-depth'
> >
> > Any hints/suggestions or rule of thumb to set
> > these variables?
>
> Infinite loop/recursion ...

What's the meaning of `specpdl'?

HZ



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

* Re: [External] : `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-26  3:53 ` [External] : " Drew Adams
  2021-09-26  4:09   ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-26  7:09   ` Hongyi Zhao
  1 sibling, 0 replies; 22+ messages in thread
From: Hongyi Zhao @ 2021-09-26  7:09 UTC (permalink / raw)
  To: Drew Adams; +Cc: help-gnu-emacs

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

On Sun, Sep 26, 2021 at 11:53 AM Drew Adams <drew.adams@oracle.com> wrote:
>
> > I noticed the following messages triggered frequently by Emacs:
> >
> > File mode specification error: (error Variable binding depth exceeds
> > max-specpdl-size)
> > Emacs: nesting exceeds `max-lisp-eval-depth'
> >
> > Any hints/suggestions or rule of thumb to set these variables?
>
> You generally shouldn't need to change them.
> You're likely coding an infinite recursion, so
> the stack overflows.  Check your code - or
> narrow the problem down to some bit of code
> and post it here, if you can't see how/why
> you've cause an infinite recursion.

I set the following line in ~/.emacs.d/init.el:

(setq debug-on-error t)

Then a python file with the following content is opened in Emacs:

import matplotlib.pyplot as plt
from numpy import arange, p(*)i, sin
from sympy import Symbol, integrate

t = arange(0, 2*pi, .01)
plt.plot(sin(4*t), sin(5*t))

x = Symbol('x')
integrate(1/(1+x**3))

Now, I put point on `p' of `pi', denoted by * above. And hit
`M-.' which runs the command xref-find-definitions. The error shown in
the attachment will be triggered. When I hit the `M-.' for the second
time, it will be executed successfully.

Regards, HZ

[-- Attachment #2: max-specpdl-size.png --]
[-- Type: image/png, Size: 190265 bytes --]

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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-26  6:33   ` Hongyi Zhao
@ 2021-09-26  7:13     ` tomas
  2021-09-26 11:26       ` Hongyi Zhao
  0 siblings, 1 reply; 22+ messages in thread
From: tomas @ 2021-09-26  7:13 UTC (permalink / raw)
  To: help-gnu-emacs

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

On Sun, Sep 26, 2021 at 02:33:51PM +0800, Hongyi Zhao wrote:

[...]

> What's the meaning of `specpdl'?

Ask Emacs. Go to the Emacs Lisp info (in an Emacs windows, do C-h i
and m "Elisp" or whatever equivalent there is in your operating
system).

Then enter "i" (means "index") and then "specpdl". The first hit
will tell you:

 -- User Option: max-specpdl-size
     This variable defines the limit on the total number of local
     variable bindings and ‘unwind-protect’ cleanups (see *note Cleaning
     Up from Nonlocal Exits: Cleanups.) that are allowed before Emacs
     signals an error (with data ‘"Variable binding depth exceeds
     max-specpdl-size"’).

     This limit, with the associated error when it is exceeded, is one
     way that Lisp avoids infinite recursion on an ill-defined function.
     ‘max-lisp-eval-depth’ provides another limit on depth of nesting.
     *Note Eval: Definition of max-lisp-eval-depth.

     The default value is 1600.  Entry to the Lisp debugger increases
     the value, if there is little room left, to make sure the debugger
     itself has room to execute.

So that is a kind of stack, but not for "normal" function returns,
but rather for unwind-protects and other nonlocal exit paths.

Cheers
 - t

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

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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-26  7:13     ` tomas
@ 2021-09-26 11:26       ` Hongyi Zhao
  2021-09-26 11:55         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-26 13:04         ` Eli Zaretskii
  0 siblings, 2 replies; 22+ messages in thread
From: Hongyi Zhao @ 2021-09-26 11:26 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs

On Sun, Sep 26, 2021 at 3:14 PM <tomas@tuxteam.de> wrote:
>
> On Sun, Sep 26, 2021 at 02:33:51PM +0800, Hongyi Zhao wrote:
>
> [...]
>
> > What's the meaning of `specpdl'?
>
> Ask Emacs. Go to the Emacs Lisp info (in an Emacs windows, do C-h i
> and m "Elisp" or whatever equivalent there is in your operating
> system).
>
> Then enter "i" (means "index") and then "specpdl". The first hit
> will tell you:

I mainly use the following method to access this help: `C-h o
max-specpdl-size RET'

> So that is a kind of stack, but not for "normal" function returns,
> but rather for unwind-protects and other nonlocal exit paths.

Thank you for your explanation, but what puzzles me most is what is
the full English name of the word `specpdl'.

Best, HZ



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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-26 11:26       ` Hongyi Zhao
@ 2021-09-26 11:55         ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-26 13:04         ` Eli Zaretskii
  1 sibling, 0 replies; 22+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-26 11:55 UTC (permalink / raw)
  To: help-gnu-emacs

Hongyi Zhao wrote:

> Thank you for your explanation, but what puzzles me most is
> what is the full English name of the word `specpdl'.

He is right ... yeah, I have no idea.

It should be explained in the help but isn't.

Maybe browse the source, `max-specpdl-size' is defined in
src/eval.c line 4334 in my Emacs, which is

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

Use the source, Luke!

But this time, not even that is sure to work ...

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




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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-26 11:26       ` Hongyi Zhao
  2021-09-26 11:55         ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-26 13:04         ` Eli Zaretskii
  2021-09-26 15:01           ` Hongyi Zhao
  1 sibling, 1 reply; 22+ messages in thread
From: Eli Zaretskii @ 2021-09-26 13:04 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Hongyi Zhao <hongyi.zhao@gmail.com>
> Date: Sun, 26 Sep 2021 19:26:22 +0800
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> 
> what puzzles me most is what is the full English name of the word
> `specpdl'.

As I recently learned, PDL = push-down list.



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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-26 13:04         ` Eli Zaretskii
@ 2021-09-26 15:01           ` Hongyi Zhao
  2021-09-28 10:50             ` Stephen Berman
  0 siblings, 1 reply; 22+ messages in thread
From: Hongyi Zhao @ 2021-09-26 15:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Sun, Sep 26, 2021 at 9:04 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Hongyi Zhao <hongyi.zhao@gmail.com>
> > Date: Sun, 26 Sep 2021 19:26:22 +0800
> > Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> >
> > what puzzles me most is what is the full English name of the word
> > `specpdl'.
>
> As I recently learned, PDL = push-down list.

Thank you for your explanation. Only two built-in symbols in Emacs
contain this string in their names - the other is
`ar-max-specpdl-size'.

Best regards, HZ



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

* Google vi (was: Re: [External] : `max-specpdl-size' and `max-lisp-eval-depth')
  2021-09-26  4:09   ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-28  3:45     ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 22+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-28  3:45 UTC (permalink / raw)
  To: help-gnu-emacs

> Or google "recursion"

Another fun thing to google is vi :)

However it is the same googling Emacs ...

Only googling Vim doesn't "work".

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




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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-26 15:01           ` Hongyi Zhao
@ 2021-09-28 10:50             ` Stephen Berman
  2021-09-28 11:03               ` Hongyi Zhao
                                 ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Stephen Berman @ 2021-09-28 10:50 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs

On Sun, 26 Sep 2021 23:01:17 +0800 Hongyi Zhao <hongyi.zhao@gmail.com> wrote:

> On Sun, Sep 26, 2021 at 9:04 PM Eli Zaretskii <eliz@gnu.org> wrote:
>>
>> > From: Hongyi Zhao <hongyi.zhao@gmail.com>
>> > Date: Sun, 26 Sep 2021 19:26:22 +0800
>> > Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
>> >
>> > what puzzles me most is what is the full English name of the word
>> > `specpdl'.
>>
>> As I recently learned, PDL = push-down list.
>
> Thank you for your explanation. Only two built-in symbols in Emacs
> contain this string in their names - the other is
> `ar-max-specpdl-size'.

The term goes back to the beginnings of Lisp (McCarthy's paper from
1960, available via the Wayback Machine from
http://www-formal.stanford.edu/jmc/recursive/node4.html):

  In general (we shall discuss an exception), the routine for a
  recursive function uses itself as a subroutine [...] This possible
  conflict is resolved by the SAVE and UNSAVE routines that use the
  public push-down list.

A footnote here (added later) says: "1995: now called a stack"

Steve Berman



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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-28 10:50             ` Stephen Berman
@ 2021-09-28 11:03               ` Hongyi Zhao
  2021-09-28 11:05               ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-28 11:14               ` Lars Ingebrigtsen
  2 siblings, 0 replies; 22+ messages in thread
From: Hongyi Zhao @ 2021-09-28 11:03 UTC (permalink / raw)
  To: Stephen Berman; +Cc: help-gnu-emacs

On Tue, Sep 28, 2021 at 6:50 PM Stephen Berman <stephen.berman@gmx.net> wrote:
>
> On Sun, 26 Sep 2021 23:01:17 +0800 Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
>
> > On Sun, Sep 26, 2021 at 9:04 PM Eli Zaretskii <eliz@gnu.org> wrote:
> >>
> >> > From: Hongyi Zhao <hongyi.zhao@gmail.com>
> >> > Date: Sun, 26 Sep 2021 19:26:22 +0800
> >> > Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> >> >
> >> > what puzzles me most is what is the full English name of the word
> >> > `specpdl'.
> >>
> >> As I recently learned, PDL = push-down list.
> >
> > Thank you for your explanation. Only two built-in symbols in Emacs
> > contain this string in their names - the other is
> > `ar-max-specpdl-size'.
>
> The term goes back to the beginnings of Lisp (McCarthy's paper from
> 1960, available via the Wayback Machine from
> http://www-formal.stanford.edu/jmc/recursive/node4.html):
>
>   In general (we shall discuss an exception), the routine for a
>   recursive function uses itself as a subroutine [...] This possible
>   conflict is resolved by the SAVE and UNSAVE routines that use the
>   public push-down list.
>
> A footnote here (added later) says: "1995: now called a stack"

Cool, thanks!

HZ



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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-28 10:50             ` Stephen Berman
  2021-09-28 11:03               ` Hongyi Zhao
@ 2021-09-28 11:05               ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-28 11:20                 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-28 13:49                 ` tomas
  2021-09-28 11:14               ` Lars Ingebrigtsen
  2 siblings, 2 replies; 22+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-28 11:05 UTC (permalink / raw)
  To: help-gnu-emacs

Stephen Berman wrote:

>> Thank you for your explanation. Only two built-in symbols
>> in Emacs contain this string in their names - the other is
>> `ar-max-specpdl-size'.
>
> The term goes back to the beginnings of Lisp (McCarthy's
> paper from 1960, available via the Wayback Machine from
> http://www-formal.stanford.edu/jmc/recursive/node4.html):
>
>   In general (we shall discuss an exception), the routine
>   for a recursive function uses itself as a subroutine [...]
>   This possible conflict is resolved by the SAVE and UNSAVE
>   routines that use the public push-down list.
>
> A footnote here (added later) says: "1995: now called
> a stack"

Cool B)

IIRC from Automata Theory there was this thing called a PDA or
"pushdown automaton", maybe that was a stack as well?

Later a PDA was a "Personal digital assistant" like the Apple
Newton which didn't make anyone impressed. But I guess they
made up for it at least commercially with all the later
iThings ...

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




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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-28 10:50             ` Stephen Berman
  2021-09-28 11:03               ` Hongyi Zhao
  2021-09-28 11:05               ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-28 11:14               ` Lars Ingebrigtsen
  2021-09-28 11:23                 ` Stephen Berman
  2 siblings, 1 reply; 22+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-28 11:14 UTC (permalink / raw)
  To: Stephen Berman; +Cc: help-gnu-emacs, Hongyi Zhao

Stephen Berman <stephen.berman@gmx.net> writes:

> The term goes back to the beginnings of Lisp (McCarthy's paper from
> 1960, available via the Wayback Machine from
> http://www-formal.stanford.edu/jmc/recursive/node4.html):
>
>   In general (we shall discuss an exception), the routine for a
>   recursive function uses itself as a subroutine [...] This possible
>   conflict is resolved by the SAVE and UNSAVE routines that use the
>   public push-down list.

Perhaps we should put something about this in the `max-specpdl-size' doc
string.  You wouldn't happen to know what the "spec" part is referring
to?  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-28 11:05               ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-28 11:20                 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-28 13:49                 ` tomas
  1 sibling, 0 replies; 22+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-28 11:20 UTC (permalink / raw)
  To: help-gnu-emacs

> Later a PDA would be a "Personal digital assistant" like the
> Apple Newton which didn't make anyone impressed. But I guess
> they made up for it at least commercially with all the later
> iThings ...

Now the de facto PDAs are the smartphones and they can do much
more that the PDA people could ever imagine, literally, to
a great extent because they couldn't imagine a computer, any
computer, doing what they do today ...

But that's OK, no one else imagined that either ...

Actually, not even the science fiction writers could imagine
even the personal computer revolution! (which happened in the
80s but was based on the transistor from 1947)

Worse, the personal computer revolution took place in the US
and before that the first transistor was constructed by
American physicists John Bardeen and Walter Brattain
(Nobel Prize 1956) at Bell Labs.

So it is even more embarrassing because while maybe the UK and
Japan has science fiction at the US level in terms of quality,
no one comes close in terms of quantity.

Mail SFWA and complain at https://www.sfwa.org/

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




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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-28 11:14               ` Lars Ingebrigtsen
@ 2021-09-28 11:23                 ` Stephen Berman
  2021-09-29  5:53                   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Berman @ 2021-09-28 11:23 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: help-gnu-emacs, Hongyi Zhao

On Tue, 28 Sep 2021 13:14:42 +0200 Lars Ingebrigtsen <larsi@gnus.org> wrote:

> Stephen Berman <stephen.berman@gmx.net> writes:
>
>> The term goes back to the beginnings of Lisp (McCarthy's paper from
>> 1960, available via the Wayback Machine from
>> http://www-formal.stanford.edu/jmc/recursive/node4.html):
>>
>>   In general (we shall discuss an exception), the routine for a
>>   recursive function uses itself as a subroutine [...] This possible
>>   conflict is resolved by the SAVE and UNSAVE routines that use the
>>   public push-down list.
>
> Perhaps we should put something about this in the `max-specpdl-size' doc
> string.  You wouldn't happen to know what the "spec" part is referring
> to?  :-)

I think that's from the Common Lisp term "special variable" for a global
(i.e. non-lexical) variable.  I don't know where that term originated,
maybe Maclisp.

Steve Berman



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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-28 11:05               ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-28 11:20                 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-28 13:49                 ` tomas
  2021-09-28 14:08                   ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 1 reply; 22+ messages in thread
From: tomas @ 2021-09-28 13:49 UTC (permalink / raw)
  To: help-gnu-emacs

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

On Tue, Sep 28, 2021 at 01:05:15PM +0200, Emanuel Berg via Users list for the GNU Emacs text editor wrote:

[...]

> IIRC from Automata Theory there was this thing called a PDA or
> "pushdown automaton", maybe that was a stack as well?

That was a stack. A PDA automaton is a finite automaton enhanced
by a stack, so it can grok nested structures.

Cheers
 - t

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

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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-28 13:49                 ` tomas
@ 2021-09-28 14:08                   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-09-28 14:19                     ` tomas
  0 siblings, 1 reply; 22+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-09-28 14:08 UTC (permalink / raw)
  To: help-gnu-emacs

tomas wrote:

>> IIRC from Automata Theory there was this thing called a PDA
>> or "pushdown automaton", maybe that was a stack as well?
>
> That was a stack. A PDA automaton is a finite automaton
> enhanced by a stack, so it can grok nested structures.

OK!

But actually the way you put it it's infinite :)

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




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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-28 14:08                   ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-09-28 14:19                     ` tomas
  0 siblings, 0 replies; 22+ messages in thread
From: tomas @ 2021-09-28 14:19 UTC (permalink / raw)
  To: help-gnu-emacs

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

On Tue, Sep 28, 2021 at 04:08:24PM +0200, Emanuel Berg via Users list for the GNU Emacs text editor wrote:
> tomas wrote:
> 
> >> IIRC from Automata Theory there was this thing called a PDA
> >> or "pushdown automaton", maybe that was a stack as well?
> >
> > That was a stack. A PDA automaton is a finite automaton
> > enhanced by a stack, so it can grok nested structures.
> 
> OK!
> 
> But actually the way you put it it's infinite :)

Finite automata are only in part finite (the set of states is
finite, not necessarily the input/output).

The addition of a stack is, of course, yet another infinite
accessory (if the stack were finite, you could simulate it
by adding -- possibly lots and lots, but still finitely many
states).

Strange stuff all over :)

Cheers
 - t

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

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

* Re: `max-specpdl-size' and `max-lisp-eval-depth'
  2021-09-28 11:23                 ` Stephen Berman
@ 2021-09-29  5:53                   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 22+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-29  5:53 UTC (permalink / raw)
  To: Stephen Berman; +Cc: help-gnu-emacs, Hongyi Zhao

Stephen Berman <stephen.berman@gmx.net> writes:

>> Perhaps we should put something about this in the `max-specpdl-size' doc
>> string.  You wouldn't happen to know what the "spec" part is referring
>> to?  :-)
>
> I think that's from the Common Lisp term "special variable" for a global
> (i.e. non-lexical) variable.  I don't know where that term originated,
> maybe Maclisp.

Thanks; I've now mentioned this in the doc string in Emacs 28.





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

end of thread, other threads:[~2021-09-29  5:53 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-26  1:48 `max-specpdl-size' and `max-lisp-eval-depth' Hongyi Zhao
2021-09-26  2:36 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-26  6:33   ` Hongyi Zhao
2021-09-26  7:13     ` tomas
2021-09-26 11:26       ` Hongyi Zhao
2021-09-26 11:55         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-26 13:04         ` Eli Zaretskii
2021-09-26 15:01           ` Hongyi Zhao
2021-09-28 10:50             ` Stephen Berman
2021-09-28 11:03               ` Hongyi Zhao
2021-09-28 11:05               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-28 11:20                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-28 13:49                 ` tomas
2021-09-28 14:08                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-28 14:19                     ` tomas
2021-09-28 11:14               ` Lars Ingebrigtsen
2021-09-28 11:23                 ` Stephen Berman
2021-09-29  5:53                   ` Lars Ingebrigtsen
2021-09-26  3:53 ` [External] : " Drew Adams
2021-09-26  4:09   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-28  3:45     ` Google vi (was: Re: [External] : `max-specpdl-size' and `max-lisp-eval-depth') Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-26  7:09   ` [External] : `max-specpdl-size' and `max-lisp-eval-depth' Hongyi Zhao

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