From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tony Garnock-Jones Newsgroups: gmane.lisp.guile.bugs Subject: bug#43364: with-output-to-port works with file ports Date: Wed, 24 Apr 2024 09:00:42 +0200 Message-ID: References: <20200912225923.5fa9504e@airmail.cc> <87zftkniob.fsf@fabionatali.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21416"; mail-complaints-to="usenet@ciao.gmane.io" To: Fabio Natali , 43364@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Wed Apr 24 09:02:43 2024 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rzWeQ-0005LK-4q for guile-bugs@m.gmane-mx.org; Wed, 24 Apr 2024 09:02:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzWdu-00061O-Bf; Wed, 24 Apr 2024 03:02:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rzWdk-00060X-Kk for bug-guile@gnu.org; Wed, 24 Apr 2024 03:02:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzWdh-0001rs-Aq for bug-guile@gnu.org; Wed, 24 Apr 2024 03:01:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rzWdx-0005Dw-DQ for bug-guile@gnu.org; Wed, 24 Apr 2024 03:02:13 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tony Garnock-Jones Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 24 Apr 2024 07:02:12 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43364 X-GNU-PR-Package: guile Original-Received: via spool by 43364-submit@debbugs.gnu.org id=B43364.171394208419631 (code B ref 43364); Wed, 24 Apr 2024 07:02:12 +0000 Original-Received: (at 43364) by debbugs.gnu.org; 24 Apr 2024 07:01:24 +0000 Original-Received: from localhost ([127.0.0.1]:56875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rzWd3-00055W-U7 for submit@debbugs.gnu.org; Wed, 24 Apr 2024 03:01:22 -0400 Original-Received: from smoke.leastfixedpoint.com ([81.4.107.66]:36880 helo=mail.leastfixedpoint.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rzWcs-00052l-JE for 43364@debbugs.gnu.org; Wed, 24 Apr 2024 03:01:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leastfixedpoint.com; s=default; t=1713942043; bh=jL+XDw/6aoUO0UTFpTcGeMJA0ypNSJTKEzrHI1/H9hQ=; h=Date:Subject:To:References:From:In-Reply-To; b=eSR9SOAWsQ/1iCXw7qym64onyWHsy/319quR74cB0ffFUx+p7cdTKQycMZGRddImu hQcg/DLMvwJA2Lzv2h1hHIMflRNpi9r/k3uERgEm6NM3egFGRwX0rlEKNZH3W+qSnA yWPvem16XzieJxg5sgl6sNZ3XvP2/Dj0BsBXGxa0= Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.leastfixedpoint.com (Postfix) with ESMTPSA id 4CA103FB85; Wed, 24 Apr 2024 09:00:43 +0200 (CEST) Content-Language: en-US In-Reply-To: <87zftkniob.fsf@fabionatali.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10816 Archived-At: 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 > >