[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#44612: Read standard input in `guix repl'
From: |
Pierre Neidhardt |
Subject: |
bug#44612: Read standard input in `guix repl' |
Date: |
Sat, 14 Nov 2020 14:19:04 +0100 |
Hey Tobias,
Always good to have someone actually test the stuff :)
Tobias Geerinckx-Rice <me@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
Description: PGP signature
- bug#44612: Read standard input in `guix repl', Pierre Neidhardt, 2020/11/13
- bug#44612: Read standard input in `guix repl', Bengt Richter, 2020/11/13
- bug#44612: Read standard input in `guix repl', Tobias Geerinckx-Rice, 2020/11/13
- bug#44612: Read standard input in `guix repl', Pierre Neidhardt, 2020/11/14
- bug#44612: Read standard input in `guix repl', Tobias Geerinckx-Rice, 2020/11/14
- bug#44612: Read standard input in `guix repl',
Pierre Neidhardt <=
- bug#44612: Read standard input in `guix repl', Tobias Geerinckx-Rice, 2020/11/14
- bug#44612: Read standard input in `guix repl', Guillaume Le Vaillant, 2020/11/14
- bug#44612: Read standard input in `guix repl', Guillaume Le Vaillant, 2020/11/14
- bug#44612: Read standard input in `guix repl', Pierre Neidhardt, 2020/11/14
- bug#44612: Read standard input in `guix repl', Tobias Geerinckx-Rice, 2020/11/14
- bug#44612: Read standard input in `guix repl', Tobias Geerinckx-Rice, 2020/11/14
- bug#44612: Read standard input in `guix repl', Pierre Neidhardt, 2020/11/14
- bug#44612: Read standard input in `guix repl', Christopher Baines, 2020/11/14
- bug#44612: Read standard input in `guix repl', Pierre Neidhardt, 2020/11/14
- bug#44612: Read standard input in `guix repl', Pierre Neidhardt, 2020/11/14