GNU bug report logs - #44612
Read standard input in `guix repl'

Previous Next

Package: guix;

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


Message #146 received at 44612 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>, Bengt Richter
 <bokr <at> bokr.com>
Cc: 44612 <at> debbugs.gnu.org
Subject: Re: bug#44612: Read standard input in `guix repl'
Date: Mon, 16 Nov 2020 12:36:02 +0100
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi,
>
> Bengt Richter <bokr <at> bokr.com> skribis:
>
>> On +2020-11-13 10:41:38 +0100, Pierre Neidhardt wrote:
>>> `guix repl` is a fantastic, hassle-free tool to bind Guix with
>>> third-party languages.  I've done it here:
>>> 
>>> https://github.com/atlas-engineer/nyxt/blob/2-pre-release-4/libraries/ospama/ospama-guix.lisp
>
> I recommend using ‘guix repl -t machine’

Looks like `-t machine` has the same issue.
This does what I want:

--8<---------------cut here---------------start------------->8---
$ echo "(display \"Hi.\\n\")" | guix repl -t machine /dev/stdin
Hi.
--8<---------------cut here---------------end--------------->8---

This does not:

--8<---------------cut here---------------start------------->8---
$ echo "(display \"Hi.\\n\")" | guix repl -t machine  
(repl-version 0 1 1)
Hi.
(values (non-self-quoting 2052 "#<unspecified>"))
--8<---------------cut here---------------end--------------->8---

> and keeping the REPL process around instead of respawning it for every
> expression.

At first glance, we would want to do this indeed.

But in the case of Nyxt, there would be no point when to terminate the
process, so it would be around for the whole time Nyxt is running, which
may not be desirable.

Alternatively, I could simply keep it alive for a given duration (1
minute?) and automatically spawn it if the process is dead.

Any recommendations?

-- 
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.