GNU bug report logs -
#44612
Read standard input in `guix repl'
Previous Next
Reported by: Pierre Neidhardt <mail <at> ambrevar.xyz>
Date: Fri, 13 Nov 2020 09:42:01 UTC
Severity: normal
Tags: notabug
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hey Tobias,
Always good to have someone actually test the stuff :)
Tobias Geerinckx-Rice <me <at> tobias.gr> writes:
> So far this looks like an (SB)CL(-specific) bug, right? Does it
> happen anywhere else? I tried Guile[0].
Maybe there was a misunderstanding, it's not about Common Lisp.
We can do easier than from Guile, i.e. from a shell:
--8<---------------cut here---------------start------------->8---
echo '(display "hello")' | guix repl
--8<---------------cut here---------------end--------------->8---
and... it works! O.o
OK, my bad then, I mistested somehow.
For future reference, it's also works in Common Lisp:
--8<---------------cut here---------------start------------->8---
> (with-input-from-string (s "(display \"foo\\n\")")
(uiop:run-program '("guix" "repl") :input s :output t :error-output nil))
GNU Guile 3.0.4
Copyright (C) 1995-2020 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
foo
--8<---------------cut here---------------end--------------->8---
However this brings me to another issue: the program output is prefixed
with the REPL welcome message which is printed to stdout.
So ideally when we read from standard input we should not include the
welcome message.
Any clue how to do that?
--
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 4 years and 230 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.