From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Aleix_Conchillo_Flaqu=C3=A9?= Newsgroups: gmane.comp.gnu.guix.devel,gmane.lisp.guile.devel Subject: Re: (ice-9 base64)? Date: Thu, 18 Aug 2022 17:20:14 -0700 Message-ID: References: <33556713-c85b-ab0f-554e-94a40f9d418e@telenet.be> <5331d2f3-13a5-e40c-f3bb-398438a0b103@telenet.be> <2dea77ed-4f1b-b799-62d7-149072fd2103@telenet.be> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000008a769c05e68d1051" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38009"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Guix-devel , guile-devel To: Maxime Devos Original-X-From: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Fri Aug 19 02:20:51 2022 Return-path: Envelope-to: gcggd-guix-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOpkp-0009j9-7L for gcggd-guix-devel@m.gmane-mx.org; Fri, 19 Aug 2022 02:20:51 +0200 Original-Received: from localhost ([::1]:43376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOpkn-00074t-P4 for gcggd-guix-devel@m.gmane-mx.org; Thu, 18 Aug 2022 20:20:49 -0400 Original-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 Original-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 Original-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) In-Reply-To: <2dea77ed-4f1b-b799-62d7-149072fd2103@telenet.be> 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+gcggd-guix-devel=m.gmane-mx.org@gnu.org Original-Sender: "Guix-devel" Xref: news.gmane.io gmane.comp.gnu.guix.devel:63561 gmane.lisp.guile.devel:21307 Archived-At: --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--