[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Nonblocking get-bytevector-n bug?
From: |
tomas |
Subject: |
Re: Nonblocking get-bytevector-n bug? |
Date: |
Tue, 8 Dec 2015 11:53:07 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, Dec 07, 2015 at 03:42:28PM +0100, Ludovic Courtès wrote:
> address@hidden (Taylan Ulrich "Bayırlı/Kammer") skribis:
>
> > address@hidden (Taylan Ulrich "Bayırlı/Kammer") writes:
> >
> >> address@hidden (Ludovic Courtès) writes:
> >>
> >>> Not sure what R7 does here.
> >>
> >> R7RS section 6.13.2 Input, page 58, defines:
> >>
> >> (read-bytevector! bytevector [port [start [end]]])
> >>
> >> Reads the next END - START bytes, or as many as are available before
> >> the end of file [...]
[...]
> Yes, but only “until the end of BYTEVECTOR has been reached.”
All else would lead to... "interesting results", as every C hacker knows ;-)
But still the original problem remains: how to get "up to" N octets from
a stream without blocking, even if the stream hasn't N octets available
yet (the UNIX read() semantics with O_NONBLOCK, more or less)
Symetrically, there's the same thing with write().
Now the R7RS comes very close to that, but alas, not quite.
Marko's proposal seems extremely tempting, I must say...
regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlZmtpMACgkQBcgs9XrR2kYnMgCfUj8F1pWXdEunzEyXQg3tj3a6
wOUAn2srffROBjnUiRi17RXiLHOe8NK1
=5qrh
-----END PGP SIGNATURE-----
Re: Nonblocking get-bytevector-n bug?, Amirouche Boubekki, 2015/12/07
Re: Nonblocking get-bytevector-n bug?, Mark H Weaver, 2015/12/08