From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id kCHPEFSJIWVbSwEAG6o9tA:P1 (envelope-from ) for ; Sat, 07 Oct 2023 18:37:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kCHPEFSJIWVbSwEAG6o9tA (envelope-from ) for ; Sat, 07 Oct 2023 18:37:40 +0200 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 089F6426CD for ; Sat, 7 Oct 2023 18:37:40 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=Z1V5WPfj; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1696696660; 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: content-transfer-encoding:content-transfer-encoding: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=Aj4gDhJXMStntYtLXfQAO0HvJE8UZH2ETwm/HhoCyEE=; b=tzLIYSZ1tzHG3n7GCrVCH+dFEieCmyBGOrqniBe00n2XSwh1VbVcf2hUWVDTjZlLek0BoV hk5L2ImtfpvfUfg5KHa2+JZLhtnArarlb9tHn12Z4DNEvQytXmIhzA50CEF3RD4uWIHEoo 4hspSCOksC1tHMNNQOzeHt8aGdditYv5AoBTCeicJM/wdydD1xt8Wo7XxyOzVNxoxVG5B5 pbUPIiXCmQ5EOvWxFl38VWFaPO76CYe8D7dAi7wIWksDJWNRZh5r9rYItfzMKDbKB7mB59 njybvzekz6LFUUGVNpzUfD5xMxTqWJbZYA+kwF0hSPsa1Y5aC5u5A2RwUMJV9A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=Z1V5WPfj; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696696660; a=rsa-sha256; cv=none; b=b0wlHSXoTCmCPpN7S1fChBrciirdsQqafTT5IsLk7zsOwD5KfDTb+9+9g6pOLZl3XH6baZ P1GU3nFjGokD6sErXDdMN8uvXVJ4ed5DvAmtjPXmZZQZV7Fufrx9ISLywiB0JxfwvgK03F frVA9EXUgnGR52Ufvx59DzeiOUx3l2Ue1Bdjn2mb63F+yv36JXzwKsOLgELxalm017MaXh 9Fal+OJHhfnPibUBycrdv52CBusb0l6QCOSik5j74MY2YZITSqkl8Z7CnkOxKwOLtOAyTu UfNBV8B7EM74wF9tCngMrsr4M7FDHYs6fnfar7XG/4DarpmVfYBevyJDvtIozw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpAIN-00078n-7H; Sat, 07 Oct 2023 12:36:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpAIG-00077g-Tu for guix-patches@gnu.org; Sat, 07 Oct 2023 12:36:45 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpAIE-0007tZ-LA for guix-patches@gnu.org; Sat, 07 Oct 2023 12:36:42 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpAIY-0006Et-3C for guix-patches@gnu.org; Sat, 07 Oct 2023 12:37:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63985] [PATCH RFC 0/5] Generic INI serializer & SRFI-171 for define-configuration Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 07 Oct 2023 16:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63985 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Bruno Victal Cc: 63985@debbugs.gnu.org Received: via spool by 63985-submit@debbugs.gnu.org id=B63985.169669658323893 (code B ref 63985); Sat, 07 Oct 2023 16:37:02 +0000 Received: (at 63985) by debbugs.gnu.org; 7 Oct 2023 16:36:23 +0000 Received: from localhost ([127.0.0.1]:55800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpAHu-0006DI-S6 for submit@debbugs.gnu.org; Sat, 07 Oct 2023 12:36:23 -0400 Received: from mail-yw1-x1133.google.com ([2607:f8b0:4864:20::1133]:53538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpAHt-0006D3-0z for 63985@debbugs.gnu.org; Sat, 07 Oct 2023 12:36:21 -0400 Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-5a507c72d3eso38616287b3.3 for <63985@debbugs.gnu.org>; Sat, 07 Oct 2023 09:36:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696696555; x=1697301355; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Aj4gDhJXMStntYtLXfQAO0HvJE8UZH2ETwm/HhoCyEE=; b=Z1V5WPfjxOiYgqgf9Vp+qbrpmBrvlpmfdSu4sjmULWS40lvO3O9vnfzYTmZfE+m5Yj uoS6WVmYz3bT249you/7lzHHFYXeS+8Ye7dOVXVmM6GgXEO1Lpq0uQp9JIr8OWcygemi It3zoNAUPAbnqJKKi1qN7+FnmqRs9KJ0Etky3zWkW1YXlfKsnV+i7kUkT6hnqibeOzeS rX03+nMRfJXwwBQVu6oSntqmYFTzUkaC0YXj2eLnpOtlcCSD8lbDFVi0aRTKebXZ6FIk hYDBEHb+sCGGeebR+7xasbMJT32hBMZrjAolGTJ310xUkYAoTxOp7HCa20oGC94ZtWkV GkPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696696555; x=1697301355; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Aj4gDhJXMStntYtLXfQAO0HvJE8UZH2ETwm/HhoCyEE=; b=p39p1JJeT9899dMeY91TGdOK50tL/CKYPuyO5rA/Xq56kBACYxWmCTCdmZ/5AN48Wv wEOK+c7UXrr9PrkqQAzlKXcQimTB7wRFdMeJrKKYTG0Zpz61Ozb6k9c3iSYRvITQmbIj t1yzgo6oPS173WbyQTo1EoSwTd/+4Kri9NKEeIvhnqHI9mxJeHF4qJ/HA5To4xkg5xma /tv+otN7dIQ8w8e889Qbbs6ZcHhN1LuQgO43DRg9azTcNcNyRPHLe9pcHIO0w/KHrOTF lLEPJL8gUGkVOClQbeVn1KV6CImUb5jXFdepHuBOk50OaJVtQb8NXNdDaDaLZJj1hgde iF4w== X-Gm-Message-State: AOJu0YyS8a/3DU6K0lD9nzMvvCLQiMHCOufDLBYx3GRcT/sZMp+AtYUg h3rYCCvPPYzifaVLuL8y7wln8GWYxps= X-Google-Smtp-Source: AGHT+IFmEyDA3vPF+U6t6+JMiqqsag7tElstrD6juL3SCuyVGBJZ3ORzSi/Hvc1UHMC1IxGOLfGGAg== X-Received: by 2002:a81:d54b:0:b0:59b:cfe1:bcf1 with SMTP id l11-20020a81d54b000000b0059bcfe1bcf1mr11046641ywj.44.1696696555357; Sat, 07 Oct 2023 09:35:55 -0700 (PDT) Received: from hurd (dsl-158-21.b2b2c.ca. [66.158.158.21]) by smtp.gmail.com with ESMTPSA id m4-20020a0cac44000000b00647386a3234sm2360645qvb.85.2023.10.07.09.35.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 09:35:54 -0700 (PDT) From: Maxim Cournoyer In-Reply-To: (Bruno Victal's message of "Sat, 7 Oct 2023 15:21:48 +0100") References: <3c9e04b336d5627af5167ff3b786918df724f3f6.1687816734.git.mirai@makinata.eu> <87r0mc3mmf.fsf_-_@gmail.com> Date: Sat, 07 Oct 2023 12:35:53 -0400 Message-ID: <878r8eie52.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 2.81 X-Spam-Score: 2.81 X-Migadu-Queue-Id: 089F6426CD X-Migadu-Scanner: mx2.migadu.com X-TUID: cg85mQ/0FPW1 Hi, Bruno Victal writes: > On 2023-10-02 19:28, Maxim Cournoyer wrote: >>> +An example of a simple serializer procedure: >>> +@lisp >>> +(define (serialize-boolean field-name value) >>> + (let ((value (if value "true" "false"))) >>> + #~(string-append '#$field-name #$value))) >>> +@end lisp >>> + >>=20 >> I know this is adapted from old code, but shouldn't there be a "=3D" in >> that string-append, between the field name and its value? [=E2=80=A6] > > I think there's no particular meaning for that isolated snippet but I > believe the original author did intend for there to be a "=3D" symbol as > you have pointed out. I've went ahead and added the =E2=80=9C =3D =E2=80= =9D (with spaces) > variant instead. > >> [=E2=80=A6] Also, using gexps here seems unnecessary and may confuse the= reader. > > I don't think so because in general you're going to call > `serialize-configuration' which returns a G-Expression so it's more or > less given that using G-Expressions is perfectly valid and using them > from the outset allows your fields to serialize any kind of value such as > package objects (for something like `gcc-path =3D /gnu/store/=E2=80=A6'),= etc. > > Thus, not using G-Exps is more restrictive in terms of what you can > serialize. It might not make a difference in some cases but I think > this is a potential source of trouble when someone tries to serialize > a gexp object with a non-gexp ready serializer. (e.g. performing > string-append with a string and a package object) Agreed. --=20 Thanks, Maxim