From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpout01-ext1.partage.renater.fr (smtpout01-ext1.partage.renater.fr [194.254.240.32]) by sourceware.org (Postfix) with ESMTP id 7E35F385843A for ; Thu, 16 Sep 2021 13:44:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7E35F385843A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=oca.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oca.eu Received: from zmtaauth01.partage.renater.fr (zmtaauth01.partage.renater.fr [194.254.240.25]) by smtpout10.partage.renater.fr (Postfix) with ESMTP id E5D8D62F1B; Thu, 16 Sep 2021 15:44:30 +0200 (CEST) Received: from zmtaauth01.partage.renater.fr (localhost [127.0.0.1]) by zmtaauth01.partage.renater.fr (Postfix) with ESMTPS id D671F140649; Thu, 16 Sep 2021 15:44:30 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zmtaauth01.partage.renater.fr (Postfix) with ESMTP id CEADA14064E; Thu, 16 Sep 2021 15:44:30 +0200 (CEST) X-Virus-Scanned: amavisd-new at zmtaauth01.partage.renater.fr Received: from zmtaauth01.partage.renater.fr ([127.0.0.1]) by localhost (zmtaauth01.partage.renater.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id oVxPdAGcCRTT; Thu, 16 Sep 2021 15:44:30 +0200 (CEST) Received: from [192.168.108.254] (unknown [194.254.241.249]) by zmtaauth01.partage.renater.fr (Postfix) with ESMTPA id 8E257140649; Thu, 16 Sep 2021 15:44:30 +0200 (CEST) Reply-To: Damien.MATTEI@univ-cotedazur.fr Subject: Re: define-syntax can only be used with local variables To: phiroc@free.fr, Damien MATTEI Cc: kawa@sourceware.org, Jean-Paul Roy References: <1475543959.217980716.1631790302735.JavaMail.root@zimbra65-e11.priv.proxad.net> From: Damien MATTEI Message-ID: Date: Thu, 16 Sep 2021 15:44:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <1475543959.217980716.1631790302735.JavaMail.root@zimbra65-e11.priv.proxad.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Renater-Ptge-SpamState: clean X-Renater-Ptge-SpamScore: 0 X-Renater-Ptge-SpamCause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehgedgieefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecutffgpfetvffgtfenuceurghilhhouhhtmecufedttdenucenucfjughrpehruffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomhepffgrmhhivghnucfotefvvffgkfcuoegurghmihgvnhdrmhgrthhtvghisehotggrrdgvuheqnecuggftrfgrthhtvghrnhepheevvdekvdfhfeeiheevveetgefgvdektdehueeffeeigfejheeviedvffekgfehnecuffhomhgrihhnpehsthgrtghkohhvvghrfhhlohifrdgtohhmnecukfhppeduleegrddvheegrddvgedurddvgeelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelgedrvdehgedrvdeguddrvdegledphhgvlhhopegludelvddrudeikedruddtkedrvdehgegnpdhmrghilhhfrhhomhepffgrmhhivghnucfotefvvffgkfcuoegurghmihgvnhdrmhgrthhtvghisehotggrrdgvuheqpdhrtghpthhtoheplfgvrghnqdfrrghulhdrtfhohiesuhhnihgtvgdrfhhrpdhrtghpthhtohepkhgrfigrsehsohhurhgtvgifrghrvgdrohhrghdprhgtphhtthhopeffrghmihgvnhdrofetvffvgffksehunhhivhdqtghothgvuggriihurhdrfhhrpdhrtghpthhtohepphhhihhrohgtsehfrhgvvgdrfhhr Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, BODY_8BITS, GB_TO_NAME_FREEMAIL, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: kawa@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Kawa mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2021 13:44:38 -0000 you know in Scheme ,things are sometimes weird, look at this example=20 where i just encountered an 'undefined x' at line 4 of foo: #lang racket (define (foo) =C2=A0 (let ((x 7)) =C2=A0=C2=A0=C2=A0 (let ((x 3)) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (display x) ;; undefined x here ! =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (newline) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (define x 2) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (display x) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (newline)) =C2=A0=C2=A0=C2=A0 (display x) =C2=A0=C2=A0=C2=A0 (newline))) it was just that the define 2 lines after! create the problem i admit it is an example build to create problems! LOL Damien Le 16/09/2021 =C3=A0 13:05, phiroc@free.fr a =C3=A9crit=C2=A0: > Hi, > I've no idea. The Kawa Developers, if they are are reading this thread,= may be able to answer your question. > Perhaps, there was no distinction between the Transformer (Macro) Envir= onment and the Normal Environment in Kawa 2.0, contrary to Kawa 3.1.1. > All in all, the Chinese Wall between the Transformer Environment and th= e Normal Environment is good because it prevents you from shooting yourse= lf in the foot. > > > ----- Mail original ----- > De: "Damien MATTEI" > =C3=80: kawa@sourceware.org > Envoy=C3=A9: Jeudi 16 Septembre 2021 12:41:31 > Objet: Re: define-syntax can only be used with local variables > > but why is it working with one version of kawa and not another? or did = i > missed something in discussion? > > Damien > > Le 16/09/2021 =C3=A0 12:02, phiroc--- via Kawa a =C3=A9crit=C2=A0: > >> Hello, >> here's an explanation : >> >> "The statement (set! *myglobal* "This does not") is executed in the tr= ansformer environment, not the normal environment. So it's not able to fi= nd *myglobal. We need to get both the expressions executed in the environ= ment where *myglobal* is defined." >> >> cf. https://stackoverflow.com/questions/5509837/set-global-from-scheme= -macro >> >> >> >> ----- Mail original ----- >> De: "phiroc--- via Kawa" >> =C3=80: kawa@sourceware.org >> Envoy=C3=A9: 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, mac= ros 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" >> =C3=80: "Damien MATTEI" >> Cc: kawa@sourceware.org >> Envoy=C3=A9: 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/GuiConsol= e.java kawa/GuiInPort.java kawa/ReplPane.java kawa/ReplDocument.java kawa= /ReplPaneOutPort.java gnu/kawa/models/Box.java gnu/kawa/models/Button.jav= a gnu/kawa/models/Column.java gnu/kawa/models/DDimension.java gnu/kawa/mo= dels/Display.java gnu/kawa/models/DrawImage.java gnu/kawa/models/DrawShap= e.java gnu/kawa/models/FillShape.java gnu/kawa/models/Label.java gnu/kawa= /models/Model.java gnu/kawa/models/ModelListener.java gnu/kawa/models/Men= uItem.java gnu/kawa/models/Picture.java gnu/kawa/models/Pictures.java gnu= /kawa/models/PictureToSvg.java gnu/kawa/models/PictureVisitor.java gnu/ka= wa/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/WeakListe= ner.java gnu/kawa/models/Window.java gnu/kawa/models/WithComposite.java g= nu/kawa/models/WithPaint.java >>> gnu/kawa/models/WithTransform.java=C2=A0 ; 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 are incompatible; >>> public interface CharSeq >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^ >>> =C2=A0 interface CharSeq inherits abstract and default for isEmpty= () from types CharSequence and Sequence >>> =C2=A0 where E is a type-variable: >>> =C2=A0=C2=A0=C2=A0 E extends Object declared in interface Sequence >> I'm trying the latest (gitlab) Kawa with the JDK 17 (general release t= oday). >> I'm not seeing this error. I'm seeing the warnings, most of which see= m to >> be easily fixable (by using 'Integer.valueOf' instead of 'new Integer'= etc); >> I'm working on those now. >>