Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"We don't care. We don't have to. We're the Phone Company."


devel / comp.lang.lisp / Re: lexical closure problem

SubjectAuthor
* lexical closure problemJinsong Zhao
+- Re: lexical closure problemSam Steingold
+- Re: lexical closure problemBen Bacarisse
+- Re: lexical closure problemSpiros Bousbouras
`* Re: lexical closure problemsteve g
 `* Re: lexical closure problemKaz Kylheku
  +- Re: lexical closure problemsteve
  `- Re: lexical closure problemsteve

1
lexical closure problem

<teqe9f$26qp3$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17177&group=comp.lang.lisp#17177

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: jszhao@yeah.net (Jinsong Zhao)
Newsgroups: comp.lang.lisp
Subject: lexical closure problem
Date: Thu, 1 Sep 2022 22:06:39 +0800
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <teqe9f$26qp3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 1 Sep 2022 14:06:39 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="8b3d617a4ce2565fd14dbee8928086a8";
logging-data="2321187"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+d/XACLEXIt+Ll51vkvcFN"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.2.0
Cancel-Lock: sha1:uSYJW2vAKrKEEDKXXHCvWRGe/Vw=
Content-Language: en-US
 by: Jinsong Zhao - Thu, 1 Sep 2022 14:06 UTC

Hi there,

Recently, I read Lisp 3rd Edition by Winston and Horn. In Chapter 15,
there is a example code:

(setf generator-with-dispatch-procedure
(let ((previous-power-of-two 1)
(reset-procedure
#'(lambda ()
(setf previous-power-of-two 1)))
(value-procedure
#'(lambda ()
(setf previous-power-of-two
(* previous-power-of-two 2)))))
;;The dispatch procedure:
#'(lambda (accessor)
(cond ((eq 'reset accessor) reset-procedure)
((eq 'value accessor) value-procedure)))))

I tried to invoke it like:
(funcall (funcall generator-with-dispatch-procedure 'value))

SBCL gives the error message:
The variable PREVIOUS-POWER-OF-TWO is unbound.

If I run
(funcall (funcall generator-with-dispatch-procedure 'reset))
before
(funcall (funcall generator-with-dispatch-procedure 'value))
I could get what I expect.

I could not understand why the error appears. Any hint?

Best,
Jinsong

Re: lexical closure problem

<lzilm7i1ku.fsf@3c22fb11fdab.ant.amazon.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17178&group=comp.lang.lisp#17178

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: sds@gnu.org (Sam Steingold)
Newsgroups: comp.lang.lisp
Subject: Re: lexical closure problem
Date: Thu, 01 Sep 2022 10:58:09 -0400
Organization: disorganization
Lines: 54
Message-ID: <lzilm7i1ku.fsf@3c22fb11fdab.ant.amazon.com>
References: <teqe9f$26qp3$1@dont-email.me>
Reply-To: sds@gnu.org
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="3577b14265a606aa875c4c412cc49e1d";
logging-data="2333489"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+zosqFE8VtNO+6wvR0t533"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin)
Cancel-Lock: sha1:78nvC25UvAtL9HfZaBHoQ4rbocE=
sha1:RlESozaI2REih3YxlBoL8I5W8mU=
Return-Receipt-To: sds@gnu.org
X-Attribution: Sam
X-Disclaimer: You should not expect anyone to agree with me.
 by: Sam Steingold - Thu, 1 Sep 2022 14:58 UTC

> * Jinsong Zhao <wfmunb@lrnu.arg> [2022-09-01 22:06:39 +0800]:
>
> (setf generator-with-dispatch-procedure
> (let ((previous-power-of-two 1)

replace `let' with `let*'

