From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 02 09:33:06 2022 Received: (at 55653) by debbugs.gnu.org; 2 Jun 2022 13:33:06 +0000 Received: from localhost ([127.0.0.1]:53147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwkwk-0001Dp-5i for submit@debbugs.gnu.org; Thu, 02 Jun 2022 09:33:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwkwh-0001DL-Ti for 55653@debbugs.gnu.org; Thu, 02 Jun 2022 09:33:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58030) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwkwc-0001P8-If; Thu, 02 Jun 2022 09:32:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Cj+P7Mdr6kM6ZkBBispG1OQI2F9t40Lk+KoSG0c2yZo=; b=PavFnhMs+hMasbBIFLFK xIpOHqA8mbQiM49N7zJvBOb3yg3DA9NIc1Z9Zyx7Njlt78Tp7irbfhaFisrFOd0pljGV5hc6Lc4ET 7SxU75gCSkWtZ9PnW6GfpnAZcQqkPtz4/xvPdZW2b0VbzqjqiDEGiMUvj3rFXlq6Kcg2sAOXNnmTg 2UFA0e9Yll65ljeZNP8Hmb/8jaZ99xQCA5n/nur+z20obQ6cvbDWSiEf0Dnd2Pl2EjPsBgEUbohNa GC05+e2CyuUxU8B5zuzK0d6KMAVfLSzr3W8R5K9gX7CfQiGrS9XQVCkgdGmpQ6KqeMhpxdAQidR0t P2FzulbocRax/w==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:52984 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwkwc-0005F4-6L; Thu, 02 Jun 2022 09:32:58 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Liliana Marie Prikler Subject: Re: bug#55653: [PATCH] guix: Add syntactic sugar for profile generation. References: <10354f31e0be9bcb88b78da2fb8a2a3c3acbde10.camel@gmail.com> <87sfopyfte.fsf@gnu.org> <87zgiwtbid.fsf@gnu.org> <60b305664d635fa72c2162d0e55fe44af3c95461.camel@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quartidi 14 Prairial an 230 de la =?utf-8?Q?R=C3=A9v?= =?utf-8?Q?olution=2C?= jour de l'Acacia X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 02 Jun 2022 15:32:56 +0200 In-Reply-To: <60b305664d635fa72c2162d0e55fe44af3c95461.camel@gmail.com> (Liliana Marie Prikler's message of "Wed, 01 Jun 2022 22:15:06 +0200") Message-ID: <87sfonp4vr.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 55653 Cc: Andrew Tropin , 55653@debbugs.gnu.org, Maxime Devos , zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hallo! Liliana Marie Prikler skribis: > If it reads like that, then that's probably a mistake somewhere. My > actual proposal to allow both of the following: > > (package > other-fields ... > (manifest some-manifest)) > (package=20 > other-fields ... > (packages (list bash coreutils emacs ...))) Oh OK, I got it wrong, sorry. Still I=E2=80=99m not a fan of having syntax that looks like a field but is= not an actual field, if we can avoid it. I prefer to expose the data structure as it exists and, if needed, to build abstractions on top of it. (The ABI issue that Maxime mention is real but I don=E2=80=99t think i= t=E2=80=99s a big problem in practice.) >> > > However, if that helps, we could have a procedure, like: >> > >=20 >> > > =C2=A0 (define (packages->profile name packages) >> > > =C2=A0=C2=A0=C2=A0 (profile (name name) =E2=80=A6)) >> > >=20 >> > > Thoughts? >> > I do think syntactic constructors feel better here, because the end >> > goal would be embedding things in (thunked) configuration fields.=20 >> > Having a procedure might be acceptable, but feels more clunky in >> > the context of Guix. >>=20 >> To me, =E2=80=98packages->profile=E2=80=99 doesn=E2=80=99t look any more= clunky than >> =E2=80=98packages->manifest=E2=80=99 or similar procedures. >>=20 >> Do you think a procedure like this would address the verbosity >> problem that prompted you to propose this patch? > I don't think it does tbh. We currently have two implementations of > packages->profile-entry, one for Guix System, one for Guix Home, which > at the time of writing are exactly the same. Looks like we could start by factorizing it. :-) > My use case of naming profiles would be served by such a procedure, > but using a syntactic constructor has other benefits in that all of > the fields of the profile become accessible. That means that users > could (once profile management via Guix Home is implemented) for > instance run less hooks or additional hooks for certain profiles, > allow collisions, use relative symlinks, etc. for basically free, not > to mention that changes which break record ABI (such as added fields) > get promoted directly through syntax but not through a plain > procedure. This is an argument (and probably a good one) in favor of using records. I don=E2=80=99t read it as an argument in favor of the =E2=80=98packages=E2=80=99 pseudo field though? Thanks, Ludo=E2=80=99.