From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6LvhBttkgmDYQQEAgWs5BA (envelope-from ) for ; Fri, 23 Apr 2021 08:10:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id iCttAttkgmDdWgAAbx9fmQ (envelope-from ) for ; Fri, 23 Apr 2021 06:10:35 +0000 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 BAEC822743 for ; Fri, 23 Apr 2021 08:10:34 +0200 (CEST) Received: from localhost ([::1]:42944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZp1N-0000CR-Ul for larch@yhetil.org; Fri, 23 Apr 2021 02:10:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZp0r-0000Az-H2 for guix-devel@gnu.org; Fri, 23 Apr 2021 02:10:01 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:42796 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZp0p-0006aQ-B1; Fri, 23 Apr 2021 02:10:00 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1619158196; bh=yGXbiz7YS9OCoojkfd7jES2hH6NKK4r2jfmeCOTkp5k=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=dPAmqfzvlf3Lz5kIH+nrlI6ACxSLR/j65jkqtMGk0xCSdz912Aij75GXuLjKqozUV MitiHxhbWLtUrhIHX6/Pe6DddOMSA8iTmVuCwHzxHVgbG1ujgy+XSzKgZQKYCOpc8C 1aqZlfAXwApDde5OUlJGaWqAQvJCU/uvhtnDd9gY= To: Ludovic =?utf-8?Q?Court=C3=A8s?= , Maxim Cournoyer Subject: Re: Add a way to disable serialization support to (guix services configuration) In-Reply-To: <87mttqt0ms.fsf@gnu.org> References: <878s5ncjaw.fsf@gmail.com> <87fszoswmc.fsf@gnu.org> <87k0ovd4ok.fsf@gmail.com> <87mttqt0ms.fsf@gnu.org> Date: Fri, 23 Apr 2021 08:09:55 +0200 Message-ID: <871rb15y6k.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.1 / 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, FROM_SUSPICIOUS_NTLD=0.224, PDS_OTHER_BAD_TLD=2, RDNS_DYNAMIC=0.982, 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.23 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 Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619158234; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=9zJjd9MfgEUcjQaI+9lwkF5FW39MjNIIMVBIq1WMuLQ=; b=pZl704A/ReYYT5jwYkJYeMW8FfrydX+cFzr4wmY6JokOCKqDfKh6j0iVgp1oHk+j/R8MmP BGALUrSbI4FoRb4ugS6E7EJVna1hwCr+ywcPpy/GJkCCXb5qSsBTW2rP/JQFro/ieH9YYx z/k9wQabaHJt7M78+h8rddmnLgUf29VWsmZB1+ardaSkebJtwCLcOusrfJkarkK2oi3RS9 4rTxemdQBXCVlRFkMmHRManUGR1Ngfbip0sZ+5SmpLvNNXqeDzJDytqYIAHebuci/3J9W+ 3AWG2zXkHOX01k8tMfirWkcD0J0KY9Rqe9/vInbZK2/LAsVesAXS4ulEzC4GIg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619158234; a=rsa-sha256; cv=none; b=jcci1KhnmZSQ0TEWHDQ2S8ATmqF/KnEBB7stz1Wn1rE73wlNgD5uVmNJC+IDEugD0vFUPt zSgRB2yB4ahzhb8+h8KWTZiilcZ9U7FXXg8fqHfxLpp8mja9FjfwripDIDjDFAw3crNOB7 qnhruCA3hJ1htiJcInGy6K0/ftVW4ZlR0gUMbC4k4NyYxuoZzvJJhc75YAI/g2jehXBNq1 eRJLdEU/if5znWCz4lrChp7eH5GjNxNpPJHuh4NfEU/hY+fRzd3fSQ21gEGccPeEKra0ZZ Ttj9cTKZcHxfCxPeoXjRb2fNpTAOhHEyR+FdygCAGte8ac1fJkg/SCPHaZbUuA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=yoctocell.xyz header.s=mail header.b=dPAmqfzv; dmarc=pass (policy=none) header.from=yoctocell.xyz; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -1.65 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=yoctocell.xyz header.s=mail header.b=dPAmqfzv; dmarc=pass (policy=none) header.from=yoctocell.xyz; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: BAEC822743 X-Spam-Score: -1.65 X-Migadu-Scanner: scn0.migadu.com X-TUID: nF40/BfzrPoo Hi, On Fri, Apr 23 2021, Ludovic Court=C3=A8s wrote: > Hi, > > Maxim Cournoyer skribis: > >>> +(define-syntax-rule (without-field-serialization definition) >>> + (syntax-parameterize ((configuration-field-serialization? >>> + (identifier-syntax #f))) >>> + definition >>> + #t)) >>> + >>> +(without-field-serialization >>> + (define-configuration foo >>> + (bar (integer 123) "doc"))) > > In hindsight, I find this syntax quite inelegant and suboptimal. > > Wouldn=E2=80=99t it be nicer to write: > > (define-configuration foo > (bar (integer 123) "doc" no-serializer) > (baz (string "") "doc")) > > where =E2=80=98bar=E2=80=99 wouldn=E2=80=99t have a serializer and =E2=80= =98baz=E2=80=99 would? > > It=E2=80=99s also probably easier to implement correctly. I think that would be a good idea, maybe it could also make having a default value be optional, like this: #+begin_src scheme (define-configuration foo (bar (integer) "doc" no-serializer) ;no default (baz (string "default") "doc")) #+end_src Maxim and I had a discussion about this[1]. [1]: https://yhetil.org/guix-devel/87k0ov7w72.fsf@yoctocell.xyz