unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Tony Garnock-Jones <tonyg@leastfixedpoint.com>
To: Fabio Natali <me@fabionatali.com>, 43364@debbugs.gnu.org
Subject: bug#43364: with-output-to-port works with file ports
Date: Wed, 24 Apr 2024 09:00:42 +0200	[thread overview]
Message-ID: <dae7430d-20d3-4de0-b188-f849ebd29b76@leastfixedpoint.com> (raw)
In-Reply-To: <87zftkniob.fsf@fabionatali.com>

This is a nice idea. The way Racket does it is to make 
with-output-to-string cooperate with system:

     (with-output-to-string (lambda () (system "date")))

but a quick check shows that Guile does not yet have such cooperation in 
place. Would that be a good place to start looking?

Tony


On 23/04/2024 18:32, Fabio Natali wrote:
> Dear All 👋,
> 
> I've been encountering a few times the need for a procedure like
> 'system' or 'system*' but that might be capable of capturing the output
> of the program that's being called.
> 
> While this is something that can be solved with a simple 'open-pipe*'
> wrapper, the pattern seems relatively frequent in Guix, which is where I
> noticed it. I suggested that some variant of such a wrapper could be
> added to '(guix build utils)'⁰.
> 
> In reply to my post, it was brought to my attention that the problem
> might be addressed at the Guile level and pointed me to this bug report.
> 
> I thought of sending a quick follow-up here to see if there's any rough
> consensus on a possible way of addressing this - or why it might be
> difficult or potentially not worth the effort.
> 
> Thanks, all best, Fabio.
> 
> ⁰ https://lists.gnu.org/archive/html/guix-devel/2024-04/msg00199.html
> 
> 





      reply	other threads:[~2024-04-24  7:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-12 20:59 bug#43364: Possible bug with output redirection pinoaffe
2020-09-13  7:13 ` tomas
2023-09-08 17:53 ` bug#43364: with-output-to-port works with file ports Felix Lechner via Bug reports for GUILE, GNU's Ubiquitous Extension Language
2023-09-08 19:06   ` Ricardo Wurmus
2024-04-23 16:32 ` Fabio Natali
2024-04-24  7:00   ` Tony Garnock-Jones [this message]

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://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=dae7430d-20d3-4de0-b188-f849ebd29b76@leastfixedpoint.com \
    --to=tonyg@leastfixedpoint.com \
    --cc=43364@debbugs.gnu.org \
    --cc=me@fabionatali.com \
    /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.
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).