From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter Date: Mon, 14 Oct 2019 09:21:21 +0200 Message-ID: <875zkru70u.fsf@inria.fr> References: <87lftt57ux.fsf@inria.fr> <87imowwt3i.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:46631) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJupv-00035z-2g for guix-devel@gnu.org; Mon, 14 Oct 2019 03:32:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJups-0000eM-S8 for guix-devel@gnu.org; Mon, 14 Oct 2019 03:32:10 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:11055) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iJups-0000bA-I6 for guix-devel@gnu.org; Mon, 14 Oct 2019 03:32:08 -0400 In-Reply-To: (Konrad Hinsen's message of "Mon, 14 Oct 2019 08:35:00 +0200") 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.org@gnu.org Sender: "Guix-devel" To: Konrad Hinsen Cc: Guix Devel Hi Konrad, Konrad Hinsen skribis: >> That reminds me of an interesting issue regarding >> bitwise-reproducibility that was raised on the Reproducible Builds >> mailing list: >> >> https://lists.reproducible-builds.org/pipermail/rb-general/2019-Septem= ber/001657.html > > We ran into this problem as well in the Reproducible Research MOOC. It's > hard to test equality for notebooks. But we went for solution a) because > our main goal is to teach good practices for writers of future > notebooks, rather than patch bad practices of the past with an > additional layer of build tools. Yeah. (Though printing addresses in a REPL isn=E2=80=99t =E2=80=9Cbad practice=E2= =80=9D IMO, it=E2=80=99s just that it doesn=E2=80=99t mesh well with the intended use of notebooks.) >>> It would be nice in fact to adapt the ideas behind Guix-Jupyter (and >>> perhaps parts of the code) to Org-mode. Some integration with Emacs will >>> be necessary to tell Org-mode to start Python etc. from the Guix >>> environment. >> >> I=E2=80=99d love to see that happen! I thought perhaps we could trick A= lex Kost >> or Pierre Neidhardt to hack on that, let=E2=80=99s see. :-) > > I might also do it myself because I suspect it would be less work to > write the required Emacs package than to explain how to live without it. > Tutorial-driven development :-) Would be sweet! :-) > What would be the best way to run code in a specific environment created > for recorded channels? The obvious approach would be > > guix pull -C channels.scm -p /tmp/temp-profile > /tmp/temp-profile/bin/guix environment =E2=80=93-pure -m manifest.scm = =E2=80=93- > python script.py > rm -rf /tmp/temp-profile > > but doing that properly involves the usual messy precautions for dealing > with temporary directories, and it's probably expensive to do the "guix > pull" repeatedly for the same channel file just because the temporary > profile gets deleted immediately. At the API level, there=E2=80=99s =E2=80=98inferior-for-channels=E2=80=99 w= hich does that + registers a GC root + maintains a cache so that the second time you use a given instance of Guix it=E2=80=99s immediately available. > This looks like a use case for "guix inferior", but is that already > stable enough to be talked about in public? It=E2=80=99s still documented as =E2=80=9Csubject to change=E2=80=9D. :-) https://guix.gnu.org/manual/devel/en/html_node/Inferiors.html Now, I think you can safely use it in your code, I don=E2=80=99t foresee any significant change at this point. As to whether you=E2=80=99d want to talk about it in the MOOC for instance,= you could, but maybe with a word of warning because the MOOC may be around for a long time. Thanks, Ludo=E2=80=99.