From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UVczANHS2mFPxAAAgWs5BA (envelope-from ) for ; Sun, 09 Jan 2022 13:19:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qNHZM9DS2mFYLwAAG6o9tA (envelope-from ) for ; Sun, 09 Jan 2022 13:19:28 +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 76D08279F7 for ; Sun, 9 Jan 2022 13:19:28 +0100 (CET) Received: from localhost ([::1]:35496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6XAV-0004TI-Bd for larch@yhetil.org; Sun, 09 Jan 2022 07:19:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6XAD-0004T6-Ff for guix-devel@gnu.org; Sun, 09 Jan 2022 07:19:10 -0500 Received: from [2a02:1800:120:4::f00:14] (port=35932 helo=xavier.telenet-ops.be) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n6XAB-0005Xt-Mc for guix-devel@gnu.org; Sun, 09 Jan 2022 07:19:09 -0500 Received: from [172.20.10.5] ([188.188.4.121]) by xavier.telenet-ops.be with bizsmtp id gcK42600T2cfn6c01cK4Pq; Sun, 09 Jan 2022 13:19:05 +0100 Message-ID: <0802f1bb7418b0b3458c5beb008f4c8dc6fc120c.camel@telenet.be> Subject: Re: Return back original implementation for text-config serialization From: Maxime Devos To: Andrew Tropin , guix-devel@gnu.org, Oleg Pykhalov , Ludovic =?ISO-8859-1?Q?Court=E8s?= Date: Sun, 09 Jan 2022 13:19:04 +0100 In-Reply-To: <878rvp1deg.fsf@trop.in> References: <878rvp1deg.fsf@trop.in> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-1krwYwz9eBeuVjdwdL/f" 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=r22; t=1641730745; bh=je7u91UJdUrjSgF2MLGrjVlbtDH0A/i7y++cqa3cHE8=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=c9xg8srzzHfZ0v4XoN0ktXzA6SCPWSJn5TRHT1FW9zYmV5UILsudIrRxJmU6M7Ufy EUxN9b+9Yu11l6NSigSOezkCtphkIZ2qf3ENe1JI5AkBVGFfXUxtQNxA+h/MAC6uM/ JbvBioPjOk0PrDzrrRaH1sWz412L10G53qH/jc+zdDKwetH+Vy/qSZU95fOENdFz0C dWqxH/zAtSmDkO/vA7fyMVDFc46fAH0zPc0npLdl9pN0BArBOSbxS7Ts6RnwcZArWM es6sXLQo4xzDBhRs9XlANVHCD+LuN4uXr+s4nAtVdxQY/2rFF6v3e4+G1t1tV19KjE 5yas4tnTccNWA== X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:1800:120:4::f00:14 (failed) Received-SPF: pass client-ip=2a02:1800:120:4::f00:14; envelope-from=maximedevos@telenet.be; helo=xavier.telenet-ops.be X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 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, RCVD_IN_DNSWL_LOW=-0.7, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Xinglu Chen , guix-maintainers@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" 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=1641730768; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=je7u91UJdUrjSgF2MLGrjVlbtDH0A/i7y++cqa3cHE8=; b=HOyCZ009SFfERxSiEnxzc7b1HvhUMRPoqdf4xqIF126a4WrOTcsakvYAihfaBVIxMcxgxA hJ03jJrw8RSKU3WXH57OWsc4dKftb/k6O4GMLIgSnkF3hrrYvwNtAkiXj+z0C5aa/rc1Yk NiXKgiwci3oj6UpFd7gjZRQh7nD4laAbV2gNO+h9ueA3M0wxClHj9yAKgcniEFKxYeyo+i BtOH27l1rF6BACRylqrO9BRCE/1YhS5Gk+q4ZKFikdJORG/hzWSpN/GooJIPdCb4w9KUmS b5f6RVGm/rV8uB8DEEwgSbFDAuX/VVwPrb7eQKlvul3K4W7UJFWKBYwF9z00Tg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641730768; a=rsa-sha256; cv=none; b=AaCVKxK+TfZVTgOv/Lb5Zl+TaZ3ASvKqgNaN3CfB7oa4zKCpsDT2Dnpf8cWb//Vr+l9PtV ontIdES8m9QQ0+BNlczLC+hjPDF5ar1JL9UDrwJ7Aan/lx2QRwdJ7Mr/CrBk6uYdMMOwMl YHlOpqvwqfjgehnvJN/iqVDYFzPoJDosSiyVbKBcZrSXOnMnBX1RAztVUb1be6AcU+eDxW IfKUB3FLipssp4yMrsOY5Cbg8uRyIGbtFLWrNSJyPofmvyQyZqHMnYzCXi3b0gcPmKbdFM 1IF/BGWl7sffLJURWo4KD/l2lgjvf2yjeYIB1hKbbdXML1L47Q/9aKz3tfpfbA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=c9xg8srz; dmarc=pass (policy=none) header.from=telenet.be; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -6.01 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=c9xg8srz; dmarc=pass (policy=none) header.from=telenet.be; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 76D08279F7 X-Spam-Score: -6.01 X-Migadu-Scanner: scn1.migadu.com X-TUID: 5KljuPHBkzQ8 --=-1krwYwz9eBeuVjdwdL/f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Andrew Tropin schreef op zo 09-01-2022 om 12:12 [+0300]: > [...] There is another less generalized example, which demonstrates > how > serialization of sway configuration works right now. >=20 > --8<---------------cut here---------------start------------->8--- > `((include ,(local-file "./sway/config")) > =C2=A0 (bindsym $mod+Ctrl+Shift+a exec > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ,(file-appen= d emacs "/bin/emacsclient") -c --eval > "'(eshell)'") > =C2=A0 (bindsym $mod+Ctrl+Shift+o "[class=3D\"IceCat\"]" kill) > =C2=A0 (input * ((xkb_layout us,ru) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (xkb_v= ariant dvorak,)))) > --8<---------------cut here---------------end--------------->8--- >=20 > would yield something like: >=20 > --8<---------------cut here---------------start------------->8--- > include /gnu/store/408jwvh6wxxn1j85lj95fniih05gx5xj-config > bindsym $mod+Ctrl+Shift+a exec /gnu/store/...-emacsclient -c --eval > '(eshell)' > bindsym $mod+Ctrl+Shift+o [class=3D"IceCat"] kill > input * { > =C2=A0=C2=A0=C2=A0 xkb_layout us,ru > =C2=A0=C2=A0=C2=A0 xkb_variant dvorak, > } > --8<---------------cut here---------------end--------------->8--- >=20 > The new text-config serialization implementation (after fee0bc > commit) > doesn't support gexps and tries to insert the literal content of the > file in place where file-like object was used, which >=20 > 1. Confuses the users. [...] > 2. Looks strange implementation-wise. [...] > (mixed-text-file ... > "source \" "\n" > #~(read-everything-from-file > #$(computed-file "unecessary-file-name" > #~#$(local-file "blabla.sh")))) > when originally it was > (mixed-text-file > "source \" "\n" > (local-file "blabla.sh")) Can we have (mixed-text-file "source \" "\n" (local-file "blabla.sh")) and the sway configuration you quoted? That syntax seems reasonable and easy to use to me. But without reintroducing slurp-file-gexp. Greetings, Maxime. --=-1krwYwz9eBeuVjdwdL/f 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+4iGRcl7gUCYdrSuBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7k+BAQCQbEkdNr82Z8J7eJKtAzaTMIvf gSVVSThSSCTIo1LL1QEAgVnpBCifHSgM6fJkONF2AmizHkIqItoeyCidxEKSLw8= =JqJJ -----END PGP SIGNATURE----- --=-1krwYwz9eBeuVjdwdL/f--