From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 4KR1Bbw9dGWYeQEAG6o9tA:P1 (envelope-from ) for ; Sat, 09 Dec 2023 11:13:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 4KR1Bbw9dGWYeQEAG6o9tA (envelope-from ) for ; Sat, 09 Dec 2023 11:13:16 +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 CBF465E8E7 for ; Sat, 9 Dec 2023 11:13:15 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=Bt38w9sd; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1702116796; 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=3fARubeeiURYIVuJUGkqGx6hW9BgCYfJLTIWcguQZwc=; b=HgClHr2c5xDQZXoH2IJ00FS34SfWBt7by0DtKPkDDhKkxmDlqCbgPascFV0CsYzRo+wS4F QzsPRAUpDPalPltejgyOuSwKVUl9J2bC/CGetIdySr24jV5Yk9lfbnk0+IYuX6iULIDRNE 8s7EyNknmaH91HeHsVWzDIE5vtkFjK7bi8mNWuFVONUvm5Wy2FVviHD/tzuZ9LX55zFAmP /xaKH+k3UqDcMuX3GOOg5KP3j9vw5utLJ7Z7+LOlEhnBIt1Qp2n2n+LTLf/+5S5bf5y2Y6 B3d7a7it5VOAhCmbFdYAewFIS/dgK2NAsxDYWto5Yu9o42EZTAvUQx9BXowgmA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1702116796; a=rsa-sha256; cv=none; b=POKMx1YVssuV0OLrnyu63V5yU/zVLK1j8Iq1YRkjH+EzfqMzyryWzQc1FRvUSQHJUHw2Rl F3hKWjklgu42BgdlaLA2CKhC0T5tk+THSfJWcje/ietQB6MADU5/v8tkgWo3VDp8fgueWv oBkeBHpgzvn5yMXG1IBNvhgxnyE3XZM6uXJ8EhOvmlt5+deasXw0bn2EPWwIQdr2ocVmTX zx4RBjJxYbFjtJTzdGKPirEyZU1ly5zDhtfVLTApk9OTM/uvwOf/LbLlUSv0JlcyujebKy D6MLpp/LUB+9bLqZ62w/jojYdbBKlgzKzcgeUOIGiJ1v+2uRPcH+Q61bpKgEFg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=Bt38w9sd; 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"; dmarc=pass (policy=none) header.from=gnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBuJu-0001RQ-SM; Sat, 09 Dec 2023 05:12:26 -0500 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 1rBuJt-0001RD-F9 for guix-devel@gnu.org; Sat, 09 Dec 2023 05:12:25 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBuJr-0007yp-FI; Sat, 09 Dec 2023 05:12:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=3fARubeeiURYIVuJUGkqGx6hW9BgCYfJLTIWcguQZwc=; b=Bt38w9sdnCV8f2wEIvpc mN37XhHdxPDuIw36dQR/KwHMDLtXAvRnBt42tc8xkIC14xzniXYePtBfh5RqvPbACQiF6WJOct//y ox7glEVsSycFUEYtIl6MTTE4eAS+XWlLV8kIvVWjfoeIyqtSUsOYx7fjgyZnJ+rm94os3hJztMZ5M jGRsbwq2IDQfgBviLQ52e9FhDaBXlu/Hj8y7ooRRQyv9TpJVqeP9soH9Vdcml24xnnFIpDvONDJ73 48SmB6lDKAQNJ/nTYU8/PEBH+VAotTv8e2LyDvjSESHLyzSU6VespPzoWEdtQH/YU3tRODAHS3z9G 8DyiNjE8qY6Qrw==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Edouard Klein Cc: Attila Lendvai , Liliana Marie Prikler , guix-devel@gnu.org, Josselin Poiret Subject: Re: Syntactic Diabetes (was Re: A friendlier API for operating-system declarations) In-Reply-To: <8734wsqwrh.fsf@rdklein.fr> (Edouard Klein's message of "Sun, 26 Nov 2023 17:49:42 +0100") References: <87wn377rst.fsf@rdklein.fr> <877cm6reum.fsf@rdklein.fr> <52c2337b277721108e5e7cdd6ea32e37e3c20628.camel@gmail.com> <8734wsqwrh.fsf@rdklein.fr> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Nonidi 19 Frimaire an 232 de la =?utf-8?Q?R=C3=A9vol?= =?utf-8?Q?ution=2C?= jour de la Sabine 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: Sat, 09 Dec 2023 11:12:20 +0100 Message-ID: <87fs0b8z23.fsf@gnu.org> 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: 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: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.35 X-Spam-Score: -9.35 X-Migadu-Queue-Id: CBF465E8E7 X-Migadu-Scanner: mx12.migadu.com X-TUID: Cm7Mnobpz9cC Hello! Edouard Klein skribis: > Thank you Liliana and Attila for the swift and actionable feedback :) > > Below is a revised proposition. > > Here is a minimal working example of an os declaration: > ------------------mwe.scm--------------- > (use-modules > (beaver system) > (beaver functional-services) > (gnu packages version-control) > (gnu services web) > (gnu services telephony) > (gnu services ssh) > (gnu services base) > (guix gexp)) > > (-> (minimal-ovh "osef") > (instantiate nginx) > (instantiate mumble-server > (welcome-text "coucou") > (port 64738)) > (extend openssh `(("alice" ,(local-file "/home/edouard/.ssh/id_rsa.pu= b")))) > (modify openssh > (password-authentication? #f) > (allow-empty-passwords? #t)) > (remove guix)) > ------------------------------------------------------- > > To see the value of this syntactic sugar, try to replicate this MWE with > the standard syntax. It's not horrendous, but it *is* off-putting to > many newcomers to git, whereas this sugary piece is more readable for > them (sample size of 1, p=3D0.00000005). Glad you ran a user study. :-) This is looking more and more like: (define-syntax -> (syntax-rules () ((_ os rules ...) (operating-system (inherit os) (services (modify-services (operating-system-user-services os) rules ...)))))) One thing that always makes me hesitate due to the longstanding hygienic macro tradition in Scheme is non-hyienic introduction of identifiers: in the example you gave above, the identifiers =E2=80=98openssh-service-type= =E2=80=99 and =E2=80=98openssh-configuration=E2=80=99 are automatically derived from =E2= =80=98openssh=E2=80=99. This could lead to surprises and makes grepping harder. But I don=E2=80=99t kno= w, maybe that=E2=80=99s the price to pay? Maybe one conclusion we can draw from this is that configuration records and service types should be more closely tied to one another. >>> (service+ OS SERVICE [CONF]) >>> (service- OS SERVICE) This one looked really revolutionary, but it=E2=80=99s inspiring too! Thanks, Ludo=E2=80=99.