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


View this message in rfc822 format

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

>> That's very clever! The weak spot is the P, as script evaluation does
>> not print anything. We could make it print the script's return code ;-)
>
> Hum? The usual REPL neither. :-)

You mean... they have been LYING to us all the time... about the REPL?

> Quoting Wikipedia: "print function takes the result yielded by eval"
> but from my understanding 'eval' does not always yield a "printable"
> result, e.g., "(define foo 42)".

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.

Cheers,
  Konrad.




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.