From: Guillaume Le Vaillant <glv@posteo.net>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: mail@ambrevar.xyz, 44612@debbugs.gnu.org
Subject: bug#44612: Read standard input in `guix repl'
Date: Sat, 14 Nov 2020 16:03:56 +0100 [thread overview]
Message-ID: <87v9e8hter.fsf@yamatai> (raw)
In-Reply-To: <878sb459cf.fsf@nckx>
[-- Attachment #1: Type: text/plain, Size: 2253 bytes --]
Tobias Geerinckx-Rice via Bug reports for GNU Guix <bug-guix@gnu.org> skribis:
> Pierre,
>
> Pierre Neidhardt 写道:
>> and... it works! O.o
>
> Don't you hate it when that happens? Ban bug suicide.
>
> (Does that mean this one can be closed? Or retitled, if we want to debug
> Nyxt? :-)
>
>> For future reference, it's also works in Common Lisp:
>> (uiop:run-program '("guix" "repl") :input s :output
>> t :error-output nil))
>
> Well, I stranded trying to import (or whatever the CL term is) UIOP itself, but
> my Common Lisp-fu is hella weak.
>
>> 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.
>
> That's a question for Guile channels, but I totally agree. It's annoying and
> nowhere near ‘an interactive mode’ as suggested by the GPL3.
>
> This is sensible:
>
> $ echo echo Hi. | bash
> Hi.
> $
> This is not:
>
> $ echo '(display "Hi.\n")' | guile
> GNU Guile 3.0.2
> 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.
> Hi.
> scheme@(guile-user)> $
>
>> Any clue how to do that?
>
> The following line in my ~/.guile does just that:
>
> (set! repl-welcome (const #t))
>
> ...unfortunately, it doesn't work late:
>
> $ echo '(use-modules ((system repl common))) \
> (set! repl-welcome (const #t))' | guix repl
> [shouty noises]
> $
>
> It does not appear documented if and how you'd make Guile load a different
> (Nyxt-specific) init file name.
>
> This reminds me: do you want Nyxt to call ‘guix repl -q’ to skip loading
> ~/.guile to make your UI more predictable & debuggable? Or keep it as an escape
> hatch for cool hacks?
>
> Kind regards,
>
> T G-R
It looks like you can get rid of the welcome message by using the '-s'
option:
$ echo '(display "Hi.\n")' | guile -s /dev/stdin
Hi.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
next prev parent reply other threads:[~2020-11-14 15:05 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 9:41 bug#44612: Read standard input in `guix repl' Pierre Neidhardt
2020-11-13 19:08 ` Bengt Richter
2020-11-13 22:24 ` zimoun
2020-11-16 9:25 ` Ludovic Courtès
2020-11-16 11:36 ` Pierre Neidhardt
2020-11-16 11:53 ` Pierre Neidhardt
2020-11-16 12:52 ` Ludovic Courtès
2020-11-16 16:11 ` Pierre Neidhardt
2020-11-13 20:27 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2020-11-14 9:52 ` Pierre Neidhardt
2020-11-14 11:23 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2020-11-14 13:19 ` Pierre Neidhardt
2020-11-14 13:58 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2020-11-14 15:03 ` Guillaume Le Vaillant [this message]
2020-11-14 15:07 ` Guillaume Le Vaillant
2020-11-14 16:06 ` Pierre Neidhardt
2020-11-14 15:22 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2020-11-14 15:36 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2020-11-14 16:11 ` Pierre Neidhardt
2020-11-14 15:43 ` Christopher Baines
2020-11-14 16:03 ` Pierre Neidhardt
2020-11-14 13:24 ` Pierre Neidhardt
2020-11-14 14:12 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2020-11-14 16:05 ` Pierre Neidhardt
2020-11-14 16:13 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2020-11-14 16:25 ` Pierre Neidhardt
2020-11-14 17:08 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2020-11-14 17:21 ` Pierre Neidhardt
2020-11-14 17:33 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2020-11-14 19:08 ` zimoun
2020-11-16 10:45 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2020-11-16 11:38 ` zimoun
2020-11-14 12:09 ` zimoun
2020-12-01 7:52 ` Ludovic Courtès
2020-12-01 8:29 ` Pierre Neidhardt
2020-12-03 10:22 ` Ludovic Courtès
2020-12-03 10:33 ` Pierre Neidhardt
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v9e8hter.fsf@yamatai \
--to=glv@posteo.net \
--cc=44612@debbugs.gnu.org \
--cc=mail@ambrevar.xyz \
--cc=me@tobias.gr \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.