GNU bug report logs - #40373
[PATCH] guix: new command "guix run-script"

Previous Next

Package: guix-patches;

Reported by: Konrad Hinsen <konrad.hinsen <at> fastmail.net>

Date: Wed, 1 Apr 2020 14:10:01 UTC

Severity: normal

Tags: patch

Done: zimoun <zimon.toutoune <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #65 received at 40373 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 40373 <at> debbugs.gnu.org
Subject: Re: [bug#40373] [PATCH] guix: new command "guix run-script"
Date: Mon, 4 May 2020 19:48:19 +0200
Hi Konrad,

On Mon, 4 May 2020 at 15:55, Konrad Hinsen <konrad.hinsen <at> fastmail.net> wrote:

> True, not always. But for scripts it's never. We have to find some nice
> three-valued logic rhetoric that applies to all situations ;-)
>
> Command line:
>   - read an expression,
>   - eval it,
>   - print the result of the evaluation (if any),
>   - and finally loop to process the next expression
>
> Scripts:
>   - read the script file1,
>   - eval it,
>   - print the textual output of the script (if any),
>   - and finally loop if there is more than one script file.
>
> That makes "print" look optional in both cases.

It is how I personally understand all that. :-)
So that's why I proposed "guix repl --script" (in short '-s') ;-)

In this frame of "guix repl", the future additions/evolution could be:

  --eval,-e for evaluating one expression just after the script is loaded
  --debug for starting the "debugging" VM engine (personally never
used with Guile)
  --language for switching to WISP (optimistic evolution of GWL :-))
  --use-srfi for loading SRFI modules

So it ends up with this kind of command-line:

  guix repl -L /path/to/stuff --use-srfi=9
  guix repl -L /path/to/custom -s file.scm
  guix repl --language=wisp --script file.wsp
  guix repl -s file.scm -e '(package-name foo)'

Well, 'repl' meaning "use the interpreter in the context of Guix".
Is 'repl' enough meaningful for these use cases? Personally, I think so. :-)


All the best,
simon




This bug report was last modified 5 years and 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.