guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: zimoun
Subject: [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 <address@hidden> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]