From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8DTiORC8s2BbHQAAgWs5BA (envelope-from ) for ; Sun, 30 May 2021 18:23:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id wL0pNRC8s2ADdgAAbx9fmQ (envelope-from ) for ; Sun, 30 May 2021 16:23:44 +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 9DB4712853 for ; Sun, 30 May 2021 18:23:44 +0200 (CEST) Received: from localhost ([::1]:44316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnOE3-0005bl-NP for larch@yhetil.org; Sun, 30 May 2021 12:23:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnODu-0005bc-Tr for guix-devel@gnu.org; Sun, 30 May 2021 12:23:34 -0400 Received: from mail-40136.protonmail.ch ([185.70.40.136]:45697) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnODr-0004J1-LB for guix-devel@gnu.org; Sun, 30 May 2021 12:23:34 -0400 Date: Sun, 30 May 2021 16:23:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1622391806; bh=Tfj9t29l2tJZJT5lJQhBv0/VXcppgtK/m1TxqGBtBU4=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=OQult0P3qD/GGbIbKHbfer3AeZt/6bZig++fS+rFzns+q6juu619O0ZnMtCHDPYPB owiUNH+Cm7/c01YYY+/wP2caZRpHvw+PNC9EvJRq75YN7XT0HCq8fsCg0cp/QExbnK dgHxF4n06JyJt/BYlovDvWtqaWeFu3AALRSEl7+M= To: =?utf-8?Q?Ludovic_Court=C3=A8s?= From: Ryan Prior Cc: Nicolas Goaziou , guix-devel@gnu.org Subject: Re: [PATCH RFC 0/4] Getting rid of input labels? Message-ID: In-Reply-To: <87y2c1twya.fsf@gnu.org> References: <20210520145830.14108-1-ludo@gnu.org> <87wnrsw15h.fsf@nicolasgoaziou.fr> <87y2c1twya.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.136; envelope-from=rprior@protonmail.com; helo=mail-40136.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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: , Reply-To: Ryan Prior 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=1622391824; h=from:from:sender:sender:reply-to: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=Tfj9t29l2tJZJT5lJQhBv0/VXcppgtK/m1TxqGBtBU4=; b=AAGS83KPdCYlggwX5tZwYJz/mo/8esIHlArsZbWo2Y3m8HE82nKZG26wAOd7WCH1TUw82M ACMOD8r2FPu9Tp8EhTy3hrnJfJSlkz26IpTpl2u0RLQ7SewGwTEv+STixwiB0I3jf45oKf ogNIMuctdQ5QQ+6AF3nHKIZrb8i6MswolmBX69b7yit8amR6ER0Qcfk+LXfeBkjqkMHcdE AfTY5thd98tR4AQzXfc9pEFDF7MbyBRAFGq0NKAROwIbH/QrybHgfYgV6pP+oEO6Scy0xv 0g+WFvoVIQderNxbo7n7y1MbZNHrAJ9UyL4cStdl+irCnK5+rwezZwPYaxRIVA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622391824; a=rsa-sha256; cv=none; b=ZomLYhdsMwIPLud4auFpPdQYTjIidwPUUTqPYsDAI8DhCPaqMD8BBCZ8BYfL24EvjPDCz6 QvqYiV2SDoNY/h3QJ9J+tafOOH8oyd0AckEQJHG4FBxwpizpqrkl/Yioa2eRwYRQsJmg45 OauLRc/ozceARU/tVDBzXZVLCmGPAugp2KCznI0hAX9vHf5TvoS77FbATzTiOdcXnovasd kj7fB7enOJK9AijUPXd8c5GwOeLeFzklDZy1tr9J/IlIwxSgYZUPL5478FCBhYwQcOlvIb TTXyazE6NyC230pBEqp63euQdo/NP7e0GtmozdUfrTRxE5UGVdpLHsIrlsIhLA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail header.b=OQult0P3; dmarc=pass (policy=quarantine) header.from=protonmail.com; 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: -2.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=protonmail.com header.s=protonmail header.b=OQult0P3; dmarc=pass (policy=quarantine) header.from=protonmail.com; 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: 9DB4712853 X-Spam-Score: -2.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: Ps8KGVTCdtMu On Wednesday, May 26th, 2021 at 2:02 PM, Ludovic Court=C3=A8s wrote: > > Could the new syntax accept both variables and specifications, e.g., > > > > (list "glib:bin" foo "bar@2.3") > > > > ? > > No! I mean, yes it could, but no, I don=E2=80=99t think that=E2=80=99s a = good idea. > > :-) > > In terms of API, I prefer clarity; in this case, I think inputs should > > be a list of packages or other =E2=80=9Clowerable=E2=80=9D objects, rathe= r than a list > > of =E2=80=9Canything=E2=80=9D that could be magically interpreted at run = time. I agree with this, a list of potentially ambiguous "any-type" inputs seems = fraught. I think there's an opportunity to avoid the need to "fall back" to the stat= us quo, though. I picture a structure for inputs that has three cases, triv= ially decided based on data shape: - a bare symbol, eg '(tzdata glib) this is translated to `(("tzdata" ,tzdata) ("glib" ,glib)) works the exact same if the symbol is an =3Dorigin=3D, you get the name o= f the symbol quoted followed by the value of the symbol. - a 2-tuple, eg '(tzdata ("gnome-lib" glib)) when we encounter a 2-tuple, we use the first value as the label and the = second as the value. so this becomes `(("tzdata" ,tzdata) ("gnome-lib" ,glib)) - a 3-tuple, eg '(tzdata ("glib:bin" glib "bin")) when we encounter a 3-tuple, we use the first value as the label, second = as the value, and third as the output name. Following this convention, the inputs for most packages will be a list of b= are symbols, and packages which need custom labels and/or outputs for some = inputs can get them with little effort. Cheers, Ryan