[squeak-dev] squeak XTream

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Wed Dec 2 04:06:02 UTC 2009


I just published a very early version of squeak extended streams to
http://www.squeaksource.com/XTream.html
- with code form IOHandle ported in trunk (as is)
- with my own implementation of Cincom XTream ideas
I licensed MIT, even IOHandle because these are large chunks of
existing Squeak source. David is it OK ?
Anyway, this code is not used yet...

The stream stacking/piping/composing/transforming (choose a name) is
based on major XTream idea that stream should be transformed through a
block taking an :inputStream and an :outputStream arguments.
This enables virtually any processing (like inflating deflating
encoding decoding etc...)

It is not yet functional, but the basic infrastructure is there: XtreamFIFO

Other noticeable point:
I avoided EndOfStream notification and replaced by an
endOfStreamAction instance variable, which is quite fun.
However with stream composition this will require some more work, and
might be tricky...
Anyway, EndOfStream is one of the possible option offered by
endOfStreamAction, so no feasibility problem.

The end conditions for blocking streams (like a pipe was closed) are
certainly not obvious to handle and will deserve more work too.

One thing that annoys me is this BufferedReadWriteXtream, the only
read/write stream of the collection so far.
It does not fit well in the hierarchy... Maybe I'll have to separate
the buffer too.

I will concentrate now on providing basic collection functionalities.
Then basic file functionalities, probably starting with a
StandardFileStream as source, then a IOFileHandle maybe.
- buffered read/write (equivalent to StandardFileStream)
- line end conversions (equivalent to CrLfFileStream)
- encoding conversions via transform: operations (equivalent to
MultiByteFileStream)

The plan will then be to implement more classes of the Stream
hierarchy. Most should be just implemented by a special transform
block...

Then it would be interesting to start unifying Socket and Pipe and
ASync files...

If anyone want to interfere, the repository is opened for write.

Nicolas



More information about the Squeak-dev mailing list