From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:f42::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UI3TCE4hymFWDQAAgWs5BA (envelope-from ) for ; Mon, 27 Dec 2021 21:25:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mLZ0BU4hymFmeQAAauVa8A (envelope-from ) for ; Mon, 27 Dec 2021 21:25:50 +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 BC5413698D for ; Mon, 27 Dec 2021 21:25:49 +0100 (CET) Received: from localhost ([::1]:51928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n1wZ1-0007d6-Fi for larch@yhetil.org; Mon, 27 Dec 2021 15:25:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1wYI-0007ch-Ki for bug-guix@gnu.org; Mon, 27 Dec 2021 15:25:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:32849) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n1wYI-00043e-Av for bug-guix@gnu.org; Mon, 27 Dec 2021 15:25:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n1wYI-0001gR-2B for bug-guix@gnu.org; Mon, 27 Dec 2021 15:25:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#52749: G-expressions don't consistently preserve #nil Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 27 Dec 2021 20:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52749 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Philip McGrath , 52749@debbugs.gnu.org Received: via spool by 52749-submit@debbugs.gnu.org id=B52749.16406366706418 (code B ref 52749); Mon, 27 Dec 2021 20:25:02 +0000 Received: (at 52749) by debbugs.gnu.org; 27 Dec 2021 20:24:30 +0000 Received: from localhost ([127.0.0.1]:44395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1wXl-0001fS-Ra for submit@debbugs.gnu.org; Mon, 27 Dec 2021 15:24:30 -0500 Received: from laurent.telenet-ops.be ([195.130.137.89]:55476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1wXh-0001fG-HC for 52749@debbugs.gnu.org; Mon, 27 Dec 2021 15:24:28 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by laurent.telenet-ops.be with bizsmtp id bYQP260084UW6Th01YQPm0; Mon, 27 Dec 2021 21:24:23 +0100 Message-ID: <20d06a3f6857a8d30039bc720a9b8c4ecf09702d.camel@telenet.be> From: Maxime Devos Date: Mon, 27 Dec 2021 20:24:18 +0000 In-Reply-To: References: <23d2ac1d-737d-787c-5535-c816566461dd@philipmcgrath.com> <6211bc6e48fa8f5dcf8711bba186812f3a5e52c4.camel@telenet.be> <637bb8909bd524ce239d66cc73d1e5ad43ce2ea9.camel@telenet.be> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-tvExMwbCOogf1rDuD/cq" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1640636663; bh=V3p5emmQiuC3kW2Vglnm+LUvMWvjUgdWe6WJF+Sa2Q4=; h=Subject:From:To:Date:In-Reply-To:References; b=fA08EnNDfKBLrQ+8vCbEZUOgIF1dcky6KFdtImxRxJoi1E7BUAj70gJLJA8zJdvQY pBOmZoVovfrM2/Dxiay0yYdYhF5p6OEL/auX4pVV+euw8BxV3ZHfHsUHt2Zpw+fM+7 MI2II+jiCu1HwsF0idgocMpcZm8f2PknIhIzzDhP/SxYqiGJz7ABDYPrFd7rnVS6Xj qiYiw7GEeUF8Szai83R55oEERXVxGd89van9+lAxeiIY+9ZeoB3oFMSr20yMdI/vLW x2c8IudaM0qaKvZDpqcswxRpoHHEPMWYHN+Fqh7JtBe5KKBJV8Nxsi4KKAwHq03EUH 830a7tWy8k1aw== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" 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=1640636749; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=V3p5emmQiuC3kW2Vglnm+LUvMWvjUgdWe6WJF+Sa2Q4=; b=AYAhCkIKCTy/tcEdT33EhQ7NZqssUkTVtlUpd54G7kuqJtJ4t7O29iTlFVJzI3Nc4lvuW3 Bo3jZNeaSPSwq9k02cb+bp7c/56tlsDi1uly6QcPnZyNNtt0ErHe65bMs2WX2hUCztDcs1 s8wXClWsBf0gmMt1g6/fe67uhtbIeNFYbUC0MxjYX6ZXcqc9ZpXJP6vlpJU5uvp/OQdNIR cEIuzAFULH2ThlNbL7ukGVKzpQGWktc6uFc1q1f8ZC28Iv0I1bHZzWSBgK5Wqh6OzPcK9Y B85gvqnUJgcdlYOnD/iWElX7LskQxzS8rjy0JxvRtkyMwQ+Z2n8iURS0uIV4Yg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640636749; a=rsa-sha256; cv=none; b=o+OdiHxq89mClhEQxwKKa15x+89FmrlzfrWGq4Z74Pc8jqMDb5QGlcKTaRAqTugEkrldZC 2NWEOMij9whH4Qe8ChYvY5vX1V1tIRd4pBVSUFm4Y+sqo03BqooyqBn2n9mvs4Izij5+Ml GE997gAJV3eDL8jk8/YdtgImQZzuaV6yLLue7E5JgH7v31KEWmO2qs7aonifbANPu5LOx/ F2/JyxqBBoDnYHLCoqLJB/u8dZayAXVW7ea5Oua4I75JEU6JriE8zDTy1jb7DY6uf9FEJz bIYkLH0ArVNaYzjRjkcbdgHYFotC9SFUdEFTOIp6mFW+ZFBGDhDYh36K3JdNmg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=fA08EnND; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.17 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=fA08EnND; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: BC5413698D X-Spam-Score: -4.17 X-Migadu-Scanner: scn1.migadu.com X-TUID: AaDLYKFO1TWk --=-tvExMwbCOogf1rDuD/cq Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Philip McGrath schreef op ma 27-12-2021 om 13:38 [-0500]: > Hi! >=20 > Just as a general disclaimer, I'm a Racketeer and only incidentally a=20 > Schemer, so I'm not very familiar with the universe of Guile libraries. >=20 > On 12/23/21 01:59, Maxime Devos wrote: > =C2=A0> Philip McGrath schreef op wo 22-12-2021 om 23:25 [-0500]: > =C2=A0>> G-expressions currently do not consistently preserve the distinc= tion > =C2=A0>> between #nil and '(), which causes trouble for programs that rel= y on > =C2=A0>> that distinction. In particular, the issue affects programs that= use > =C2=A0>> (guix build json), because that library uses #nil to represent t= he JSON > =C2=A0>> value `null', whereas it uses '() to represent an empty JSON arr= ay. > =C2=A0> > =C2=A0> The constant #nil is only for elisp compatibility and not somethi= ng > =C2=A0> supposed to be used in Scheme code that isn't for Scheme/elisp > =C2=A0> compatibility, so this seems more a bug in (guix build json) to m= e. >=20 > That was not the impression I had gotten from `info "(guile)Nil"`. For= =20 > example, I think someone who wanted to finish the implementation=20 > described in `info "(guile)ECMAScript"` might want to use #nil for one= =20 > of the false-y ECMAScript values to take advantages of the documented=20 > efficiencies in its bit-level representation. More concretely,=20 > guile-json@1 and guile-json@3 use #nil in the same way as (guix build jso= n). There is =E2=80=98Guile has chosen to support =E2=80=98nil=E2=80=99 as a separate va= lue, distinct from =E2=80=98#f=E2=80=99 and =E2=80=98'()=E2=80=99. This allows existing Schem= e and Elisp code to maintain their current semantics. =E2=80=98nil=E2=80=99, which in Elisp would just = be written and read as =E2=80=98nil=E2=80=99, in Scheme has the external representatio= n =E2=80=98#nil=E2=80=99.=E2=80=99 and =E2=80=98This decision to have =E2=80=98nil=E2=80=99 as a low-level distinc= t value facilitates interoperability between the two languages. Guile has chosen to have Scheme deal with =E2=80=98nil=E2=80=99 as follows: [...]=E2=80=99 and this is only documented under =E2=80=98Emacs Lisp=E2=80=99, though this= doesn't explicitely say it's not supposed to be used elsewhere. Also, see e.g. . Anyway, this doesn't really matter here, because: > So, I agree that: >=20 > On 12/25/21 06:13, Maxime Devos wrote: > > That said, it would be less surprising if the #nil/() distinction is > > preserved by gexp->derivation and friends. This can be done by writing > > our own 'write' procedure. Downside: it might be less efficient than > > Guile's write which is implemented in C. Can be resolved by writing our > > own 'write' procedure in C. > [...] I'll try to look into other parts of your response later. Greetings, Maxime. --=-tvExMwbCOogf1rDuD/cq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYcog8hccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7gn5AP9t2YqS7I+2HUBkqSQN1jTC42RV 8wQP0aZeD3BHgHIN2wD/VzrsOL+oHJ+dA3SY8ZSLzajD0HJvpQxs4enH/LUopwE= =ZOjA -----END PGP SIGNATURE----- --=-tvExMwbCOogf1rDuD/cq--