unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Konrad Hinsen <konrad.hinsen@fastmail.net>
Cc: "Ludovic Courtès" <ludo@gnu.org>, 40373@debbugs.gnu.org
Subject: [bug#40373] [PATCH] guix: new command "guix run-script"
Date: Mon, 4 May 2020 19:48:19 +0200	[thread overview]
Message-ID: <CAJ3okZ1wadWTZynH84hmQ4djRg94EfZBohPAP_pYAmrn5_N6XA@mail.gmail.com> (raw)
In-Reply-To: <m1mu6n4xfw.fsf@khs-macbook.home>

Hi Konrad,

On Mon, 4 May 2020 at 15:55, Konrad Hinsen <konrad.hinsen@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




  reply	other threads:[~2020-05-04 17:49 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-01 14:09 [bug#40373] [PATCH] guix: new command "guix run-script" Konrad Hinsen
2020-04-01 21:00 ` Ludovic Courtès
2020-04-02  7:13   ` Konrad Hinsen
2020-04-02  9:17     ` zimoun
2020-04-02  9:37       ` Konrad Hinsen
2020-04-03  9:17         ` Konrad Hinsen
2020-04-03  9:48           ` Ludovic Courtès
2020-04-03  9:19         ` [bug#40373] [PATCH] guix: new command "guix run" generalizes "guix repl" Konrad Hinsen
2020-04-03  9:51     ` [bug#40373] [PATCH] guix: new command "guix run-script" Ludovic Courtès
2020-04-07  9:10       ` Konrad Hinsen
2020-04-07 10:36         ` Ludovic Courtès
2020-04-17 11:21           ` zimoun
2020-04-23 10:12             ` Konrad Hinsen
2020-04-23 14:41               ` zimoun
2020-04-29 16:04                 ` Konrad Hinsen
2020-04-30 12:42                   ` zimoun
2020-05-04 13:54                     ` Konrad Hinsen
2020-05-04 17:48                       ` zimoun [this message]
2020-05-14  9:29                         ` Konrad Hinsen
2020-05-14  9:44                           ` bug#40373: " zimoun
2020-04-02  9:08 ` [bug#40373] " zimoun
2020-04-02  9:21   ` Konrad Hinsen
2020-04-02  9:25   ` Konrad Hinsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ3okZ1wadWTZynH84hmQ4djRg94EfZBohPAP_pYAmrn5_N6XA@mail.gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=40373@debbugs.gnu.org \
    --cc=konrad.hinsen@fastmail.net \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).