[ANN] Nile: a trait-based stream library
Damien Cassou
damien.cassou at gmail.com
Wed May 2 15:03:41 UTC 2007
Hi Lukas,
thank you very much for this really helpful comment. Here are some
answers/questions:
2007/5/2, Lukas Renggli <renggli at gmail.com>:
> - Right now the only available stream classes work on in-memory
> collections. I would like to be able to use them on Files and Sockets
> as well.
Implementing streams on Files and Sockets is a bit difficult for me
because I haven't any knowledge about them.
> - The current Squeak Stream implementation lacks the possibility (and
> it is difficult to do so in a clean way) to wrap streams with other
> streams. What I would like to be able to do wrappers that encode,
> decode (URL, HTML, BASE64, Cryptography, ...), filter, select,
> collect, parse streams in different ways. See [1] for some examples.
> The wrapping could also be used to provide synchronization on shared
> streams.
You would like the framework to let you chain the streams, aren't you?
So that you have a stream which interact with another stream.
> - #upTo: is cool. For most purposes this is however too basic. I need
> many different efficient and reliable variations of that. It should be
> possible to read up to ...
> - the first sub-collection of elements
> - the first place a block predicate is satisfied
> - the first place a regular expression matches
> - the first place a of a set of the above conditions matches
It would not make sense to implement all of this. But what about a
#upToSatisfying: which evaluates the block for each element and stops
when it returns true?
--
Damien Cassou
More information about the Squeak-dev
mailing list
|