public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: phiroc@free.fr
To: phiroc@free.fr
Cc: kawa@sourceware.org
Subject: Re: define-syntax can only be used with local variables
Date: Thu, 16 Sep 2021 12:02:37 +0200 (CEST)	[thread overview]
Message-ID: <2141982858.217799834.1631786557791.JavaMail.root@zimbra65-e11.priv.proxad.net> (raw)
In-Reply-To: <238885631.213516695.1631689815595.JavaMail.root@zimbra65-e11.priv.proxad.net>

Hello,
here's an explanation :

"The statement (set! *myglobal* "This does not") is executed in the transformer environment, not the normal environment. So it's not able to find *myglobal. We need to get both the expressions executed in the environment where *myglobal* is defined. "

cf. https://stackoverflow.com/questions/5509837/set-global-from-scheme-macro



----- Mail original -----
De: "phiroc--- via Kawa" <kawa@sourceware.org>
À: kawa@sourceware.org
Envoyé: Mercredi 15 Septembre 2021 09:10:15
Objet: Re: define-syntax can only be used with local variables

Good morning,
on Windows 10, using Kawa 3.1.1 and JDK 1.8.0_191, (nil2! y) fails to set y to '(0).
Hence, there's probably a bug in the Kawa code (unless, in Scheme, macros are not supposed to set dynamic variables).
Best regards,
Philippe

-----------------------------------------------




(define-syntax nil2!
    (syntax-rules ()
        ((_ x)
             (set! x '(0)))))

(define y '(1))
(nil2! y)
(display y) (newline)




----- Mail original -----
De: "Per Bothner" <per@bothner.com>
À: "Damien MATTEI" <Damien.MATTEI@univ-cotedazur.fr>
Cc: kawa@sourceware.org
Envoyé: Mardi 14 Septembre 2021 21:30:55
Objet: Re: define-syntax can only be used with local variables



On 9/14/21 11:38 AM, Damien Mattei wrote:
> message of compiler is big, here is a part:
> 
> (for f in kawa/standard/SchemeScriptEngineFactory.java kawa/GuiConsole.java kawa/GuiInPort.java kawa/ReplPane.java kawa/ReplDocument.java kawa/ReplPaneOutPort.java gnu/kawa/models/Box.java gnu/kawa/models/Button.java gnu/kawa/models/Column.java gnu/kawa/models/DDimension.java gnu/kawa/models/Display.java gnu/kawa/models/DrawImage.java gnu/kawa/models/DrawShape.java gnu/kawa/models/FillShape.java gnu/kawa/models/Label.java gnu/kawa/models/Model.java gnu/kawa/models/ModelListener.java gnu/kawa/models/MenuItem.java gnu/kawa/models/Picture.java gnu/kawa/models/Pictures.java gnu/kawa/models/PictureToSvg.java gnu/kawa/models/PictureVisitor.java gnu/kawa/models/PBox.java gnu/kawa/models/Row.java gnu/kawa/models/Spacer.java gnu/kawa/models/StandardColor.java gnu/kawa/models/SVGUtils.java gnu/kawa/models/Text.java gnu/kawa/models/Viewable.java gnu/kawa/models/WeakListener.java gnu/kawa/models/Window.java gnu/kawa/models/WithComposite.java gnu/kawa/models/WithPaint.java 
> gnu/kawa/models/WithTransform.java  ; do echo ./$f; done) >>tmp-list
> mv tmp-list tmp-sources1.list
> javac -d . -classpath ".:.:$CLASSPATH" -g @tmp-sources1.list
> ./gnu/lists/CharSeq.java:11: error: types CharSequence and Sequence<E> are incompatible;
> public interface CharSeq
>         ^
>    interface CharSeq inherits abstract and default for isEmpty() from types CharSequence and Sequence
>    where E is a type-variable:
>      E extends Object declared in interface Sequence

I'm trying the latest (gitlab) Kawa with the JDK 17 (general release today).
I'm not seeing this error.  I'm seeing the warnings, most of which seem to
be easily fixable (by using 'Integer.valueOf' instead of 'new Integer' etc);
I'm working on those now.

-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

  reply	other threads:[~2021-09-16 10:02 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
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 [this message]
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=2141982858.217799834.1631786557791.JavaMail.root@zimbra65-e11.priv.proxad.net \
    --to=phiroc@free.fr \
    --cc=kawa@sourceware.org \
    /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).