[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter
From: |
Ludovic Courtès |
Subject: |
Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter |
Date: |
Thu, 24 Oct 2019 12:26:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hi Konrad,
Konrad Hinsen <address@hidden> skribis:
>> Depending on the use case, another option is to not use inferiors at all
>> and simply do:
>>
>> guix pull --commit=XYZ -p ./my-old-guix
>> ./my-old-guix/bin/guix environment --ad-hoc whatevern
>>
>> But maybe I’m missing something, let me know. :-)
>
> That was my starting point. It's OK for manual execution, but if I want
> an Org-Mode file to this automatically, I need to generate a temporary
> file in place of ./my-old-guix with all the associated hassles: check
> that it doesn't exist before, and clean up in the end even in the case
> of errors. Maybe I'd even have to worry about two processes accessing
> the same temporary file and do some locking.
I see. In a way one could argue that it’s not Guix’ problem, but OTOH
it’s clearly a problem that Guix doesn’t make it more convenient.
> I ended up finding an approach that does work, though it relies on
> undocumented properties:
>
> (use-modules (guix channels)
> (guix inferior))
>
> (define channels
> (list (channel
> (name 'guix)
> (url "https://git.savannah.gnu.org/git/guix.git")
> (commit
> "44881cad93801de9462d469500d582af79b99959"))))
>
> (define inferior
> (inferior-for-channels channels))
>
> (define inferior-executable
> (inferior-eval
> '(car (program-arguments))
> inferior))
>
> (define inferior-command-line
> (cons inferior-executable (cdr (program-arguments))))
>
> (apply system* inferior-command-line)
>
> This script uses the inferior mechanism for creating and caching an
> older guix, but then calls its executable directly.
>
> Of course this idea could be implemented in a better way, by factoring
> out the caching mechanism from inferior-for-channels and providing a
> command-line interface. Something like
>
> guix time-machine channels.scm command args ...
>
> Does this sound reasonable? I volunteer for implementing this, but I'd
> like to have an expert opinion first.
That sounds reasonable to me: it’s a simple and easily-understood UI
(easier than the ‘guix pull -p’ dance!), and the implementation should
be easy (thus the maintenance cost is very low).
Looking forward to a patch! :-)
Thank you,
Ludo’.
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, (continued)
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Ludovic Courtès, 2019/10/10
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Konrad Hinsen, 2019/10/10
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Ludovic Courtès, 2019/10/10
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Konrad Hinsen, 2019/10/14
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Ludovic Courtès, 2019/10/14
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Konrad Hinsen, 2019/10/14
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Ludovic Courtès, 2019/10/14
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Konrad Hinsen, 2019/10/21
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Ludovic Courtès, 2019/10/22
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Konrad Hinsen, 2019/10/22
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter,
Ludovic Courtès <=
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Konrad Hinsen, 2019/10/25
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Konrad Hinsen, 2019/10/29
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Pierre Neidhardt, 2019/10/29
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Konrad Hinsen, 2019/10/23
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, zimoun, 2019/10/23
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Konrad Hinsen, 2019/10/23
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, zimoun, 2019/10/23
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Konrad Hinsen, 2019/10/24
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Pierre Neidhardt, 2019/10/24
- Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter, Konrad Hinsen, 2019/10/25