From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpout02-ext2.partage.renater.fr (smtpout02-ext2.partage.renater.fr [194.254.241.33]) by sourceware.org (Postfix) with ESMTP id B8CB7385842B for ; Tue, 14 Sep 2021 16:34:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B8CB7385842B 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 zmtaauth02.partage.renater.fr (zmtaauth02.partage.renater.fr [194.254.241.25]) by smtpout20.partage.renater.fr (Postfix) with ESMTP id C0472BFB3F; Tue, 14 Sep 2021 18:34:25 +0200 (CEST) Received: from zmtaauth02.partage.renater.fr (localhost [127.0.0.1]) by zmtaauth02.partage.renater.fr (Postfix) with ESMTPS id A2F7FA02E0; Tue, 14 Sep 2021 18:34:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zmtaauth02.partage.renater.fr (Postfix) with ESMTP id 9B17BA02E4; Tue, 14 Sep 2021 18:34:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at zmtaauth02.partage.renater.fr Received: from zmtaauth02.partage.renater.fr ([127.0.0.1]) by localhost (zmtaauth02.partage.renater.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 48j79s9x7b4x; Tue, 14 Sep 2021 18:34:25 +0200 (CEST) Received: from 90.116.58.252 (unknown [194.254.241.250]) by zmtaauth02.partage.renater.fr (Postfix) with ESMTPA id 39847A02E0; Tue, 14 Sep 2021 18:34:25 +0200 (CEST) Reply-To: Damien.MATTEI@univ-cotedazur.fr Subject: Re: define-syntax can only be used with local variables To: Philippe de Rochambeau , Damien Mattei Cc: Jean-Paul Roy , kawa@sourceware.org References: <971550055.197381511.1631259004148.JavaMail.root@zimbra65-e11.priv.proxad.net> <1301054857.197399065.1631259238004.JavaMail.root@zimbra65-e11.priv.proxad.net> From: Damien Mattei Message-ID: <6f24aba1-97fd-eba9-2eb4-b2bae8d87a72@oca.eu> Date: Tue, 14 Sep 2021 18:34:24 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr X-Renater-Ptge-SpamState: clean X-Renater-Ptge-SpamScore: -100 X-Renater-Ptge-SpamCause: gggruggvucftvghtrhhoucdtuddrgedvtddrudegledguddttdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucftgffptefvgfftnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpehruffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomhepffgrmhhivghnucforghtthgvihcuoegurghmihgvnhdrmhgrthhtvghisehotggrrdgvuheqnecuggftrfgrthhtvghrnhepffdugffgteeviefhheffgeelkeejueeukedttdfguddtgfefvdeghedttefhfeejnecuffhomhgrihhnpehghhgtrhdrihhopdhgihhthhhusghushgvrhgtohhnthgvnhhtrdgtohhmnecukfhppeduleegrddvheegrddvgedurddvhedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelgedrvdehgedrvdeguddrvdehtddphhgvlhhopeeltddrudduiedrheekrddvhedvpdhmrghilhhfrhhomhepffgrmhhivghnucforghtthgvihcuoegurghmihgvnhdrmhgrthhtvghisehotggrrdgvuheqpdhrtghpthhtohepkhgrfigrsehsohhurhgtvgifrghrvgdrohhrghdprhgtphhtthhopehjvggrnhdqphgruhhlrdhrohihsehunhhitggvrdhfrhdprhgtphhtthhopegurghmihgvnhdrmhgrthhtvghisehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhhihhrohgtsehfrhgvvgdrfhhr Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00, BODY_8BITS, KAM_DMARC_STATUS, KAM_SHORT, NICE_REPLY_A, RCVD_HELO_IP_MISMATCH, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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: Tue, 14 Sep 2021 16:34:34 -0000 i made my test on linux with a 2.0 or 2.1 version, testing on mac os x i=20 have the same error you have. I installed it with brew: mattei@macbook-pro-touch-bar ~ % brew install kawa Updating Homebrew... =3D=3D> Auto-updated Homebrew! Updated 1 tap (homebrew/core). =3D=3D> New Formulae abricate=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 cargo-outdated fastq-tools=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 locust=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 reproc age=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 chrpath flamebeare= r=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=20 microsocks=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 rollup airspyhf=C2=A0=C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0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 f2 librist=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 pari-seadata=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 yt-dlp cargo-llvm-lines=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fann lit= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pari-seadata-big =3D=3D> Updated Formulae Updated 2158 formulae. =3D=3D> Renamed Formulae kafkacat -> kcat =3D=3D> Deleted Formulae boost@1.57 boost@1.60=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 procyon-decompi= ler =3D=3D> Downloading https://ghcr.io/v2/homebrew/core/openjdk/manifests/16= .0.2 ########################################################################=20 100.0% =3D=3D> Downloading=20 https://ghcr.io/v2/homebrew/core/openjdk/blobs/sha256:83b39e22b91173ee797= b09e11bbcb08b3cff5c3aeed65f64cb5f8c4 =3D=3D> Downloading from=20 https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:83b39e22b= 91173ee797b09e11bbcb08b3cff5c3a ########################################################################=20 100.0% =3D=3D> Downloading https://ghcr.io/v2/homebrew/core/kawa/manifests/3.1.1= _1 ########################################################################=20 100.0% =3D=3D> Downloading=20 https://ghcr.io/v2/homebrew/core/kawa/blobs/sha256:4832b73db70b9b1c742895= 22820b9ba04c2eab1bf03285e4bfdfc76962 =3D=3D> Downloading from=20 https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:4832b73db= 70b9b1c74289522820b9ba04c2eab1b ########################################################################=20 100.0% =3D=3D> Installing dependencies for kawa: openjdk =3D=3D> Installing kawa dependency: openjdk =3D=3D> Pouring openjdk--16.0.2.arm64_big_sur.bottle.tar.gz =F0=9F=8D=BA=C2=A0 /opt/homebrew/Cellar/openjdk/16.0.2: 643 files, 281.5M= B =3D=3D> Installing kawa =3D=3D> Pouring kawa--3.1.1_1.all.bottle.tar.gz =F0=9F=8D=BA=C2=A0 /opt/homebrew/Cellar/kawa/3.1.1_1: 12 files, 5MB =3D=3D> `brew cleanup` has not been run in the last 30 days, running now.= .. Removing: /Users/mattei/Library/Caches/Homebrew/m4--1.4.18... (228.4KB) Removing: /Users/mattei/Library/Logs/Homebrew/pkg-config... (64B) Removing: /Users/mattei/Library/Logs/Homebrew/libtool... (64B) Removing: /Users/mattei/Library/Logs/Homebrew/gmp... (64B) Removing: /Users/mattei/Library/Logs/Homebrew/libunistring... (64B) Removing: /Users/mattei/Library/Logs/Homebrew/bdw-gc... (64B) Removing: /Users/mattei/Library/Logs/Homebrew/readline... (64B) Removing: /Users/mattei/Library/Logs/Homebrew/m4... (64B) Removing: /Users/mattei/Library/Logs/Homebrew/guile... (64B) Removing: /Users/mattei/Library/Logs/Homebrew/libffi... (64B) mattei@macbook-pro-touch-bar ~ % kawa #|kawa:1|# (define-syntax nil2! #|.....2|#=C2=A0=C2=A0=C2=A0=C2=A0 (syntax-rules () #|.....3|#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ((_ x) #|.....4|#=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 (set! x '(0))))) #|kawa:5|# (define y '(1)) #|kawa:6|# (nil2! y) #|kawa:7|# y (1) with this problem i would made some test with an install from source if=20 you can and on other platform to see if it is a mac os x special=C2=A0=20 problem or a bug in the source code. Damien Le 14/09/2021 =C3=A0 18:14, Philippe de Rochambeau via Kawa a =C3=A9crit=C2= =A0: > I get (1) : > > (define-syntax nil2! > (syntax-rules () > ((_ x) > (set! x '(0))))) > > > #|kawa:1|# (load "define2.scm") > #|kawa:2|# (define y '(1)) > #|kawa:3|# y > (1) > #|kawa:4|# (nil2! y) > #|kawa:5|# y > (1) > #|kawa:6|# > > I am using Kawa 3.1.1 on Macosx. > > Philippe > > >> Le 14 sept. 2021 =C3=A0 14:42, Damien Mattei = a =C3=A9crit : >> >> i have test one of your example and it works fine on my system: >> mattei@moita ~]$ kawa >> #|kawa:1|# (define-syntax nil2! >> (syntax-rules () >> ((_ x) >> (set! x '(0))))) >> #|(---:2|# #|(---:3|# #|(---:4|# #|kawa:5|# >> #|kawa:6|# (define y '(1)) >> (nil2! y) >> (display y) (newline)#|kawa:7|# #|kawa:8|# >> (0) >> #|kawa:9|# y >> (0) >> >> Damien >> >> On Fri, Sep 10, 2021 at 9:34 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). >> When I run the code with LispKit Go Scheme, global variables (such as = y below) are also set. >> What gives? >> Many thanks. >> Philippe >> >> >> >> ;; >> ;; ..\bin\kawa -C .\javafx0.scm >> ;; java -cp "..\lib\kawa.jar;." javafx0 >> >> (let ((x '(1 2 3))) >> (define-syntax nil! >> (syntax-rules () >> ((_ x) >> (set! x '())))) >> (nil! x) (newline) (display x) (newline)) >> >> (define-syntax nil2! >> (syntax-rules () >> ((_ x) >> (set! x '(0))))) >> >> (let ((x2 '(4 5 6))) >> (nil2! x2) >> (display x2) (newline)) >> >> (define y '(1)) >> (nil2! y) >> (display y) (newline) >> >> (define (f-nil! x) >> (set! x '())) >> >> (define z 4) >> (f-nil! z) >> (display z)