From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WF4TNnHX/mLUzgAAbAwnHQ (envelope-from ) for ; Fri, 19 Aug 2022 02:21:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id UAjqNXHX/mI4ewEAauVa8A (envelope-from ) for ; Fri, 19 Aug 2022 02:21:05 +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 5D79319CEA for ; Fri, 19 Aug 2022 02:21:05 +0200 (CEST) Received: from localhost ([::1]:43376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOpl1-00074t-WA for larch@yhetil.org; Thu, 18 Aug 2022 20:21:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOpkT-0006kT-LV; Thu, 18 Aug 2022 20:20:29 -0400 Received: from mail-vs1-xe30.google.com ([2607:f8b0:4864:20::e30]:36632) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oOpkR-00024C-JI; Thu, 18 Aug 2022 20:20:29 -0400 Received: by mail-vs1-xe30.google.com with SMTP id o123so3086144vsc.3; Thu, 18 Aug 2022 17:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=Di2hNkf58JoGJySGTf8z3XG8TDGfXZ8sTFcZ7tKeLGo=; b=Ovg/911LGeKa5UFZJ5jpwzFvyw39xGEnvHRE1GUdeTxRQ6JQ14R+R5goVcWxt55QfU inU1l9dMXsNVqg1D8/4p1OVDpZyfOcLt2HZjPnXZEv8h/qUsjSuMpSN5roCNXzFb98hE IX4Xcvq3neIgxAmLd8lb6vpE8k0bKh/uobam2FDsn/DNbk75P4BqJAf/+0D+Be8aG7lC QcEX7HM/J+ufypN8903s70z2wDPhOYeO7Wvj/+kZEF0rweMR6ar7At8LShddgOyaZryy /OqKlQaV+v8UentAqn8UMTqzGUthkCU1gT2fzCKOCR+esHZLcryvF4RPJNTUB1jZas++ X9KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=Di2hNkf58JoGJySGTf8z3XG8TDGfXZ8sTFcZ7tKeLGo=; b=Qu6d+XFEzLNRnS06uuK9bIgAVDmqRT4kUY25d6KOuhgAWTfifSORef+X2VCV/24Os6 hI7g03SVaiqZa8Qdtgsa2nuj3Bm0UU4liPOiBYHG1Teytjkqpy3b6TGHHkTcwRd6UExg /RbMVJm/2pN4gEL67LRdtFCe9nWDUz9CThZGJgPyF3Ei6fieWpHifdzO67HjrjzDm7l8 QUWdL/jHXslCItdB2ZZfoRK+EQrDaVQ6gGs850+RMe8k4PprB+aV4okFr0KL3rpSsmfZ QfEtTFwZYsEadc1r24JnvkL/ybag1iUE2LMBqfqgAvJhH2WTgho7coea8bDoacbEOWej ChRA== X-Gm-Message-State: ACgBeo2FnmbPmiqXlV9Nhk6p01V52ByNXzATfq8yyGHskYPsH50TEwqM N55mzOB/Gyu/OqkS4ktLjlsHvi42zZpg3EuDJiw= X-Google-Smtp-Source: AA6agR7Z4Y71fjyJjiheD/R8im9gue4o2LbwoZnmFWRccT3xZNrAYwaTLscPPKBK7a1dWGMrFYmCc5TaD3UD7QmyweU= X-Received: by 2002:a67:af0b:0:b0:390:1e10:6571 with SMTP id v11-20020a67af0b000000b003901e106571mr1372965vsl.29.1660868425838; Thu, 18 Aug 2022 17:20:25 -0700 (PDT) MIME-Version: 1.0 References: <33556713-c85b-ab0f-554e-94a40f9d418e@telenet.be> <5331d2f3-13a5-e40c-f3bb-398438a0b103@telenet.be> <2dea77ed-4f1b-b799-62d7-149072fd2103@telenet.be> In-Reply-To: <2dea77ed-4f1b-b799-62d7-149072fd2103@telenet.be> From: =?UTF-8?Q?Aleix_Conchillo_Flaqu=C3=A9?= Date: Thu, 18 Aug 2022 17:20:14 -0700 Message-ID: Subject: Re: (ice-9 base64)? To: Maxime Devos Cc: Guix-devel , guile-devel Content-Type: multipart/alternative; boundary="0000000000008a769c05e68d1051" Received-SPF: pass client-ip=2607:f8b0:4864:20::e30; envelope-from=aconchillo@gmail.com; helo=mail-vs1-xe30.google.com 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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" 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=1660868465; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Di2hNkf58JoGJySGTf8z3XG8TDGfXZ8sTFcZ7tKeLGo=; b=QoKjRc6ZOHSsbMqPEHEXys3xPBadfem1PmAgOHu1fUU1tTxNU0+ovrEk8s2AP8sQ6QCh5v D+9w5rZRTcI6cxFMx5fdA+Pb791vCu7TNF+Rzbb4LF68zoatM+9HWI+rHifAvdpD708yfr Jx6l/87jelmTeIctvEQ33PiLzc4m3lTWJsNTk4170ep7wHJcKyoMEHLK52eITGNZTVTjHy jIrnayTRJK88FIrqJdA0GXu7/1Xy3bdcbr3iCN8JmZsYug0KTrV9ElhaHmJ7kvgkvSxgP1 2KGeVO2F4fLTE8Wd+WwXHSzRvLc9X8ouksEWl9wW/jUtDJ6zi0Wmh2tuQslAGA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660868465; a=rsa-sha256; cv=none; b=Ob+Y2bPRi94K6mcU0d/aVgc62QJiaGUP74PLqQCQGH4NoQxQJ4YrGgWjHF9zkswZK5HmX/ BlhHaCF2sCydnnUfPhyZ6s0HU0I3aK5DIzqMzs7sglVlU0ADWmBzTE4Tf/lI90YIX2h2Qo 27arX1eNFQfPxDxo0xTlE2djZ3KEXmj/Y5LxJ2SMJaJcD0jdN7rhALYuRq4pX6ppHUu9lb Lt9OfIqf21nCETFoJhnzJuaY1yPntaJuy0GKgUdETyDzIw/jTTyuLuEFbenwqi9oKuiFyR zjDkjhFjjah73+F1XU0nNMLcozTPRpHuL42bSD3hzcOCqbbvK7Qpc+HJ3JeifQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="Ovg/911L"; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Spam-Score: -6.36 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="Ovg/911L"; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Queue-Id: 5D79319CEA X-Spam-Score: -6.36 X-Migadu-Scanner: scn0.migadu.com X-TUID: E6hFUzuREA/h --0000000000008a769c05e68d1051 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Aug 18, 2022 at 12:56 AM Maxime Devos wrote: > Then, if I understood correctly, IMO I would say Guile should not really > care about Guix's bundling/unbundling. That is, adding (ice-9 base64) (or > however we want to call it... maybe (encoding base64) following Golang an= d > Guile's (web ....) module) should be totally independent of Guix. So, if = we > add (ice-9 base64) to Guile then Guix should figure out what to do with i= t, > but it's Guix's concern not Guile's. > > It's not some Guix-specific quirk. It's the same for at least Debian. It > benefits not only Guix itself but all users of the software: > Thanks, I understand the benefit now. > [...] allows [...] to make transverse changes > such as applying security updates for a given software package in a > single place and have them affect the whole system=E2=80=94something that > bundled copies prevent. > > ... that was written with Guix in mind, but it applies to every > distribution and everyone. > > Besides, your goal appears to be to unbundle the base64 into a single > location (as a module of Guile), if we do that I think we should go all t= he > way -- just adding it to Guile increases bundling instead of decreasing > bundling, only if the various upstreams are modified to unbundle and use > the new location then the unbundling is completed. > I see... In my mind, initially, I was thinking the opposite. By adding it to Guile, new projects will use the new base64 module and existing projects will update whenever they want. On 18-08-2022 02:09, Aleix Conchillo Flaqu=C3=A9 wrote: > > About Guix's unbundling (maybe that's something that should go on Guix's > mailing list), > > I don't see why, there's nothing to write about except "oops some package= s > are bundling base64, let's unbundle those", and for unbundling those, it > seems more practical to write about that here on guile-devel. Also I > noticed I sent some messages to guix-devel instead of guile-devel, > correcting now. > > I don't think currently there's any unbundling for base64 modules or at > least not in a package I maintain guile-jwt (guile-jwt bundles base64). A= nd > probably there's no unbundling because there's no canonical implementatio= n? > Even if there was a canonical implementation, how would that look like in > Guix's guile-jwt package? What would the snippet actually do? > > Currently, it's not done yet, presumably for that reason and maybe also > due to nobody having noticed it yet? > > How it would look like, for upstreams that refuse to unbundle or are > unresponsive: > > #~(begin > (delete-file "local/copy/of/base64.scm") > [also remove it from the Makefile.am] > (substitute* (find-files "." "\\.scm$") > (("(\\local base64 module\\)") "(gcrypt base64)"))) > OK, I was imagining something like that. In this case do we assume (gcrypt base64) is installed? Because some projects don't have a dependency on guile-gcrypt. > For responsive upstreams that do not mind these kind of improvements, > there is a preference for submitting a patch upstream -- that way, everyo= ne > benefits, not only Guix. > So, what do you think would be the way to proceed in order to include a base64 implementation in Guile itself? For example: 1. Add (ice-9 base64) (or (encoding base64)) to Guile and let new projects and existing projects to update with conditional module loading to support old versions of Guile. 2. Do unbundling in Guix packages both for projects that have not updated upstream and for projects in (1). The unbundling would be done by pointing to Guix's (or guile-gcrypt) base64 implementation, or is there a way they could point to Guile's implementation? Does that make sense or am I still missing something (I'm about to catch a cold so my brain is not working quite well this week)? Originally, I was thinking only in (1). Thanks! Aleix --0000000000008a769c05e68d1051 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Aug 18, 2022 at 12:56 AM Maxime Devos <maximedevos@telenet.be> wrote:
=20 =20 =20

Then, if I understood correctly, IMO I would say Guile should not really care about Guix's bundling/unbundling. That is, adding (ice-9 base64) (or however we want to call it... maybe (encoding base64) following Golang and Guile's (web ....) module) shoul= d be totally independent of Guix. So, if we add (ice-9 base64) to Guile then Guix should figure out what to do with it, but it's Guix's concern not Guile's.

It's not some Guix-specific quirk. It's the same for at leas= t Debian. It benefits not only Guix itself but all users of the software:

Thanks, I understand the benef= it now.

[...] allows [...] to make transverse changes
such as applying security updates for a given software package in a
single place and have them affect the whole system=E2=80=94somethin= g that
bundled copies prevent.
... that was written with Guix in mind, but it applies to every distribution and everyone.

Besides, your goal appears to be to unbundle the base64 into a single location (as a module of Guile), if we do that I think we should go all the way -- just adding it to Guile increases bundling instead of decreasing bundling, only if the various upstreams are modified to unbundle and use the new location then the unbundling is completed.

I see... In my mind, initially,= I was thinking the opposite. By adding it to Guile, new projects will use = the new base64 module and existing projects will update whenever they want.=

About Guix'= s unbundling (maybe that's something that should go on Guix's mailing list),
I don't see why, there's nothing to write about except "oo= ps some packages are bundling base64, let's unbundle those", and for unbundling those, it seems more practical to write about that here on guile-devel. Also I noticed I sent some messages to guix-devel instead of guile-devel, correcting now.
I don't th= ink currently there's any unbundling for base64 modules or at least not in a package I maintain guile-jwt (guile-jwt bundles base64). And probably there's no unbundling because there's= no canonical implementation? Even if there was a canonical implementation,=C2=A0how would that look like in Guix's guile-j= wt package? What would the snippet actually do?
Currently, it's not done yet, presumably for that reason and maybe also due to nobody having noticed it yet?

How it would look like, for upstreams that refuse to unbundle or are unresponsive:

#~(begin
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (delete-file "local/c= opy/of/base64.scm")
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [also remove it from the M= akefile.am]
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (substitute* (find-files &= quot;." "\\.scm$")
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (("(\\loc= al base64 module\\)") "(gcrypt base64)")))

OK, I was imagining something like that. In this case do = we assume (gcrypt base64) is installed? Because some projects don't hav= e a dependency on guile-gcrypt.

For responsive upstreams that do not mind these kind of improvements, there is a preference for submitting a patch upstream -- that way, everyone benefits, not only Guix.

So, what do you think would be the way to proceed in orde= r to include a base64 implementation in Guile itself?
=
For example:

1. Add (ice-9 ba= se64) (or (encoding base64)) to Guile and let new projects and existing pro= jects to update with conditional module loading to support old versions of = Guile.
2. Do unbundling in Guix packages both for projects that hav= e not updated upstream and for projects in (1). The unbundling would be don= e by pointing to Guix's (or guile-gcrypt) base64 implementation, or is = there a way they could point to Guile's implementation?

Does that make sense or am I still missing something (I'm about t= o catch a cold so my brain is not working quite well this week)? Originally= , I was thinking only in (1).

Thanks!

Aleix




--0000000000008a769c05e68d1051--