unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Chris Vine <chris@cvine.freeserve.co.uk>
Cc: guile-devel@gnu.org
Subject: Re: Reading data from a file descriptor
Date: Mon, 20 Jun 2016 12:40:53 +0200	[thread overview]
Message-ID: <87a8igjg7e.fsf@pobox.com> (raw)
In-Reply-To: <20151117135517.42458d6a@bother.homenet> (Chris Vine's message of "Tue, 17 Nov 2015 13:55:17 +0000")

On Tue 17 Nov 2015 14:55, Chris Vine <chris@cvine.freeserve.co.uk> 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



  parent reply	other threads:[~2016-06-20 10:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-07 14:52 Reading data from a file descriptor Jan Synáček
2015-11-07 15:16 ` Artyom Poptsov
2015-11-07 15:29   ` Artyom Poptsov
2015-11-07 23:49     ` Andreas Rottmann
2015-11-09  7:25       ` Jan Synáček
2015-11-13 15:51         ` Mark H Weaver
2015-11-13 20:41           ` Jan Synáček
2015-11-13 20:45             ` Thompson, David
2015-11-15 11:09               ` Jan Synáček
2015-11-15 12:05                 ` Thompson, David
2015-11-16 10:54             ` Amirouche Boubekki
2015-11-17  9:53               ` tomas
2015-11-17 12:59                 ` Chris Vine
2015-11-17 12:52                   ` tomas
2015-11-17 13:55                     ` Chris Vine
2015-11-17 13:33                       ` tomas
2016-06-20 10:40                       ` Andy Wingo [this message]
2016-06-20 10:58                         ` tomas
2015-11-18  8:28                   ` Jan Synáček
2015-11-16 13:02           ` tomas
2015-11-23 21:07             ` Andreas Rottmann
2015-11-24 15:28               ` tomas

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=87a8igjg7e.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=chris@cvine.freeserve.co.uk \
    --cc=guile-devel@gnu.org \
    /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).