From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sEm2MQeAEmI5eAAAgWs5BA (envelope-from ) for ; Sun, 20 Feb 2022 18:53:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id ALAWLweAEmKnDgEA9RJhRA (envelope-from ) for ; Sun, 20 Feb 2022 18:53:11 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C5E9A36EDF for ; Sun, 20 Feb 2022 18:53:10 +0100 (CET) Received: from localhost ([::1]:36096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nLqOT-0001MV-U7 for larch@yhetil.org; Sun, 20 Feb 2022 12:53:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLqOM-0001MN-Js for guix-patches@gnu.org; Sun, 20 Feb 2022 12:53:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39771) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nLqOM-0000i9-A8 for guix-patches@gnu.org; Sun, 20 Feb 2022 12:53:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nLqOM-0000wq-1V for guix-patches@gnu.org; Sun, 20 Feb 2022 12:53:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v3 09/15] gnu: Add racket-vm-cgc. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 20 Feb 2022 17:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler , 53878@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Attila Lendvai , Maxime Devos , Malte Gerdes , raingloom , zimoun Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.16453795563607 (code B ref 53878); Sun, 20 Feb 2022 17:53:01 +0000 Received: (at 53878) by debbugs.gnu.org; 20 Feb 2022 17:52:36 +0000 Received: from localhost ([127.0.0.1]:33668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLqNv-0000w7-Pf for submit@debbugs.gnu.org; Sun, 20 Feb 2022 12:52:36 -0500 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:48905) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLqNu-0000vr-OY for 53878@debbugs.gnu.org; Sun, 20 Feb 2022 12:52:35 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 9815E58012C; Sun, 20 Feb 2022 12:52:29 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 20 Feb 2022 12:52:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= philipmcgrath.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; bh=3oxIXBuk/duISD TWWysjgsyM9VdMqhYMeGwdCoZWTh4=; b=h/0Va6osR7Bp+IekP4OI8dzquJ+PWq F8g1NJ3gexMCg2jooPtNMy/qxUA1GPJkKCbk5+n648SYhBkXL4U0xv+fXkvlQAO1 4Me7wPYIBwug4vgCphUG/SFWUrf92elxFYOfwLVhg21FJsD0tHhjH9USdAjnD0Ny wy1b49+Rpb8tZllLVMvCPdV0CiOElvLm/ymfm8J4M+DWGz4cVmnDKeDb+AvMc4jn c+lGm47NM4AkApBxN8SsIqbGjI9ncV+8lnngTAjXnEwJiympiyFBotrfc7aLdXjk SOciZ0pofM/PgWiVgIhamg0RL4qQblmo/mOVXgijLufULHOpbtTBfnPg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=3oxIXBuk/duISDTWW ysjgsyM9VdMqhYMeGwdCoZWTh4=; b=fkx30aKazUTAKHHYkVxOmGBdFyg4e+nYa qgC3H7ypUSxW47pDK4SiWJDscC7cMDgbQLkfaOb26EEm+GJwOEwfHX5VJYsdH5b6 h/o9cJvkZ/q/upG1zoLdCBh4O90Mzf+vFjxNVWJhHypzCTa8kQbju6/oAeo2fAhs aR6Meo326Ut7Lz2hsiPKJA3QRCh8X5g1NI4H3E1RuyXafr8ckWWr8Zk1ZoQ/zFDl eAZLCLgEsSLXbBaLiDxie0uBVidIc54Pt7K1zLJLwmf7w4TtTL0T1gP4cw53yMaN HmB85e0UnRN2585qlSLUqu4LZ2JYyPcUeBO2Z2s07PNRkKJC4E5qQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeeggddutdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhggtgesghdtreertddtjeenucfhrhhomheprfhhihhlihhp ucfotgfirhgrthhhuceophhhihhlihhpsehphhhilhhiphhmtghgrhgrthhhrdgtohhmqe enucggtffrrghtthgvrhhnpefhieelgefghedvhfdtvdegkeffffeihfefjeeggedtkeev ueegkedukeekgefgueenucffohhmrghinhepghhnuhdrohhrghenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhilhhiphesphhhihhlihhp mhgtghhrrghthhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 20 Feb 2022 12:52:28 -0500 (EST) From: Philip McGrath Date: Sun, 20 Feb 2022 12:52:22 -0500 Message-ID: <5037281.s90xYg8xyF@bastet> In-Reply-To: References: <20220208151316.1897345-1-philip@philipmcgrath.com> <1853902.IiyMIqa0Cy@bastet> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1812931.zRP7H386fE"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645379591; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=3oxIXBuk/duISDTWWysjgsyM9VdMqhYMeGwdCoZWTh4=; b=nhyhcHgNdbzFABfSEUQRLVQJQ11BPFvKPZripXVFOB1y9t6o/8j3gO6mKO//FyrRaglPmv rdukWK3eiiEkP7WCbsevDMC4qOPZvdMK/863mQQTQZFEQehOjDIYWrdARteNyNnfPtpQml dgspljhlapA6oBP50Ybgr2LzUzWhxnT0DU7ZeJDkW5UhqzZ6oUKNQrHRGiwm+e3SJFXMWL EOBEqNSxxag2b9S0rP7Ju9xLuUlVRICZ59YcJJL0uHBM/EDicogbCPvicd3aC9hYfD46hS lk9FY6SOvfhnxwQhSylKXwxTgdpjfR+hCiRsyR7nFesiDRa4irhcGR0AMCLByg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645379591; a=rsa-sha256; cv=none; b=C0e6M/9+lWpFFZlbJjXPUL+N9euFH35UUvZhiejl52oo/rCoE46wSKL+XmJeHYM0Io7UB9 OTiH2I5xiVjygU86jFHI5MbLrBOpsNC/1cioRYpzUAR57CcwQ9BLVIlqZmhPJYWW6oTUIq UkZkWBn3gd5OYgd2GL622yvWLcyK3J0ovKWpYIN6Koh+s+XZehZSGLA5E7EPQ31rjIT1pn TpOZa3qtu5pLKS6uhyqPCMqHZTyLg6Ul3BeLMdxoPO7mjwP5gwmufcKG1YLDWSm6ppzo2M hvo/36zS3xKK/oA/saICzfvu+hBZYUgo6TtrSFuRbRvmEjy64Mg6/VmEahb5rg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm1 header.b="h/0Va6os"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=fkx30aKa; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm1 header.b="h/0Va6os"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=fkx30aKa; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C5E9A36EDF X-Spam-Score: -2.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: RCqQrXtffHti --nextPart1812931.zRP7H386fE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Philip McGrath To: Liliana Marie Prikler , 53878@debbugs.gnu.org, Ludovic =?ISO-8859-1?Q?Court=E8s?= Cc: Attila Lendvai , Malte Gerdes , zimoun , raingloom , Maxime Devos Subject: Re: [PATCH v3 09/15] gnu: Add racket-vm-cgc. Date: Sun, 20 Feb 2022 12:52:22 -0500 Message-ID: <5037281.s90xYg8xyF@bastet> In-Reply-To: References: <20220208151316.1897345-1-philip@philipmcgrath.com> <1853902.IiyMIqa0Cy@bastet> Hi, On Sunday, February 20, 2022 11:48:01 AM EST Liliana Marie Prikler wrote: > Am Sonntag, dem 20.02.2022 um 09:09 -0500 schrieb Philip McGrath: > > Hi, > >=20 > > On Sunday, February 20, 2022 4:03:26 AM EST Liliana Marie Prikler > >=20 > > wrote: > > > So here's my suggestion: > > >=20 > > > Inside chez-and-racket-bootstrap, define (make-) functions > > > for > > > the following: > > > - chez-bootstrap-bootfiles, chez-for-racket-bootstrap-bootfiles: > > > Taking version and origin. > > > - racket-vm-cgc: Taking version and origin. > > > - racket-vm-bc: Taking racket-vm-cgc. > > > - racket-vm-cs: Taking racket-vm-bc. > > >=20 > > > Inside chez, define chez-scheme, as well as non-bootstrapped > > > versions of stex et al. Also define make-chez-scheme-for-racket, > > > taking version and origin as parameter. Finally, define chez- > > > scheme-for-system, which uses (resolve-interface '(gnu packages > > > racket)) to get racket's version and > > > origin. > > >=20 > > > Inside racket, define %racket-version, %racket-origin, racket- > > > minimal > > > and racket. It'd also be good if you made local definitions > > > (define racket-vm-cgc (make-racket-vm-cgc %racket-version %racket- > > > origin)) > > > (define racket-vm-bc (make-racket-vm-bc racket-vm-cgc)) > > > ... > > > in this file. > >=20 > > My understanding=E2=80=94which is not very good!=E2=80=94is that this w= ould have the > > same problem we do currently. It would be analogous to my example >=20 > > from : > Well, for one this claim is both verifiable and falsifiable by way of > implementation. For another, I don't really see the issue however. > Since those bindings would be local to racket.scm and not used anywhere > else, I don't think there is a cycle to be found anywhere. >=20 While working on v4, I did try using `racket-vm-for-system` at what Ludo=E2= =80=99=20 called "the top level of a module", and I encountered the same error. > > > But Ludo=E2=80=99's examples show that's wrong: those uses of `chez > > > scheme` are in what the "expansion contexts" model would call > > > "expression contexts". > > >=20 > > > Instead, I think rule =E2=84=96 2 prohibits any reference to a variab= le > > > imported from another (gnu packages ...) module that will be > > > evaluated when the (gnu packages ...) modules are=E2=80=94visited? > > > instantiated? [2][3]=E2=80=94IDK when exactly, but, for practical pur= poses, > > > any variable reference that is not underneath a lambda abstraction. > > >=20 > > > If that's right, IIUC, it would mean that: > > >=20 > > > (define chez-scheme-for-racket > > > (make-chez-scheme-for-racket ...)) > > >=20 > > > would also be prohibited. > > >=20 > > > On the other hand, uses of `(racket-vm-for-system)` and `(chez- > > > scheme-for-system)` in an `imports` field should still be fine, > > > thanks to the implicit thunks. > >=20 > > The reference to `make-chez-scheme-for-racket` or `make-racket-vm-cs` > > or any such procedure defined in "chez-and-racket-bootstrap.scm" > > would be evaluated when "racket.scm" is instantiated=E2=80=94or whenever > > precisely it is that causes the problem. >=20 > I don't think that'd be a problem since make-chez-scheme-for-racket is > itself a function. If it still is, one pair of brackets makes it not > so. This is a well-explored technique of resolving chains, used for > example in our build system code. chez-and-racket-bootstrap.scm should > imo not be imported anywhere but chez.scm and racket.scm, so it by > itself can not form a cycle. Only chez.scm and racket.scm can, but > there are ways of making those well-formed. AFAICT the error is not from applying the function bound to the variable=20 `racket-vm-for-system` (or `make-racket-vm-bc`, or whatever), but from=20 evaluating the reference to a variable imported from a sibling `(gnu packages ...)` module, regardless of the value to which the variable = is=20 bound. My current best guess at Guile's semantics for mutually-recursive modules i= s=20 that it's something like the `letrec` restriction, e.g. the difference betw= een=20 these two examples (given an implementation that fully enforces `letrec`=20 semantics, as opposed to `letrec*`): =2D-8<---------------cut here---------------start------------->8--- $ scheme=20 Chez Scheme Version 9.5.6 Copyright 1984-2021 Cisco Systems, Inc. > (letrec ((a (lambda () 1)) (b a)) 2) Exception: attempt to reference undefined variable a Type (debug) to enter the debugger. > (letrec ((a (lambda () 1)) (b (lambda () (a)))) (b)) 1 =2D-8<---------------cut here---------------end--------------->8--- >=20 > See (standard-packages) in guix/build-system/gnu.scm pointing to (gnu > packages commencement) or (default-python) in guix/build- > system/python.scm for pointers. Given Ludo=E2=80=99's explanation, I think the difference (or at least an i= mportant=20 difference) is that those functions are defined in `(guix ...)` modules, as= =20 opposed to `(gnu packages ...)` modules. But I wish I knew with any degree of certainty *why* this would be true, if= =20 indeed it is. Maybe Maxime knows? =2DPhilip --nextPart1812931.zRP7H386fE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE9GWrrNY3rqwUFVXPygNjjfo/HHoFAmISf9YACgkQygNjjfo/ HHpJ5w/9F2cWQgS0/P/mH5L1/asF6h5Sk4oP7Yq0kjGpLXVdPAcwQhj26PXTebYo DXCCb+tKrPrQdMgPfaYzOBkASw+WAMG4iIvwyVOOtJGmSOtBgg9oIHL2f8Ahn62n PoGpRLxoWRzfBM/fisps2aPn6dPVt3dbX+mENYemeKQUGX5pVBtSMNqIynMVQG1Q wPv2ybJaWDBsFIUP12yFysiQkrfR3tzJ5M0VSBnQqI+CGs2J03JBiNFlfqdtCd7f 1akrgl5nZh+FUSbRstYtGmlOofkiTb93HeeJSNe5cRm1WzO+44frj9Az6ZRTeudl +RmcaHugv4ZbHKcGw5r58DBdVupU1WGaqRJR0UkCpLxrBQzvPKQ8TGwpuR8n7U7P WIixrpIlaB6aSzY6RlRh8Xn1nY/26sWmIdvdq3r8UIUmHFznKn1U0eH2sMgso8Ty 9QiuL2mbPu10UW8RxgsLtMdnsT5MUuoie2daqp4c6cTTrU2a5npSN8yT1c4BFyjl qAls+HfTWgHWYMZ4ZXfjr8sSC7LT4Q6UKK98ilZgL0GHCpX7juNis5aeu1xl558D ta4KzNGrVeVJAheEqCaaOksH8eJjGhmG/Rp0WJhe7rni9axxMVbIDiBLON0rAkjF DPxBvvXUOZ2Ckje9Vz+UC8DIk5+wr8sdfLf9vDPNt+JBfyaOO+4= =c4VN -----END PGP SIGNATURE----- --nextPart1812931.zRP7H386fE--