[NLUUG]   Welcome to ftp.nluug.nl
Current directory: /os/Linux/distr/rootlinux/ports/opt/sbcl/sbcl-1.0.14/contrib/sb-simple-streams/
 
Current bandwidth utilization 1216.42 Mbit/s
Bandwidth utilization bar
Contents of README:
-*- text -*-

An implementation of simple streams for sbcl.

Simple streams are an extensible streams protocol that avoids some
problems with Gray streams.

Documentation about simple streams is available at
http://www.franz.com/support/documentation/6.2/doc/streams.htm

This code was originally written by Paul Foley for cmucl; Paul's
version is now in cmucl cvs.

The port to sbcl was done by Rudi Schlatte (rudi@constantly.at).

This implementation should be considered Alpha-quality; the basic
framework is there, but many classes are just stubs at the moment.
See simple-stream-test.lisp for things that should work.



Known differences to the ACL behaviour:

- open not return a simple-stream by default.  This can be
  adjusted; see default-open-class in the file cl.lisp





==================================================

Some sketchy notes about the simple-streams architecture, at least
partly for my own benefit

(For all the details, please see Franz' documentation)

Motivation:

If you want to extend a given Gray stream, is it enough to supply a
method for stream-write-byte, or do you have to overwrite
stream-write-sequence as well?  How do you extend your Gray socket
stream to support chunked stream encoding for HTTP/1.1?  Is
stream-read-char-no-hang required to call stream-listen, then
stream-read-char?  Simple-streams solve these protocol problems by
implementing a device layer following a buffering protocol and a thin
"strategy" layer that provides the functionality for the normal CL
stream semantics.

The device layer at the bottom deals with transferring chunks of bytes
between a buffer and a device (socket, file, printer, what-have-you).
The top layer is the familiar CL API (read-line, write-sequence, open,
etc).  The strategy layer in the middle translates between the
buffer-of-bytes and CL stream world-view, dealing with
byte<->character conversion, line-ending and stream-external-format
conventions, etc.

Implementing a new type of stream is a matter of extending the right
stream class and implementing device-read, device-write, device-extend
& friends.  single-channel-simple-stream is a class where there is one
buffer for both input and output (this is appropriate e.g. for a file).  The
dual-channel-simple-stream class deals with devices that require
separate buffers for input and output (e.g. sockets).

Other character representations (Unicode, other multi-byte encodings)
are implemented at the strategy level.  The Franz documentation is
unclear about this, but it seems that encodings take an active part
("the encoding reads as many bytes as are necessary to compose a
character", or words to that effect).  This is not implemented in the
present code (neither is it in Paul Foley's implementation), and will
not be until sbcl gains Unicode abilities, but it would be nice to
have it at least stubbed out in the implementation.

Icon  Name                                                          Last modified      Size  
[DIR] Parent Directory - [DIR] CVS/ 11-Jan-2008 01:41 - [   ] .cvsignore 30-Apr-2006 21:21 50 [   ] Makefile 13-May-2003 14:21 51 [TXT] README 07-Sep-2003 16:10 2.8K [TXT] TODO 25-Sep-2003 14:12 824 [   ] classes.lisp 14-Jul-2005 18:30 9.8K [   ] direct.lisp 14-Jul-2005 18:30 1.0K [   ] file.lisp 06-Sep-2006 22:27 12K [   ] fndb.lisp 07-Dec-2005 16:57 3.9K [   ] impl.lisp 10-Aug-2005 09:57 44K [   ] internal.lisp 06-Aug-2007 13:50 29K [   ] iodefs.lisp 14-Jul-2005 18:30 6.0K [   ] null.lisp 14-Jul-2005 18:30 2.3K [   ] package.lisp 29-Jun-2004 10:50 3.0K [   ] sb-simple-streams.asd 16-Mar-2005 11:11 1.8K [   ] sb-simple-streams.texinfo 17-Aug-2004 19:32 681 [   ] simple-stream-tests.lisp 08-Mar-2007 12:12 31K [   ] socket.lisp 14-Jul-2005 18:30 4.5K [   ] strategy.lisp 14-Jul-2005 18:30 29K [   ] string.lisp 14-Jul-2005 18:30 4.3K [   ] terminal.lisp 06-Aug-2007 13:50 2.3K

NLUUG - Open Systems. Open Standards
Become a member and get discounts on conferences and more, see the NLUUG website!