From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Hartwig Newsgroups: gmane.lisp.guile.user Subject: Re: Filter IO through an external command Date: Mon, 27 Feb 2012 14:33:31 +0800 Message-ID: References: <877gzdbhbr.fsf@gnuvola.org> <8762ewmstj.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1330324420 24923 80.91.229.3 (27 Feb 2012 06:33:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Feb 2012 06:33:40 +0000 (UTC) Cc: guile-user@gnu.org, Thien-Thi Nguyen To: Andy Wingo Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Feb 27 07:33:39 2012 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S1u9S-0004NY-JI for guile-user@m.gmane.org; Mon, 27 Feb 2012 07:33:38 +0100 Original-Received: from localhost ([::1]:59921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1u9S-0007oe-0k for guile-user@m.gmane.org; Mon, 27 Feb 2012 01:33:38 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1u9N-0007kN-SE for guile-user@gnu.org; Mon, 27 Feb 2012 01:33:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1u9M-0008Rx-Cm for guile-user@gnu.org; Mon, 27 Feb 2012 01:33:33 -0500 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:57862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1u9M-0008Rq-7i for guile-user@gnu.org; Mon, 27 Feb 2012 01:33:32 -0500 Original-Received: by iajr24 with SMTP id r24so1314299iaj.0 for ; Sun, 26 Feb 2012 22:33:31 -0800 (PST) Received-SPF: pass (google.com: domain of mandyke@gmail.com designates 10.42.154.195 as permitted sender) client-ip=10.42.154.195; Authentication-Results: mr.google.com; spf=pass (google.com: domain of mandyke@gmail.com designates 10.42.154.195 as permitted sender) smtp.mail=mandyke@gmail.com; dkim=pass header.i=mandyke@gmail.com Original-Received: from mr.google.com ([10.42.154.195]) by 10.42.154.195 with SMTP id r3mr12706074icw.36.1330324411304 (num_hops = 1); Sun, 26 Feb 2012 22:33:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=XdZjj4Zx74cAHxc7oJqgTLsGRjhD05v/GK4a+AwGt6s=; b=BKmazDwrLA91pOnYuIJRrNvpSvk10FbEKeGkMSn6oqfvkYlA/AJklkr7Rq9t9sIY7a iw7Un3GeTcYy3WpHN+l+rTr2LcW7sKzy1NuKGeY88TsAtMn6+bmPMdZN7AdENWdm++7l 7Eg+Nj9hYLKZZ0z4avcTKY192Nn/5dPESHEe0= Original-Received: by 10.42.154.195 with SMTP id r3mr10185398icw.36.1330324411265; Sun, 26 Feb 2012 22:33:31 -0800 (PST) Original-Received: by 10.231.24.7 with HTTP; Sun, 26 Feb 2012 22:33:31 -0800 (PST) In-Reply-To: <8762ewmstj.fsf@pobox.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.169 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:9305 Archived-At: On 24 February 2012 18:25, Andy Wingo wrote: > On Fri 24 Feb 2012 04:31, Daniel Hartwig writes: > >> I ended up using run-with-pipe from guile-lib's (os process) module >> which returns separate port objects--similar to the OP's proc.. > > Should we incorporate something like this into Guile? > > Want to make a patch? =C2=A0It could make open-process return the read an= d > write ports separately. > Sure. Since open-process is internal to the popen module, changing that is no problem. With regards to the open-pipe procedures would you rather an API-breaking change to returning the pair of ports, or a new procedure which returns the pair? Having separate read and write ports is greatly more useful than combining them. It also removes the overhead of passing everything through a soft port. Some users may prefer the current convenience of dealing with a single port, but it does not reflect the underlying mechanics very well.