unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Pierre Neidhardt <mail@ambrevar.xyz>
To: "Ludovic Courtès" <ludo@gnu.org>, "Bengt Richter" <bokr@bokr.com>
Cc: 44612@debbugs.gnu.org
Subject: bug#44612: Read standard input in `guix repl'
Date: Mon, 16 Nov 2020 12:36:02 +0100	[thread overview]
Message-ID: <87wnylbkkd.fsf@ambrevar.xyz> (raw)
In-Reply-To: <87blfx1wmf.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1513 bytes --]

Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Bengt Richter <bokr@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/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]

  reply	other threads:[~2020-11-16 11:37 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 [this message]
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
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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnylbkkd.fsf@ambrevar.xyz \
    --to=mail@ambrevar.xyz \
    --cc=44612@debbugs.gnu.org \
    --cc=bokr@bokr.com \
    --cc=ludo@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).