From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kGleDL9k+GJTDgEAbAwnHQ (envelope-from ) for ; Sun, 14 Aug 2022 04:58:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id AMGDC79k+GLUnAAAG6o9tA (envelope-from ) for ; Sun, 14 Aug 2022 04:58:07 +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 B2F4FC2B9 for ; Sun, 14 Aug 2022 04:58:06 +0200 (CEST) Received: from localhost ([::1]:47194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oN3pF-0007D2-TM for larch@yhetil.org; Sat, 13 Aug 2022 22:58:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oN3pC-0007B2-J7 for bug-guix@gnu.org; Sat, 13 Aug 2022 22:58:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45740) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oN3pC-0005Aq-9q for bug-guix@gnu.org; Sat, 13 Aug 2022 22:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oN3pC-0006NZ-5Z for bug-guix@gnu.org; Sat, 13 Aug 2022 22:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#56799: (gnu services configuration) usage of *unspecified* is problematic Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 14 Aug 2022 02:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56799 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Attila Lendvai Cc: 56799@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 56799-submit@debbugs.gnu.org id=B56799.166044583624468 (code B ref 56799); Sun, 14 Aug 2022 02:58:02 +0000 Received: (at 56799) by debbugs.gnu.org; 14 Aug 2022 02:57:16 +0000 Received: from localhost ([127.0.0.1]:35489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oN3oS-0006MZ-9S for submit@debbugs.gnu.org; Sat, 13 Aug 2022 22:57:16 -0400 Received: from mail-qv1-f47.google.com ([209.85.219.47]:44972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oN3oO-0006MK-DB for 56799@debbugs.gnu.org; Sat, 13 Aug 2022 22:57:15 -0400 Received: by mail-qv1-f47.google.com with SMTP id mk9so3294019qvb.11 for <56799@debbugs.gnu.org>; Sat, 13 Aug 2022 19:57:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc; bh=lIiFCSz7ztpqlVQcDLMWhDR7J/KCzdePaZ1dwqOewGQ=; b=MBnZmHxngZ5DRaUTkNoulbkVfyXsJpkLzeqGg/X5F5q+Uhkj0dbKdqs2VaGI7eHbLT RHSEUTaxhg+Rrkzjh186kpaM+3Q7AjUlYOimOe4alLfYCMO9+mieTqGpP3zV4TDGS2uj nr3fvrmIQHJMz/OPmFCY0iAkZLJHfLyfzMGqkS34IvBShliGTjl8hbo8RF1qglit8kkB 4tE8CyCWJoeGPTk0sdha/cfEfy9LShxZ3SufBj+MVPiTgPYR+U+LwVuITzCuzLUazdHn ejex+wk1Ja0gzwWFjnbMo6NchFcLMutVslGdqLeMZ+eB73guOHwwqgm4f52FkOVux9E2 H7xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc; bh=lIiFCSz7ztpqlVQcDLMWhDR7J/KCzdePaZ1dwqOewGQ=; b=QPOrI+kOAILijJdXQrT+Rz/0HS5f9wjf4OJi905dBwReO4cCbqZHOZj+gGjemHIVOB P2MWW59uLnbSygQw6TqlGwXbdCb5Qi1ogck96uRJkfAZha7x3XFvhz6j7rsvV8VPcZlr GJr0DZ1eh1qXVNuHK69eGznjVDDyvERCYIS3pgxcr5gU63si9mqQU8CbFHzJ8O3ZjJMK mke+JIliu4/LtDxxDwHd4rMqXO3tjOb0vPdhqc9iL5zJsrvYUcVwkaU67zJ2fmO5fYoG m1ODH//f6V1GOrPyUV5MaVNAZMpL30S9XCsLny/6kjhxKjgo/MuhsBdZpeSlRyxZemLc a0Pw== X-Gm-Message-State: ACgBeo3ERZQKWpfBEasQ5TIy5Dls215NIqXOAcSMXCZzzLWyvmcjLiK2 rA49eR9soXEL2euvhOY181zBmsn9RuI= X-Google-Smtp-Source: AA6agR7mc17D21yiLO+THyuxNOEaI5ne3tBpnQyMm3xpnx7eqGGM0utlF95hkc8YX6r0ypxLyz9+lQ== X-Received: by 2002:a0c:9c48:0:b0:473:5e9e:741 with SMTP id w8-20020a0c9c48000000b004735e9e0741mr8949441qve.63.1660445826522; Sat, 13 Aug 2022 19:57:06 -0700 (PDT) Received: from hurd (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id b13-20020ac8678d000000b0034300e35487sm4873055qtp.54.2022.08.13.19.57.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Aug 2022 19:57:06 -0700 (PDT) From: Maxim Cournoyer References: <87o7xa8qxt.fsf@gmail.com> <8735egxedv.fsf@gnu.org> <87les82c2f.fsf@gmail.com> <87v8rbumnx.fsf@gnu.org> <87sfme1y8m.fsf@gmail.com> <877d3omc9c.fsf@gnu.org> <878rnwn5i4.fsf@gmail.com> <87ilmwd57k.fsf@gmail.com> Date: Sat, 13 Aug 2022 22:57:05 -0400 In-Reply-To: (Attila Lendvai's message of "Sat, 13 Aug 2022 16:47:05 +0000") Message-ID: <87k07bbkhq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660445886; 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: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=lIiFCSz7ztpqlVQcDLMWhDR7J/KCzdePaZ1dwqOewGQ=; b=NT7KtPhEwMVxVXFK+GcidwhUApdt4Tb75oIVWMhlFzfWqzaduuKUcXL2WDhowLeqcIssLg 3Y+wPNgamgkw9C7ci5u87zfxVfPyaBG4h3cDPWWZzL9JWZSpWRYHZhsd0tTevhVCd8ncTP QHRBQItSzyWnVCUpVuPsM4ElZy7k5gbrdKHHQB579m4s6avTJal943jeeQyzPaJY5H+8LH kIJ+4+ual1vabaCNnx/7OPUTnbwQ/ezOw+NoyUEUkPd5NwIjtXmm3Pjzo5oLPgU6eWFlWA 7eoDlgTJ8pUIwbYAkxjnK1AUyUdBocWkFlAh2Hh6FSfHP5IlFNPdbeVQYToglQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660445886; a=rsa-sha256; cv=none; b=lb83BFkUiRLgpQi4MiwLUgFLJp6wcslqP012n4xsFIboKroeK33wgfxElHBIEm1730lsVy dBht3dXgwAe02JXQOFPQTDF/JZMJ3o8o52OGpgvInBIqYoNfQAPezmwtGfkJ2Jkz2/cVjB WxLEJlHR+R5n+LiTO+mqNswR7MfuoU9ZrwmdccJ025qrDvS9lw6gM1V9T51JtgegzPoCEW wy42ft0KH2NeQmFHQg88E/ZwFXWFj/PgvIElxq+ie/oEq0uvgmcWqjzULPvg34YBgDsXWn uotoZYMuSd/pfr+gXYrEsgq16pe35kLolwdvDMkNb4x1KghD6GBIm8GVSMIZyg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=MBnZmHxn; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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.84 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=MBnZmHxn; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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: B2F4FC2B9 X-Spam-Score: 4.84 X-Migadu-Scanner: scn0.migadu.com X-TUID: sDscxg/vcgwa Hi Attila, Attila Lendvai writes: [...] >> prepare a patch for the other things mentionned here (an exported >> symbol). Thanks! > i started implementing your suggestions, including the replacement of > the scattered usage of (eq? 'unset ...) pattern. what i found is that > the code is not very readable using MAYBE-VALUE-SET?, or at least not > for me. > > first, it negates the boolean logic everywhere in the current code > (i.e. larger diff, and/or the use of (if (not ...) a b)). > > and an example wrt readability: > > (if (maybe-value-set? field-default) > field-default > (configuration-missing-default-value ...) > > a value is never set, only places can be set to some value. It's not clear to me why you think the above is less readable; in the code I had to touch, the maybe-value-set? was more natural, as the cases I dealt with often tested for (not (eq? 'unset ...)), so reversing the logic allowed getting rid of the negation. See https://issues.guix.gnu.org/57168#13 for example. > > would you be fine if we renamed MAYBE-VALUE-SET? to UNSET-VALUE? unset-value? sounds like an action; so I'd name it 'maybe-value-unset?'; but as I wrote above I don't really see the benefit/like the idea. Thanks for working on it! Maxim