> (reset-procedure
> #'(lambda ()
> (setf previous-power-of-two 1)))
> (value-procedure
> #'(lambda ()
> (setf previous-power-of-two
> (* previous-power-of-two 2)))))
> ;;The dispatch procedure:
> #'(lambda (accessor)
> (cond ((eq 'reset accessor) reset-procedure)
> ((eq 'value accessor) value-procedure)))))
>
> I tried to invoke it like:
> (funcall (funcall generator-with-dispatch-procedure 'value))
>
> SBCL gives the error message:
> The variable PREVIOUS-POWER-OF-TWO is unbound.

Actually, SBCL tells you that this will happen as soon as you evaluate
the above `setf' form:

--8<---------------cut here---------------start------------->8---
; in: SETF GENERATOR-WITH-DISPATCH-PROCEDURE
; (PREVIOUS-POWER-OF-TWO 1)
;
; caught STYLE-WARNING:
; The variable PREVIOUS-POWER-OF-TWO is defined but never used.
; in: SETF GENERATOR-WITH-DISPATCH-PROCEDURE
; (* PREVIOUS-POWER-OF-TWO 2)
;
; caught WARNING:
; undefined variable: COMMON-LISP-USER::PREVIOUS-POWER-OF-TWO
;
; compilation unit finished
; Undefined variable:
; PREVIOUS-POWER-OF-TWO
; caught 1 WARNING condition
--8<---------------cut here---------------end--------------->8---

this tells you that `previous-power-of-two' is not known to
`reset-procedure' and `value-procedure' and it is not used.

--
Sam Steingold (https://aphar.dreamwidth.org/) on darwin Ns 10.3.2113
https://lastingimpactpsychology.com https://steingoldpsychology.com
https://jihadwatch.org https://fairforall.org https://ij.org/ https://ffii.org
Don't hit a man when he's down -- kick him; it's easier.

Re: lexical closure problem

<87czcfksc9.fsf@bsb.me.uk>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17179&group=comp.lang.lisp#17179

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ben.usenet@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.lisp
Subject: Re: lexical closure problem
Date: Thu, 01 Sep 2022 16:49:26 +0100
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <87czcfksc9.fsf@bsb.me.uk>
References: <teqe9f$26qp3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="bffe11175040581874d9a202797e7527";
logging-data="2344331"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19UGnHe7+841g0cSrBF7KqafhId0FhXNJw="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:bZT2bcMNdpHOqCgVrB309nPbFDQ=
sha1:C7W1iNR/fAe7eyAu/v/BXtM0bg4=
X-BSB-Auth: 1.52f7d4e6a260164ac108.20220901164926BST.87czcfksc9.fsf@bsb.me.uk
 by: Ben Bacarisse - Thu, 1 Sep 2022 15:49 UTC

Jinsong Zhao <jszhao@yeah.net> writes:

> Recently, I read Lisp 3rd Edition by Winston and Horn. In Chapter 15,
> there is a example code:
>
> (setf generator-with-dispatch-procedure
> (let ((previous-power-of-two 1)
> (reset-procedure
> #'(lambda ()
> (setf previous-power-of-two 1)))
> (value-procedure
> #'(lambda ()
> (setf previous-power-of-two
> (* previous-power-of-two 2)))))
> ;;The dispatch procedure:
> #'(lambda (accessor)
> (cond ((eq 'reset accessor) reset-procedure)
> ((eq 'value accessor) value-procedure)))))
>
> I tried to invoke it like:
> (funcall (funcall generator-with-dispatch-procedure 'value))
>
> SBCL gives the error message:
> The variable PREVIOUS-POWER-OF-TWO is unbound.

Indeed. I find the code odd. What is it intended to illustrate? To
work as it apparently should you need let* there.

> If I run
> (funcall (funcall generator-with-dispatch-procedure 'reset))
> before
> (funcall (funcall generator-with-dispatch-procedure 'value))
> I could get what I expect.

Well, except for the fact that a global variable called
previous-power-of-two comes into existence! That is not intended, I
think.

> I could not understand why the error appears. Any hint?

The two anonymous functions in the let can't see the binding for
previous-power-of-two.

--
Ben.

Re: lexical closure problem

<klVp2pIxFUhTXSDYw@bongo-ra.co>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17180&group=comp.lang.lisp#17180

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.lang.lisp
Subject: Re: lexical closure problem
Date: Thu, 1 Sep 2022 16:27:22 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 119
Message-ID: <klVp2pIxFUhTXSDYw@bongo-ra.co>
References: <teqe9f$26qp3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 1 Sep 2022 16:27:22 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="5b6630ea17bc48da3b8bbb46c3613b9f";
logging-data="2351665"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18fKYcArgnEeOE3By8SOmpY"
Cancel-Lock: sha1:027XeEcCWKtE23cVQm6lqgScgWA=
X-Server-Commands: nowebcancel
In-Reply-To: <teqe9f$26qp3$1@dont-email.me>
X-Organisation: Weyland-Yutani
 by: Spiros Bousbouras - Thu, 1 Sep 2022 16:27 UTC

On Thu, 1 Sep 2022 22:06:39 +0800
Jinsong Zhao <jszhao@yeah.net> wrote:
> Hi there,
>
> Recently, I read Lisp 3rd Edition by Winston and Horn. In Chapter 15,
> there is a example code:
>
> (setf generator-with-dispatch-procedure
> (let ((previous-power-of-two 1)
> (reset-procedure
> #'(lambda ()
> (setf previous-power-of-two 1)))
> (value-procedure
> #'(lambda ()
> (setf previous-power-of-two
> (* previous-power-of-two 2)))))
> ;;The dispatch procedure:
> #'(lambda (accessor)
> (cond ((eq 'reset accessor) reset-procedure)
> ((eq 'value accessor) value-procedure)))))
>
> I tried to invoke it like:
> (funcall (funcall generator-with-dispatch-procedure 'value))
>
> SBCL gives the error message:
> The variable PREVIOUS-POWER-OF-TWO is unbound.
>
> If I run
> (funcall (funcall generator-with-dispatch-procedure 'reset))
> before
> (funcall (funcall generator-with-dispatch-procedure 'value))
> I could get what I expect.
>
> I could not understand why the error appears. Any hint?

Because reset-procedure and value-procedure are not within the scope of
previous-power-of-two ; or , to use the terminology of the book , within the
"gatekeeper's list" created for previous-power-of-two .Compare with an
earlier example :

(setf g1
(let ((previous-power-of-two 1))
#'(lambda () ..... )))

This works because the lambda is within the scope for previous-power-of-two
created by LET .I suspect that the authors made a mistake : they intended to
use LET* for the generator-with-dispatch-procedure example but they forgot
and in their testing they always happened to do first
(funcall (funcall generator-with-dispatch-procedure 'reset))
hence they never noticed the mistake. The way they have written the code ,
the first time you do
(funcall (funcall generator-with-dispatch-procedure 'reset))

a special variable previous-power-of-two gets created. Note that then
you can just type on the REPL
previous-power-of-two

and it shows you its current value which violates what the book says on page
217 : "However some programmers dislike having the state variable exposed. In
principle other procedures could alter it inadvertently." and the examples
which follow {including the one your question is about} are meant to show you
how you can avoid this.

With the definition in the book , I have the following interaction with SBCL
{omitting warnings}

* (funcall (funcall generator-with-dispatch-procedure 'reset))
1

* previous-power-of-two
1

* (funcall (funcall generator-with-dispatch-procedure 'value))
2

* (setf previous-power-of-two 7)
7

* (funcall (funcall generator-with-dispatch-procedure 'value))
14

Now if I terminate and restart SBCL and replace the let in the code of
the book by let* , I get the following :

* (funcall (funcall generator-with-dispatch-procedure 'value))
2

{ Note that there is no error now. }

* previous-power-of-two

debugger invoked on a UNBOUND-VARIABLE in thread #<THREAD "initial thread" RUNNING {A8346F9}>:
The variable PREVIOUS-POWER-OF-TWO is unbound.

* (setf previous-power-of-two 7)
7

* (funcall (funcall generator-with-dispatch-procedure 'value))
4

* (funcall (funcall generator-with-dispatch-procedure 'reset))
1

* (funcall (funcall generator-with-dispatch-procedure 'value))
2

* previous-power-of-two
7

When you do (funcall generator-with-dispatch-procedure ...) , the 2
functions access the lexical previous-power-of-two which is private to
the 2 functions and has a separate value from the special
previous-power-of-two which was created when I did
(setf previous-power-of-two 7)

..I believe this is what the book was aiming to exhibit.

--
vlaho.ninja/prog

Re: lexical closure problem

<1IKcnYBsjLlnmsr-nZ2dnZfqn_adnZ2d@giganews.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17196&group=comp.lang.lisp#17196

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!69.80.99.26.MISMATCH!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Mon, 24 Oct 2022 21:47:35 +0000
Content-Type: text/plain; charset="ISO-8859-1"
From: sgonedes1977@gmail.com (steve g)
Organization: ^?
Date: Mon, 24 Oct 2022 17:47:27 -0400
User-Agent: KNode/4.14.10
Content-Transfer-Encoding: 7Bit
Subject: Re: lexical closure problem
Newsgroups: comp.lang.lisp
References: <teqe9f$26qp3$1@dont-email.me>
MIME-Version: 1.0
Message-ID: <1IKcnYBsjLlnmsr-nZ2dnZfqn_adnZ2d@giganews.com>
Lines: 66
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-cSXdUfVrbv5y+n5ckfZ4HUj+O4pa7XuKyyDYomdI2177MONt0JTOji1ii5FwlB3ZDbT5vHSS3/jptcj!xDEJOy5hNv8L5EeMyuVhAODAZvkstSKe4G0XHM8k5GJtZG0SAnrnDknY3y6E6XrGdnQCBBLV5Q==
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Received-Bytes: 3154
 by: steve g - Mon, 24 Oct 2022 21:47 UTC

Jinsong Zhao wrote:

> Hi there,
>
> Recently, I read Lisp 3rd Edition by Winston and Horn. In Chapter 15,
> there is a example code:
>
> (setf generator-with-dispatch-procedure
> (let ((previous-power-of-two 1)
> (reset-procedure
> #'(lambda ()
> (setf previous-power-of-two 1)))
> (value-procedure
> #'(lambda ()
> (setf previous-power-of-two
> (* previous-power-of-two 2)))))
> ;;The dispatch procedure:
> #'(lambda (accessor)
> (cond ((eq 'reset accessor) reset-procedure)
> ((eq 'value accessor) value-procedure)))))
>
> I tried to invoke it like:
> (funcall (funcall generator-with-dispatch-procedure 'value))
>
> SBCL gives the error message:
> The variable PREVIOUS-POWER-OF-TWO is unbound.
>
> If I run
> (funcall (funcall generator-with-dispatch-procedure 'reset))
> before
> (funcall (funcall generator-with-dispatch-procedure 'value))
> I could get what I expect.
>
> I could not understand why the error appears. Any hint?

It seems to work for me I think..?

CL-USER> (funcall (funcall generator-with-dispatch-procedure 'value))
2 CL-USER> (funcall (funcall generator-with-dispatch-procedure 'reset))
1 CL-USER>

Try using a let to bind the value outside the `setf'...

(let ((previous-power-of-two 1)
(setq generator-with-dispatch-procedure

(reset-procedure
#'(lambda ()
(setf previous-power-of-two 1)))
(value-procedure
#'(lambda ()
(setf previous-power-of-two
(* previous-power-of-two 2)))))
;;The dispatch procedure:
#'(lambda (accessor)
(cond ((eq 'reset accessor) reset-procedure)
((eq 'value accessor) value-procedure)))))

The use of setq is stylistic; this might help...

Re: lexical closure problem

<20221025101737.187@kylheku.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17202&group=comp.lang.lisp#17202

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: 864-117-4973@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.lisp
Subject: Re: lexical closure problem
Date: Tue, 25 Oct 2022 17:19:04 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <20221025101737.187@kylheku.com>
References: <teqe9f$26qp3$1@dont-email.me>
<1IKcnYBsjLlnmsr-nZ2dnZfqn_adnZ2d@giganews.com>
Injection-Date: Tue, 25 Oct 2022 17:19:04 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="24017722af50e5a682a68f86ee6e5a48";
logging-data="2212637"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX188KXdPvpPulIUrbl+szL8E/AmT2tN82zs="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:fDn8g+anZYsG78U1kuEHDFhTvRA=
 by: Kaz Kylheku - Tue, 25 Oct 2022 17:19 UTC

On 2022-10-24, steve g <sgonedes1977@gmail.com> wrote:
> Jinsong Zhao wrote:
>> I could not understand why the error appears. Any hint?
>
> It seems to work for me I think..?

Three others had to change let to let*, so that is amazing.

Do you have a customized environment in which *let* is sequential
by default, or do you just filter such problems in your
fingers without being consciously aware of it any more?

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal

Re: lexical closure problem

<87lep3ydhj.fsf@gmail.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17203&group=comp.lang.lisp#17203

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!69.80.99.27.MISMATCH!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 25 Oct 2022 18:17:28 +0000
From: sgonedes1977@gmail.com (steve)
Newsgroups: comp.lang.lisp
Subject: Re: lexical closure problem
References: <teqe9f$26qp3$1@dont-email.me> <1IKcnYBsjLlnmsr-nZ2dnZfqn_adnZ2d@giganews.com> <20221025101737.187@kylheku.com>
Date: Tue, 25 Oct 2022 14:17:28 -0400
Message-ID: <87lep3ydhj.fsf@gmail.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
Cancel-Lock: sha1:TQAael8tLJ24oRxSJ0axPSSE5DE=
MIME-Version: 1.0
Content-Type: text/plain
Lines: 20
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-uslPFGRKy71BuS3xyTCTGSTLyD9T9Zgi7zlsZFEUn/tLMeA6QJ4eG7/IPUTCunR6H4AzWP8FExWPi5I!uWOwVv/LoPLt2FQPY6r/rP1W6jErrLe1M+Rnx+FGXpFcJw==
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: steve - Tue, 25 Oct 2022 18:17 UTC

Kaz Kylheku <864-117-4973@kylheku.com> writes:

> On 2022-10-24, steve g <sgonedes1977@gmail.com> wrote:
>> Jinsong Zhao wrote:
>>> I could not understand why the error appears. Any hint?
>>
>> It seems to work for me I think..?
>
> Three others had to change let to let*, so that is amazing.

an old thread.

> Do you have a customized environment in which *let* is sequential
> by default, or do you just filter such problems in your
> fingers without being consciously aware of it any more?

I dunno what you mean. could you explain filtering?

Re: lexical closure problem

<87fsfbycz6.fsf@gmail.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17204&group=comp.lang.lisp#17204

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!3.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Tue, 25 Oct 2022 18:28:35 +0000
From: sgonedes1977@gmail.com (steve)
Newsgroups: comp.lang.lisp
Subject: Re: lexical closure problem
References: <teqe9f$26qp3$1@dont-email.me>
<1IKcnYBsjLlnmsr-nZ2dnZfqn_adnZ2d@giganews.com>
<20221025101737.187@kylheku.com>
Date: Tue, 25 Oct 2022 14:28:29 -0400
Message-ID: <87fsfbycz6.fsf@gmail.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
Cancel-Lock: sha1:DTD6C3PxuRVVFZcyK4P1Yb4Ug4Q=
MIME-Version: 1.0
Content-Type: text/plain
Lines: 37
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-idshwXncFBGw1zq5VWz2f6CPwJ0Gi/8DRKqccFw2LlIAjzdiJ40V0bG7iDqPRHgN4F2SUzTqj5RIoEN!lZZRamXQgY0SOOZWu7lIb5tLBKOUUOXnsFkgQRhnpgrPKw==
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: steve - Tue, 25 Oct 2022 18:28 UTC

Kaz Kylheku <864-117-4973@kylheku.com> writes:

> On 2022-10-24, steve g <sgonedes1977@gmail.com> wrote:
>> Jinsong Zhao wrote:
>>> I could not understand why the error appears. Any hint?
>>
>> It seems to work for me I think..?
>
> Three others had to change let to let*, so that is amazing.
>
> Do you have a customized environment in which *let* is sequential

I just ment to bring the binding outside of the setf; that is why i use
setq.

i just typed that in; it looks like it worked...

(setq generator-with-dispatch-procedure
(let ((previous-power-of-two 1)
(reset-procedure
#'(lambda ()
(setf previous-power-of-two 1)))
(value-procedure
#'(lambda ()
(setf previous-power-of-two
(* previous-power-of-two 2)))))
;;The dispatch procedure:
#'(lambda (accessor)
(cond ((eq 'reset accessor) reset-procedure)
((eq 'value accessor) value-procedure)))))

> by default, or do you just filter such problems in your
> fingers without being consciously aware of it any more?

i usually use more humility.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor