From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: Reading data from a file descriptor Date: Mon, 20 Jun 2016 12:40:53 +0200 Message-ID: <87a8igjg7e.fsf@pobox.com> References: <87a8qpx2kg.fsf@elephant.savannah> <874mgxx1y3.fsf@elephant.savannah> <87fv0h1ic2.fsf@delenn.home.rotty.xx.vu> <87h9kpvqw1.fsf@netris.org> <09b3d3156d439ce3dd7bedc48d84fd5b@hypermove.net> <20151117095319.GA7958@tuxteam.de> <20151117125956.4b2fc363@bother.homenet> <20151117125221.GB13216@tuxteam.de> <20151117135517.42458d6a@bother.homenet> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1466419282 31695 80.91.229.3 (20 Jun 2016 10:41:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2016 10:41:22 +0000 (UTC) Cc: guile-devel@gnu.org To: Chris Vine Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jun 20 12:41:12 2016 Return-path: Envelope-to: guile-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 1bEwdi-0002O7-Vr for guile-devel@m.gmane.org; Mon, 20 Jun 2016 12:41:11 +0200 Original-Received: from localhost ([::1]:42550 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEwdi-0007fZ-38 for guile-devel@m.gmane.org; Mon, 20 Jun 2016 06:41:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEwdd-0007fS-WD for guile-devel@gnu.org; Mon, 20 Jun 2016 06:41:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEwda-0005eO-OP for guile-devel@gnu.org; Mon, 20 Jun 2016 06:41:05 -0400 Original-Received: from pb-sasl2.pobox.com ([64.147.108.67]:54484 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEwda-0005eK-Ka for guile-devel@gnu.org; Mon, 20 Jun 2016 06:41:02 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id CA8A820C2E; Mon, 20 Jun 2016 06:41:01 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=hBuQUvD8h9m1G/g3RpUCwGt/JhU=; b=NjplTp sPKC9te1ivKn4nyZkwERfj2DM+u/4rn9jKvTSbofcvzgDPMmuaZUgUckWSeIRKTo tpkzRY4wqwuUB5yfTr3qVuSLAy1ljNY/tTmJSmu1n2zRrGQ0VgKYk5HW/pdEkfqD Gz3TPY3A0FCG1ggr5Qh4/P4UmbQc3tmYh5TAE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=T/EQAygL7AjKqbTj6kf4g4pcBRqn4Dx6 JhE52m2Ks7JX5zvCwfVxb1rqFpWdeSo3n6wYWtvz/P+DQjsx/qdw0+GYHsLIZfe1 YucXinD+dA5YiiEnUrMM5SwWuFXEtxsM5r/P83ZvyyzlzoLXjptLyH+TcSIOTrku NfxAHClm4V4= Original-Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id B486220C2C; Mon, 20 Jun 2016 06:41:01 -0400 (EDT) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl2.pobox.com (Postfix) with ESMTPSA id CD40C20C2A; Mon, 20 Jun 2016 06:41:00 -0400 (EDT) In-Reply-To: <20151117135517.42458d6a@bother.homenet> (Chris Vine's message of "Tue, 17 Nov 2015 13:55:17 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Pobox-Relay-ID: 7B093F68-36D3-11E6-9A17-28A6F1301B6D-02397024!pb-sasl2.pobox.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.147.108.67 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:18363 Archived-At: On Tue 17 Nov 2015 14:55, Chris Vine writes: > On Tue, 17 Nov 2015 13:52:21 +0100 >> On Tue, Nov 17, 2015 at 12:59:56PM +0000, Chris Vine wrote: >> > On Tue, 17 Nov 2015 10:53:19 +0100 >> >> [...] >> >> > guile's R6RS implementation has get-bytevector-some, which will do >> > that for you, with unix-read-like behaviour. >> >> Thank you a thousand. You made me happy :-) > > I suppose it is worth adding that it might not be optimally efficient > for all uses, as there is no get-bytevector-some! procedure which > modifies an existing bytevector and takes a maximum length value. I > guess it is a matter of 'suck it and see', efficiency-wise. I would be happy to support such an interface though. I guess it would take a keyword or optional argument indicating a minimum number of bytes to fill, and if that number is 0 it would never block; sound about right? Andy