From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: File-handle streams (was: Redirecting messages) Date: Fri, 06 Nov 2015 16:54:06 -0500 Message-ID: References: <563C7387.7080407@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1446872313 31739 80.91.229.3 (7 Nov 2015 04:58:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 7 Nov 2015 04:58:33 +0000 (UTC) Cc: Oleh , bruce.connor.am@gmail.com, emacs-devel To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 07 05:58:33 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZuvaA-00032t-Cg for ged-emacs-devel@m.gmane.org; Sat, 07 Nov 2015 05:58:30 +0100 Original-Received: from localhost ([::1]:42135 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zuva9-0002Rt-E9 for ged-emacs-devel@m.gmane.org; Fri, 06 Nov 2015 23:58:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zuva2-0002Ke-Ty for emacs-devel@gnu.org; Fri, 06 Nov 2015 23:58:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zuva2-000316-09 for emacs-devel@gnu.org; Fri, 06 Nov 2015 23:58:22 -0500 Original-Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]:36061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zuva1-000312-RH for emacs-devel@gnu.org; Fri, 06 Nov 2015 23:58:21 -0500 Original-Received: by pacdm15 with SMTP id dm15so118266256pac.3 for ; Fri, 06 Nov 2015 20:58:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mail-followup-to:mime-version:content-type; bh=dlplXBxNc24DGN7yxzVUpRrj2NWTg8NMZqg1CK/hE9o=; b=me4OCWqrxLZOOTq5B/mZisrImzTiZMr9O++8YrTWX8LQv4fwFefWFyHznllhlTzHhA QRABOcMPMYZKfq1Lw/6wNQTRbsX56JkjohifPyj1Yzy4zFAFCxYCG3ArchgX37+L9KtD i729KE1UV+BBdFG/p4y1rax2KRhFXWVJKlO4T4L++K7tUywjzjxslcC0VxxsBYnbh64Z yulGRFhED4aPlrG5NnAFqFQAuypWWO32DUUt6WujNJatY5MhFN5LgZ+BnX70zgDvFL8l n1HMpnvkpLniw2y4sEqZz7c0gSrarv346tMNKxkYnHK0WX4am9wX1DtfpKMgNtr1pHtS drDg== X-Received: by 10.67.1.170 with SMTP id bh10mr22613321pad.17.1446872301301; Fri, 06 Nov 2015 20:58:21 -0800 (PST) Original-Received: from Hermes-2.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id ir5sm3067156pbc.13.2015.11.06.20.58.16 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 06 Nov 2015 20:58:18 -0800 (PST) X-Google-Original-From: "John Wiegley" Original-Received: by Hermes-2.local (Postfix, from userid 501) id 67BC248F8010; Fri, 6 Nov 2015 20:58:15 -0800 (PST) In-Reply-To: <563C7387.7080407@dancol.org> (Daniel Colascione's message of "Fri, 6 Nov 2015 01:31:51 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Mail-Followup-To: Daniel Colascione , bruce.connor.am@gmail.com, emacs-devel , Oleh X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:193487 Archived-At: >>>>> Daniel Colascione writes: > I wish we'd direct some love toward the streams system. There's no reason > that standard-output and a hypothetical message-output couldn't be the same > type of object and have the same semantics. A scheme like this would also > help modes like ielm provide a uniform way of capturing command output. I want this too, Daniel. I'd also like to have a way of making streams from file handles directly, so Eshell could finally support input redirection. Something like: (with-file-stream "/tmp/foo" :mode 'write :var handle (prin1 some-object handle)) At the moment it's rather hard to generate huge amounts of data to a file quickly, since you have to use a buffer in between. Eshell's piping behavior would also be orders of magnitude faster, since it now uses a temporary buffer to accumulate and then send data from one process to another. Anyone interested in tackling this challenge? John