From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id voafG8aaYWEDCAEAgWs5BA (envelope-from ) for ; Sat, 09 Oct 2021 15:36:06 +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 +DHjFcaaYWEITAAAbx9fmQ (envelope-from ) for ; Sat, 09 Oct 2021 13:36:06 +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 E7B5A57A6 for ; Sat, 9 Oct 2021 15:36:05 +0200 (CEST) Received: from localhost ([::1]:42940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZCWD-0000HC-4G for larch@yhetil.org; Sat, 09 Oct 2021 09:36:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZCWA-0000Ga-6L for guix-patches@gnu.org; Sat, 09 Oct 2021 09:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40952) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mZCW9-0002wN-Tr for guix-patches@gnu.org; Sat, 09 Oct 2021 09:36:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mZCW9-0005aC-PH for guix-patches@gnu.org; Sat, 09 Oct 2021 09:36:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50967] file-like objects instead of gexps Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 09 Oct 2021 13:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50967 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Andrew Tropin Cc: Oleg Pykhalov , Xinglu Chen , 50967@debbugs.gnu.org Received: via spool by 50967-submit@debbugs.gnu.org id=B50967.163378650521387 (code B ref 50967); Sat, 09 Oct 2021 13:36:01 +0000 Received: (at 50967) by debbugs.gnu.org; 9 Oct 2021 13:35:05 +0000 Received: from localhost ([127.0.0.1]:52498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZCVE-0005Ys-Kg for submit@debbugs.gnu.org; Sat, 09 Oct 2021 09:35:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZCVD-0005YL-4W for 50967@debbugs.gnu.org; Sat, 09 Oct 2021 09:35:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54990) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZCV6-00021x-G4; Sat, 09 Oct 2021 09:34:56 -0400 Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:59216 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZCV1-0003Ux-DP; Sat, 09 Oct 2021 09:34:56 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20211002163834.29583-1-go.wigust@gmail.com> <20211002163834.29583-13-go.wigust@gmail.com> <87pmsnnukj.fsf@yoctocell.xyz> <878rz8q42z.fsf_-_@gnu.org> <87czoilgbg.fsf@trop.in> <87a6jk54ro.fsf@gnu.org> <87ily7hm4x.fsf@trop.in> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 18 =?UTF-8?Q?Vend=C3=A9miaire?= an 230 de la =?UTF-8?Q?R=C3=A9volution?= 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 Oct 2021 15:34:48 +0200 In-Reply-To: <87ily7hm4x.fsf@trop.in> (Andrew Tropin's message of "Fri, 08 Oct 2021 13:00:14 +0300") Message-ID: <8735paz5hj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633786566; 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; bh=bDbkZ/9TwUkuTGOXnBoz5xIUdPk7cOmwCPGoT1xLbdY=; b=g4AkR9dFtv972vKz4lrIHQX8ULSx6AEv9ocTXZRrPd4OXI+Eq2Ll6OqpyDOIosrtXDtxIS PX6EiwXv83IWmT7H6vSlZD0o5f5oNXRjChpyTRfvwyLrUeW+cKn9N/9eKNb0M0jTMlVRhO zbFM1MjMlaO5VGvy/3TQl4rB0RWhYjyu3WVWRejyVlqUATPFU5UGzfnk9vkRJaqtmP2Z8+ UANjnCFR3xb1wkEfKt9NTjUv9BM2GmO7ix/AzGlLMGL3jarOo4aGyv8U7tFYBJitYv3p7T 2LOwbJMRv1YrZvjI4UyNoa36NFh29gTMQR5BO8oBquR7mKhKgm5+nKhHDnyEwA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633786566; a=rsa-sha256; cv=none; b=BRx1QLVWq0FPI9cBmNzvISzXYKHdEuYseywaC1HaqWIR9XsshXmHwWIyAy8Wub1P0Z/bxL 4Lko9zpDfep5hIZjy/uMzzo6hAOVQmTrUWAVpargKShecpKsYRfvWzSMuGXcuI3FAUADGH HwwPewMl84DMYLH7oUFYeRwX23l8N3PG+rKz7YmSIehUhHXuwqm5NGMMsJ5piXOJ4+DwBs ECdiinw+lSiaEQkx7J6uQAh8mq/1ckBca4OAjhMl9/HCoQucvDJpzIRRO2ewxW2vM3CWIl /zRHBFiAUXfDqdj42c75OdIaI7aV5wxB+oStm0PxegRNccPz/K2PClTDIyylAQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.21 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: E7B5A57A6 X-Spam-Score: -2.21 X-Migadu-Scanner: scn1.migadu.com X-TUID: 5/7EBc4sv9qH Hi Andrew, Preamble: Guix Home is now committed and there are bug reports coming in. To me, that means our discussion needs to be focused on addressing specific issues; we=E2=80=99re not going to redesign Guix services in this thread. Andrew Tropin skribis: [...] >> Then that=E2=80=99s fine: you can have special code that emits those =E2= =80=9Csource=E2=80=9D >> lines in .zshrc while still allowing users to provide their own >> file-like object for .zshrc lines they want to add. Again, see how >> =E2=80=98torrc=E2=80=99 is generated in =E2=80=98tor-service-type=E2=80= =99. > > From what I understand you want a separate bashrc-file, > bash-profile-file and bash-logout-file fields to be present, but where > the content of those files should be inserted? At the beginning/end or > instead of the rest of configuration? > > We already can achieve the same result by providing gexp, which will > read the content of the file-like object, a very small helper for that > (slurp-file-gexp) makes it even easier to do. Such approach is more > flexible and doesn't seem much harder. > > I remember that you had concerns about slurp-file-gexp, but still don't > understand what exactly you are concerned about. Let me restate my concerns: 1. Users are unlikely to fathom what this does, given the name. It will end up in user configurations, yet: =E2=80=9Cslurp=E2=80=9D? =E2= =80=9Cgexp=E2=80=9D? 2. =E2=80=98slurp-file-gexp=E2=80=99 returns code, as a gexp. Depending = on the place where that gexp is inserted, it may or may not work. Consider: (define (foo x) #~(frob '(#$x))) (foo (slurp-file-gexp =E2=80=A6)) ;d=E2=80=99oh! 3. Use of =E2=80=98slurp-file-gexp=E2=80=99 and gexps in configuration re= cords is not consistent with the rest of the service APIs (and I think we can humbly recognize that those APIs have been doing the job for a while already.) Let=E2=80=99s just to the (call-with-input-file file get-string-all) dance = in places where it=E2=80=99s needed rather than let users call =E2=80=98slurp-= file-gexp=E2=80=99. This is roughly what the =E2=80=98tor-service-type=E2=80=99 example I gave = does. > I'll write a few examples of service configurations and rationale behind > the design descisions for that next week, to make the discussion more > practically oriented. People are starting to use the tool and to report bugs. So, unfortunately, we have to sort out interface issues quickly now. If some of the things being discussed turn out to be too complex to address under those time constraints, we can consider taking them out until we have a better idea on how to address them. How does that sound? Thanks, Ludo=E2=80=99.