From: Damien Mattei <damien.mattei@gmail.com>
To: Per Bothner <per@bothner.com>
Cc: phiroc@free.fr, kawa@sourceware.org
Subject: Re: define-syntax can only be used with local variables
Date: Tue, 14 Sep 2021 19:38:14 +0200 [thread overview]
Message-ID: <CADEOadfg17GK7-pi_oc5s46BVdYpM0U2+8=+u5do=E0YTuNS3Q@mail.gmail.com> (raw)
In-Reply-To: <515e7486-9636-e698-b811-9574bf0bedc3@bothner.com>
downloading a binary version ok kawa from the official web site , i get the
same error, with the same openjdk 16:
mattei@macbook-pro-touch-bar bin % export
JAVA_HOME=/opt/homebrew/Cellar/openjdk/16.0.2
/opt/homebrew/Cellar/openjdk/16.0.2
mattei@macbook-pro-touch-bar bin % pwd
/Users/mattei/kawa-3.1.1/bin
mattei@macbook-pro-touch-bar bin % ./kawa
#|kawa:1|# (define-syntax nil2!
#|.....2|# (syntax-rules ()
#|.....3|# ((_ x)
#|.....4|# (set! x '(0)))))
#|.....5|# (define y '(1))
#|kawa:6|# (nil2! y)
#|kawa:7|# y
(1)
i will try the source version perhaps
damien
On Tue, Sep 14, 2021 at 7:27 PM Per Bothner <per@bothner.com> wrote:
>
>
> On 9/10/21 12:33 AM, phiroc--- via Kawa wrote:
> > Hello,
> > in the below code, nil! and nil2! only set variables values to '() and
> '(0) when such variables are local (let).
>
> I'm guessing (without having tested it) that the restriction isn't local
> variables
> but lexical vs dynamic variables. I.e. it is likely that module-level
> (library-level)
> variables would also work.
>
> Probably a problem with macro hygiene. Though it's weird that it behaves
> differently on
> different systems. Possibly different Java versionor different Kawa
> versions (though
> I don't recall changing anything in this area in a while).
>
> Could be a nice exercise to figure out for someone who
> wants to understand how Kawa macro hygiene works.
> --
> --Per Bothner
> per@bothner.com http://per.bothner.com/
>
next prev parent reply other threads:[~2021-09-14 17:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <971550055.197381511.1631259004148.JavaMail.root@zimbra65-e11.priv.proxad.net>
2021-09-10 7:33 ` phiroc
2021-09-14 12:42 ` Damien Mattei
2021-09-14 16:14 ` Philippe de Rochambeau
2021-09-14 16:34 ` Damien Mattei
2021-09-14 16:58 ` Philippe de Rochambeau
2021-09-14 17:26 ` Per Bothner
2021-09-14 17:38 ` Damien Mattei [this message]
2021-09-14 17:58 ` Damien Mattei
2021-09-14 18:00 ` Damien Mattei
2021-09-14 18:07 ` Per Bothner
2021-09-14 18:38 ` Damien Mattei
2021-09-14 19:30 ` Per Bothner
2021-09-15 7:10 ` phiroc
2021-09-16 10:02 ` phiroc
2021-09-16 10:41 ` Damien MATTEI
2021-09-16 11:05 ` phiroc
2021-09-16 13:44 ` Damien MATTEI
2021-09-17 5:29 ` Per Bothner
2021-09-17 7:00 ` phiroc
2021-09-17 10:48 ` Per Bothner
2021-09-16 21:11 ` Per Bothner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADEOadfg17GK7-pi_oc5s46BVdYpM0U2+8=+u5do=E0YTuNS3Q@mail.gmail.com' \
--to=damien.mattei@gmail.com \
--cc=kawa@sourceware.org \
--cc=per@bothner.com \
--cc=phiroc@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).