Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

The world is no nursery. -- Sigmund Freud


devel / comp.lang.forth / What does (gensym) generate?

SubjectAuthor
* What does (gensym) generate?none
`- Re: What does (gensym) generate?John

1
What does (gensym) generate?

<nnd$02d5e102$7424881a@a8b5929abbadeaf5>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=24485&group=comp.lang.forth#24485

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: What does (gensym) generate?
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: albert@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$02d5e102$7424881a@a8b5929abbadeaf5>
Organization: KPN B.V.
Date: Thu, 31 Aug 2023 10:57:35 +0200
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail
Lines: 41
Injection-Date: Thu, 31 Aug 2023 10:57:35 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2033
 by: none - Thu, 31 Aug 2023 08:57 UTC

The explanations about the usage of gensym are clear,
how your are supposed to used them.
The theoretical background however is far from it.

(let* (aaa (gensym)) .. aaa .. )

In the context `` .. aaa .. '' `aaa is obviously a symbol.
The interesting question is what value is aaa coupled to due to
the environment (aaa (gensym))?
Apparently aaa must be evaluated before it is any use.
However subsequently you see
(let* (aaa (rest whatever)) ... )
What is disturbing to me is that let* only allows symbols into the
position of aaa and normally the coupling of aaa hides previous usage.
I have the following lisp objects:
symbols lists numbers strings arrays hashes normal-function
special-functions booleans
and more MAL oddballs:
nil key atom

Nothing seems an appropriate type for `aaa.

Example studied:

(defmacro! or
(fn* (& xs)
(if (empty? xs)
nil
(if (= 1 (count xs))
(first xs)
(let* (condvar (gensym))
`(let* (~condvar ~(first xs))
(if ~condvar ~condvar (or ~@(rest xs)))))))))

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -

Re: What does (gensym) generate?

<ucq0gn$352d9$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=24486&group=comp.lang.forth#24486

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: john@johneb47.id.au (John)
Newsgroups: comp.lang.forth
Subject: Re: What does (gensym) generate?
Date: Thu, 31 Aug 2023 12:19:36 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <ucq0gn$352d9$1@dont-email.me>
References: <nnd$02d5e102$7424881a@a8b5929abbadeaf5>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 31 Aug 2023 12:19:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e9827a637ec499291b2de09575a9de55";
logging-data="3312041"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19vpe49ncI42f84H4M53XmKVBKe0usecUU="
User-Agent: Pan/0.154 (Izium; 8d75656
/home/john/.cache/pikaur/build/pan-git/pan)
Cancel-Lock: sha1:jV+6SiIn5wzPEOY2KOx2MpZyNTc=
 by: John - Thu, 31 Aug 2023 12:19 UTC

On Thu, 31 Aug 2023 10:57:35 +0200, none) (albert wrote:

> The explanations about the usage of gensym are clear,
> how your are supposed to used them.
> The theoretical background however is far from it.
>
> (let* (aaa (gensym)) .. aaa .. )
>
Within a lisp macro gensym generates a randomly generated symbol to
prevent name clashes

John

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor