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 1FC02385782C for ; Mon, 30 Nov 2020 18:09:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1FC02385782C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=oca.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=damien.mattei@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 67DBBBFB5E for ; Mon, 30 Nov 2020 19:09:17 +0100 (CET) Received: from zmtaauth02.partage.renater.fr (localhost [127.0.0.1]) by zmtaauth02.partage.renater.fr (Postfix) with ESMTPS id 61F0DA038F for ; Mon, 30 Nov 2020 19:09:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zmtaauth02.partage.renater.fr (Postfix) with ESMTP id 5DDE9A03AF for ; Mon, 30 Nov 2020 19:09:17 +0100 (CET) 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 fQJ5T-1q7Z6X for ; Mon, 30 Nov 2020 19:09:17 +0100 (CET) Received: from 90.116.117.253 (unknown [194.254.241.250]) by zmtaauth02.partage.renater.fr (Postfix) with ESMTPA id 2C6F8A038F for ; Mon, 30 Nov 2020 19:09:17 +0100 (CET) Reply-To: Damien.Mattei@unice.fr Subject: Re: Using eval with environments and R7RS modules To: kawa@sourceware.org References: <3c4fc600-110f-e1fe-4421-aeb91c8fab22@oca.eu> <60e9b887-73ef-76f8-87e1-a8158802beef@bothner.com> From: Damien MATTEI Message-ID: <350b87e4-498f-8108-c2f5-f5397356b10f@oca.eu> Date: Mon, 30 Nov 2020 19:09:16 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <60e9b887-73ef-76f8-87e1-a8158802beef@bothner.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr X-Renater-Ptge-SpamState: clean X-Renater-Ptge-SpamScore: 0 X-Renater-Ptge-SpamCause: gggruggvucftvghtrhhoucdtuddrgedujedrudeitddguddtkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucftgffptefvgfftnecuuegrihhlohhuthemuceftddtnecunecujfgurheprhfuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeffrghmihgvnhcuofetvffvgffkuceouggrmhhivghnrdhmrghtthgvihesohgtrgdrvghuqeenucggtffrrghtthgvrhhnpeffveetuedtgeehffegudegkefgueffvdejleevjefhteejvdfhuddvhfelfedtvdenucffohhmrghinhepfihikhhishhouhhrtggvrdhorhhgnecukfhppeduleegrddvheegrddvgedurddvhedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelgedrvdehgedrvdeguddrvdehtddphhgvlhhopeeltddrudduiedruddujedrvdehfedpmhgrihhlfhhrohhmpeffrghmihgvnhcuofetvffvgffkuceouggrmhhivghnrdhmrghtthgvihesohgtrgdrvghuqedprhgtphhtthhopehkrgifrgesshhouhhrtggvfigrrhgvrdhorhhg Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_HELO_IP_MISMATCH, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Mon, 30 Nov 2020 18:09:21 -0000 yes Per i almost never use EVAL, i finally find a better solution than=20 with EVAL in the macro i was writting. I needed to EVAL a quoted argument of a macro but ,it was finally useless= . Le 30/11/2020 =C3=A0 13:21, Per Bothner a =C3=A9crit=C2=A0: > On 11/30/20 2:13 AM, Damien MATTEI wrote: >> (define (foo L) >> >> =C2=A0=C2=A0=C2=A0 (eval L (interaction-environment)) >> >> and i got an error like UNBOUND VARIABLE L >> >> but this not only in Kawa,it is in Scheme, i was in a R5RS , > > The eval functon is really not compatible with lexical scoping, at leas= t > not unless you use a different evaluation strategy which make Scheme > run much slower and use more memory. And that would be all the time, > not just when eval is used (possibly unless you made eval a special > syntax the compiler could recognize, rather than a procedure). > > Scheme from the very beginning has focused on lexical scoping and > being able to compile it to efficient code: > > https://en.wikisource.org/wiki/Lambda_Papers > >> if there is a way to know the current bindings from EVAL i will be hap= py > > Dynamic bindings, yes, but lexical bindings, no.=C2=A0 And that won't c= hange. > >> to know it, because without this , i do not see any use for EVAL , > > I've many times said there is very little use for eval, and that too ma= ny > people overuse it. strange that the SICP cover book put the couple EVAL / APPLY as=20 important notion, APPLY seems more usefull, i will try to find examples in the french edition of this book i have > > If you think you have a good use for eval, you're probably wrong. for now no, but i just discover i have to rewrite code that only works=20 in toplevel (Gasp...) > >> having only the toplevel bindings is not enought for development. > > If you mean that eval is not very useful for debugging, that is true. Damien