From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6OJUEpRh/mECjgAAgWs5BA (envelope-from ) for ; Sat, 05 Feb 2022 12:37:56 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MOTSDpRh/mElagAAauVa8A (envelope-from ) for ; Sat, 05 Feb 2022 12:37:56 +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 08AD6307E6 for ; Sat, 5 Feb 2022 12:37:56 +0100 (CET) Received: from localhost ([::1]:42642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGJO7-0001ek-7K for larch@yhetil.org; Sat, 05 Feb 2022 06:37:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGJL8-00084r-OH for guix-devel@gnu.org; Sat, 05 Feb 2022 06:34:51 -0500 Received: from [2a02:1800:120:4::f00:15] (port=35700 helo=andre.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 1nGJL3-0003r6-BE for guix-devel@gnu.org; Sat, 05 Feb 2022 06:34:49 -0500 Received: from [172.20.10.9] ([188.189.241.204]) by andre.telenet-ops.be with bizsmtp id rPag2600K4RJVgC01Pahik; Sat, 05 Feb 2022 12:34:42 +0100 Message-ID: <95f26136ec9babaf6b6544ca169495eb70953249.camel@telenet.be> Subject: Re: Return back original implementation for text-config serialization From: Maxime Devos To: Andrew Tropin , Ludovic =?ISO-8859-1?Q?Court=E8s?= Date: Sat, 05 Feb 2022 12:34:31 +0100 In-Reply-To: <87fspax5ac.fsf@trop.in> References: <878rvp1deg.fsf@trop.in> <87mtjtglxd.fsf@gnu.org> <87o846y24v.fsf@trop.in> <405630188ac22fd2a1f1d0e0555ce061584744a3.camel@telenet.be> <87fspax5ac.fsf@trop.in> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-6xORuBHO+KSFov98ZO9i" 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=1644060882; bh=uwfB1cKKsyGS0+tWPmaebGB8N0N8mMaxqRCNx+HQuFQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=P6dewvNxIcAbevW+YsyLyaJ3Gf90A6Fv3Mfdx5lUfXHoTBHbFPrat5O1FVuwTinVm I/ZjsWV8pkxtVv9/8T6IKgwQssX/MUBChVuHo69n1ifedeua7wrwUeV8ibPwVAjXh1 0+x/zsOdQb8vBv8YPfN8ST9VB5AfWBltUfw/xqIcVwchhFWF1ZfXPddz5wHY2GKKu7 FU06nEqNoGRU9opBSGOXJpZT6LDf0fEgHRRjXT61IULtCg709qBPyBATk4ntJfhrOJ EUOJOpihZGJA6aUyhLTUjLpQI0mgSpzyHoCoyBZ3m24ZejXE7enMcmhv2Gy7ZHqU05 iMtMV8uWCoOhA== X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:1800:120:4::f00:15 (failed) Received-SPF: pass client-ip=2a02:1800:120:4::f00:15; envelope-from=maximedevos@telenet.be; helo=andre.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, T_SCC_BODY_TEXT_LINE=-0.01, WEIRD_QUOTING=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: guix-devel@gnu.org, 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=1644061076; 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=uwfB1cKKsyGS0+tWPmaebGB8N0N8mMaxqRCNx+HQuFQ=; b=Yfn2mwZBLQDICxKVVRFwfIIYqYMRtYrUpP6CsLI4AL9gLQ/invcOIU8s9n9pg1QXsEJZfy D9mD2EW8x6lM62gBRhYoDTFxwF9GNh2lhvPTsHsgg7xQTWLaO+fLNRRRbuufCyGQKLlLQP H3keMiswOUBPMxIR6qYLjYRtAmwVnQqCWpynRKw7DrfeiMEgUTSyvQ5d6+lNKfOVj+ienu xhHUR8ZIp9FxLq+VBGk7dlH5FngmpuiD0HlF3QfW1xWpRVsYs9IXh1EH0lnSvM0gEgwRDa mI8DjWxtEUIMkBJXeqFAsImQxw0+vvmMYmYc3eV58S+L0WUWXD1uYMAFl3r8iQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644061076; a=rsa-sha256; cv=none; b=F4CXy9Ytr8lZtwSvHpiGkcS/4gqWPIHP3porJ6+wA5qjGrKu9qkC9FBFjwO0IvTduM0wTw XMJ935g1FkH5sW1H/efuKSeQHx7b690XtYshz9zMTqObw5TkNQXiuL0couo9by6wzJq5rH 7EOvTOOcVisJldz6ahrkG0bqvHBgj/ipZfPZHTR/exVdVXE4bmWYdeQU9sLYVvjoG3kYdo UOVqNSkHKtkVnQ5ffEcg3n8lZayzSmt7BRutCc9nuu0iabFBEWjlvDaBnmShvHu4/cT2ef jJNRxwVfZMwh3cjaTzDv70YwRDatdZe4Gm34dNBTWXKUn6lGYSRiGCTYqRXcWA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=P6dewvNx; 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.53 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=P6dewvNx; 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: 08AD6307E6 X-Spam-Score: -6.53 X-Migadu-Scanner: scn1.migadu.com X-TUID: FRMNXCafTVlr --=-6xORuBHO+KSFov98ZO9i Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Andrew Tropin schreef op wo 26-01-2022 om 11:36 [+0300]: > In addition to the problems I mentioned above: >=20 > 1. Mixed usage of two configuration languages (nginx-conf and lisp). > 2. Having a string, which should be properly escaped (luckily for > this > example it's not a problem). Mixing two configuration languages can be avoided by supporting everything with records. >=20 > we also: >=20 > 3. Have to implement our own templating engine (using format function > in this case) to share the values from guile with the config. This seems to be the same for this list based configuration system and record based configuraiton system; for the nginx example you gave, all these lists with parentheses need to turned into something with brackets that nginx understands anyway. > 4.1. Don't know where extra-content goes. (It goes to http section > not the > end of the file, so we have to start with "}" to get a correct > configuration). Can be solved by adding missing options to the Guix service definition (and documentation) when the need arises. > 4.2. Don't control where it must be placed. (Can be important in > other > use cases, which I can share if needed). Likewise. > 5. Have inconsistent implementation of extra-config, extra-content, > raw-lines > and other escape hatches (We need to learn it everytime we write a > new > service configuration). Likewise. Also, the mapping of upstream configuration files to lists in Guix seems far from obvious to me: in https://issues.guix.gnu.org/52698, how am I supposed to know that 'us,ru' must be a symbol, why isn't it a string? If one of the strings for some property includes a special character from the configuration language (say, '$'), should it be escaped in Guix ((bindsym ... "[class=3D\"$100 dollars\"]" ...) or (bindsym ... "[class=3D\"\\$100 dollars\""]""))? Why (bindsym ... "[class=3D\"foo\"]") instead of (bindsym ... (=3D class "foo"))? Why (bindsym ... exec emacsclient ...) and not (bindsym ... exec (file-append emacs "/bin/emacsclient) ...)? How am I supposed to know whether emacs is in the path or not, and if it is, is this merely an implementation detail? How would I know if it's (bindsym ... exec emacsclient -c --eval "'(eshell)'") or (bindsym ... "exec emacsclient -c --eval \"'(eshell)'\"")? Since the idea is to keep as close to the configuration language as possible, shouldn't it be the second? Why lists and not vectors? Greetings, Maxime. --=-6xORuBHO+KSFov98ZO9i 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+4iGRcl7gUCYf5gxxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7o96AP9VpfxWwmPJbrcnzjNW4fvNIac0 BrXdSCCyjbtT3nQNUgD/WtpV5qe71ZXJF6Cai3wgRfg4ivOWoic1LRDSFAjxWw8= =JwNh -----END PGP SIGNATURE----- --=-6xORuBHO+KSFov98ZO9i--