From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxime Devos Newsgroups: gmane.lisp.guile.devel Subject: RE: Define works different when Compile and Eval Date: Fri, 21 Jun 2024 16:40:08 +0200 Message-ID: <20240621164008.eEg72C00D1xd29F01Eg7DF@baptiste.telenet-ops.be> References: <875xu5i9qr.fsf@trop.in> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_2C90FE6F-8F45-41C5-94A0-707036B06311_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3730"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "guile-devel@gnu.org" To: Attila Lendvai , Andrew Tropin Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Fri Jun 21 16:40:55 2024 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sKfRe-0000Zd-Hu for guile-devel@m.gmane-mx.org; Fri, 21 Jun 2024 16:40:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKfR4-0007dF-Mk; Fri, 21 Jun 2024 10:40:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKfR3-0007c6-23 for guile-devel@gnu.org; Fri, 21 Jun 2024 10:40:17 -0400 Original-Received: from baptiste.telenet-ops.be ([2a02:1800:120:4::f00:13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sKfR0-0008C9-5I for guile-devel@gnu.org; Fri, 21 Jun 2024 10:40:16 -0400 Original-Received: from [IPv6:2a02:1811:8c0e:ef00:d515:5f1a:ab1d:db2] ([IPv6:2a02:1811:8c0e:ef00:d515:5f1a:ab1d:db2]) by baptiste.telenet-ops.be with bizsmtp id eEg72C00D1xd29F01Eg7DF; Fri, 21 Jun 2024 16:40:08 +0200 Importance: normal X-Priority: 3 In-Reply-To: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=telenet.be; s=r24; t=1718980808; bh=BipvQ8T6F894avst8YqEuu4TWAJHMAa5X8oXrCj+IWU=; h=To:Cc:From:Subject:Date:In-Reply-To:References; b=TtxPgzfO6JXdjjX5Ir2iRqIOypqpTSWv8pLJSetwePsDPW2kjErMBgMZgXY3t43PU fSrCMHCKlfQswBMOae9dBd2RhXnFQxpT/HsJKu6PQS5h5KIj/DdXZX3VCppQZH/50l tzV+KQP/ieC7P2PaRQilixKvQZ+wVPpG3nnYZaW+iw6xc9y5UX1Osm7AflBGOd9Th2 VO1KWItipdPd4VVslzbU0zrtu3JlwDH1wNoZRr566c4uISUAirT4Pi9oOnjkVJWmUj vF6rLs3oT0Bc+tZuDkJa4+PIsRNRYTsP1SXhcl6UFbNvIwIL3nUw8l911jR46y1hAg dYUXKziDrlm+Q== Received-SPF: pass client-ip=2a02:1800:120:4::f00:13; envelope-from=maximedevos@telenet.be; helo=baptiste.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:22459 Archived-At: --_2C90FE6F-8F45-41C5-94A0-707036B06311_ Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" >compile does not evaluate (aka load) the definitions, it only compiles the= m. Usually, sure, but in the code =E2=80=98#:to =E2=80=98value=E2=80=9D was se= t. From the manual: >As discussed before (see=C2=A0Object File Format), bytecode is in ELF form= at, ready to be serialized to disk. But when compiling Scheme at run time, = you want a Scheme value: for example, a compiled procedure. For this reason= , so as not to break the abstraction, Guile defines a fake language at the = bottom of the tower: > * Value Now, as example it compiled a lambda expression into a procedure, but it ca= n be done for Scheme expressions that don=E2=80=99t evaluate to procedures = as well. The definition =E2=80=98(define a whatever)=E2=80=99 strictly spea= king isn=E2=80=99t an expression, but it appears the compilation stack does= n=E2=80=99t care. >alternatively, you yourself can explicitly call the lambda returned by com= pile. In this particular case, no lambdas are returned. Best regards, Maxime Devos. --_2C90FE6F-8F45-41C5-94A0-707036B06311_ Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8" = --_2C90FE6F-8F45-41C5-94A0-707036B06311_--