From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?Linus_Bj=C3=B6rnstam?= Newsgroups: gmane.lisp.guile.devel Subject: Re: unhandled constant? Date: Fri, 31 Jan 2020 21:01:13 +0100 Message-ID: <07e36ec2-0c0c-4786-9040-ffcb3418e0bb@www.fastmail.com> References: <8d77f905-31e9-4d0b-973a-82be38360e07@www.fastmail.com> Mime-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="46373"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.1.7-781-gfc16016-fmstable-20200127v1 Cc: guile-devel@gnu.org To: "Han-Wen Nienhuys" Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Fri Jan 31 21:02:00 2020 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 1ixcUJ-000BzI-78 for guile-devel@m.gmane-mx.org; Fri, 31 Jan 2020 21:01:59 +0100 Original-Received: from localhost ([::1]:58908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixcUI-0000CQ-1p for guile-devel@m.gmane-mx.org; Fri, 31 Jan 2020 15:01:58 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38207) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixcTw-00009N-Q0 for guile-devel@gnu.org; Fri, 31 Jan 2020 15:01:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ixcTv-0006JV-Kj for guile-devel@gnu.org; Fri, 31 Jan 2020 15:01:36 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:55471) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ixcTv-0006Ik-Bn for guile-devel@gnu.org; Fri, 31 Jan 2020 15:01:35 -0500 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id DD3CE21C08; Fri, 31 Jan 2020 15:01:34 -0500 (EST) Original-Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Fri, 31 Jan 2020 15:01:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=veryfast.biz; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type:content-transfer-encoding; s=fm1; bh=evNb/ aR2dUDqg2lpOnRIN0BAUWcMl/yspN454tVn82s=; b=K4/3TtCYzNFQzi3/zDW96 Ypy6jGHUO/5Sdd1UY8kJ1vYDj6SrZXWcHf1o6BHprPHOEjMV91KSIopkFQZwPtJI gFrXe1lJ7HSjoZMU+CNghmG7e00AHcyln94cDhrBQoIHyxH7xzUSWI9xIkHIgueP z8lfhVhTIvpn+siJr2hWtn9qIUaES5jFz3WZRzpY2ailqEjEz2EM94FvnL8FQwHH 2qDaDD2c5r/TqOJuNqujsV37dBPHTcizXlt4BoJpw25EH4oTDA62KhsCJ6/M7C6+ sE0BdA+vMw4NKMY7o5xEqK1D5bOzMk59EaQ7qG0CzkV2uMMIEN836pPSHtRYZt8Z A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=evNb/aR2dUDqg2lpOnRIN0BAUWcMl/yspN454tVn8 2s=; b=NP/WEXFq4TfQvJVsmP4iYV9A2kFiUWrKIJQzkXnviBI95OLZx/sTpylvl UYlqEDMw5GW9/TkMKXy57bKZiLXQFvEKc7NaDhuNsK5nmOECvUT4TCLtOcEqIiHd 5NO/shb4+gkaWID3DsMRJZPF/T3XavpCseSKSR8i4C5Ixz/NLqN26x/PeJgQjbJo I4mS5b8sNoTRlcNehegj1fDMvr4pkA3AWkiqp+TDdosRpagcOVF25tnOEQikU+PX 4ilbey9gmOxBl0KDR1JEWjZYk59VMPaf1oZcy46mdZEDk2a5/mkbQZgdAiHj9YSS 8LvR/Z6vq7MoVfi/FztoBYVqdLePw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrgedtgdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtgfesth hqredtreerjeenucfhrhhomhepnfhinhhushgpuehjnphrnhhsthgrmhcuoehlihhnuhhs rdgsjhhorhhnshhtrghmsehvvghrhihfrghsthdrsghiiieqnecuffhomhgrihhnpehgnh hurdhorhhgpdigshegrghllhdrnhhlnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomheplhhinhhushdrsghjohhrnhhsthgrmhesvhgvrhihfhgrsh htrdgsihii X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6AFA4C200A4; Fri, 31 Jan 2020 15:01:34 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.25 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.lisp.guile.devel:20363 Archived-At: Read the docs. That seems to be a documentation bug. Try fiddling with t= he arguments to eval when and see if you can make it work. --=20 Linus Bj=C3=B6rnstam On Fri, 31 Jan 2020, at 20:17, Han-Wen Nienhuys wrote: > On Fri, Jan 31, 2020 at 7:20 PM Linus Bj=C3=B6rnstam > wrote: > > I don't really understand your question. With defmacro and syntax-ca= se you can run arbitrary code. If you just output code that does module-= define! that won't be run until runtime, and thus you cannot depend on t= he result of that module-define! during expansion. You can however wrap = it in an eval-when to solve that issue. That allows you to specify when = code gets run. With module-define! I personally find it all a bit icky, = but I usually stay as far away from phasing as I can :) >=20 > eval-when looks like it might be a solution to the puzzle , but > honestly, the doc at >=20 > https://www.gnu.org/software/guile/manual/html_node/Eval-When.html >=20 > has me mystified. When I run the example through guile 2.2 and > display *compilation-date*, >=20 > I get a different answer each time. Shouldn't it be a fixed timestamp > (of when the compile happened?) >=20 > [hanwen@localhost lilypond]$ guile2.2 e.scm > ;;; note: source file /home/hanwen/vc/lilypond/e.scm > ;;; newer than compiled > /home/hanwen/.cache/guile/ccache/2.2-LE-8-3.A/home/hanwen/vc/lilypond/= e.scm.go > ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0 > ;;; or pass the --no-auto-compile argument to disable. > ;;; compiling /home/hanwen/vc/lilypond/e.scm > ;;; compiled=20 > /home/hanwen/.cache/guile/ccache/2.2-LE-8-3.A/home/hanwen/vc/lilypond/= e.scm.go > Fri Jan 31 20:15:57+0100 2020 > [hanwen@localhost lilypond]$ guile2.2 e.scm > Fri Jan 31 20:15:58+0100 2020 > [hanwen@localhost lilypond]$ guile2.2 e.scm > Fri Jan 31 20:16:00+0100 2020 >=20 > --=20 > Han-Wen Nienhuys - hanwenn@gmail.com - http://www.xs4all.nl/~hanwen >