From: Volkan YAZICI
Subject: READ-BYTE-NO-HANG
Date: 
Message-ID: <f5df65cd-579d-4fd1-ae41-666711d65333@p31g2000prf.googlegroups.com>
Hi,

Just for curiosity, why is READ-BYTE-NO-HANG not included in the
Common Lisp standardization process, while there exists READ-CHAR-NO-
HANG?


Regards.

From: Pascal J. Bourguignon
Subject: Re: READ-BYTE-NO-HANG
Date: 
Message-ID: <7cmygemie8.fsf@pbourguignon.anevia.com>
Volkan YAZICI <·············@gmail.com> writes:
> Just for curiosity, why is READ-BYTE-NO-HANG not included in the
> Common Lisp standardization process, while there exists READ-CHAR-NO-
> HANG?

My hypothesis is that you didn't read binary data interactively, so it didn't make sense.

Of course, nowadays, user interaction is often mediated by a "browser"
that can communicate with the program thru a binary stream, so we
would need it.  But twenty years ago, I guess it would have seemed a
strange idea.  Until a few years later when Tim invented HTTP, in
1990.

-- 
__Pascal Bourguignon__
From: George Neuner
Subject: Re: READ-BYTE-NO-HANG
Date: 
Message-ID: <0kr3h4t14gl12mduhnebkbnrf94so0g3mu@4ax.com>
On Wed, 05 Nov 2008 14:06:39 +0100, ···@informatimago.com (Pascal J.
Bourguignon) wrote:

>Volkan YAZICI <·············@gmail.com> writes:
>> Just for curiosity, why is READ-BYTE-NO-HANG not included in the
>> Common Lisp standardization process, while there exists READ-CHAR-NO-
>> HANG?
>
>My hypothesis is that you didn't read binary data interactively,
>so it didn't make sense.

But binary data could come through a network which was certainly
"interactive" in the sense of incomplete transmissions.


>Of course, nowadays, user interaction is often mediated by a "browser"
>that can communicate with the program thru a binary stream, so we
>would need it.  But twenty years ago, I guess it would have seemed a
>strange idea.  Until a few years later when Tim invented HTTP, in
>1990.

Arcnet and Ethernet both existed in 1980 ... not to mention HPIB and a
number of proprietary serial cable networks.  Many universities and
even some high schools had, at least, small networks within their
computer labs.  

I get that there were no protocol standards around which to base CL
primitives, but I would have thought that the need for non-blocking
binary I/O should have been foreseen.

George
From: ···@scieneer.com
Subject: Re: READ-BYTE-NO-HANG
Date: 
Message-ID: <70da4e53-b402-49bd-9c91-2eaf96c0a241@j40g2000prh.googlegroups.com>
On Nov 5, 9:17 pm, Volkan YAZICI <·············@gmail.com> wrote:
> Hi,
>
> Just for curiosity, why is READ-BYTE-NO-HANG not included in the
> Common Lisp standardization process, while there exists READ-CHAR-NO-
> HANG?
>
> Regards.

This does seem like an obvious omission.  Perhaps there was little
demand, or perhaps a character stream with an one-to-one 8-bit coding
could be used.

The Scieneer Common Lisp implementation has a good range of byte
stream extensions to parallel the standard character stream functions:

ext:read-byte-no-hang, see http://www.scieneer.com/scl/doc/function/ext/read-byte-no-hang.html

ext:peek-byte, see http://www.scieneer.com/scl/doc/function/ext/peek-byte.html

ext:unread-byte, see http://www.scieneer.com/scl/doc/function/ext/unread-byte.html

ext:make-byte-input-stream, see http://www.scieneer.com/scl/doc/function/ext/make-byte-input-stream.html

ext:make-byte-output-stream, see http://www.scieneer.com/scl/doc/function/ext/make-byte-output-stream.html

ext:with-input-from-bytes, see http://www.scieneer.com/scl/doc/function/ext/with-input-from-bytes.html

ext:with-output-to-bytes, see http://www.scieneer.com/scl/doc/function/ext/with-output-to-bytes.html

ext:get-output-stream-bytes, see http://www.scieneer.com/scl/doc/function/ext/get-output-stream-bytes.html

Regards
Douglas Crosher