[Ann] Nile 0.8.0 available

Bergel, Alexandre bergel at iam.unibe.ch
Sat May 12 11:34:38 UTC 2007


Hi Damien!

Good work! Although I am not expert in this, a good way to assess the  
quality of your code is to incrementally replace some streams by  
yours. The class TextStream has some test (i.e., TextAndTextStreamTest).
Since streams are vital, this will not be an easy task.

By the way, did you point out some anomalies in the implementation  
(or design) of the Stream hierarchy ? Just a question...

Alexandre


On 11 May 2007, at 12:35, Damien Cassou wrote:

> I've just released a new version of Nile, a completely new stream
> implementation.
>
> It's available on Universe (category 'Model Extension'), SqueakMap and
> SqueakSouce (loads Nile-All from http://www.squeaksource.com/Nile).
>
> Nile already allowed you to stream over readable collections and
> writeable collections. This part has been enhanced with more tests and
> more functionalities. A diagram can be seen at:
> http://damien.cassou.free.fr/documents/internship_2007/nile/ 
> complete_hierarchy.pdf.
>
> But now, Nile is able to read from and write to files too (thanks to
> Mathieu Suen for the implementation).  A diagram is available at:
> http://damien.cassou.free.fr/documents/internship_2007/nile/ 
> fileStreams.pdf.
>
> You can also use Nile in a pipe-like way: you can chain different
> streams to obtain a bigger, more interesting stream. For example:
>
> | stream |
> stream := ReadableCollectionStream on: '123 12 142 25'.
> stream := NumberReader inputStream: stream.
> stream := SelectStream selectBlock: [:each | each even]  
> inputStream: stream.
>
> stream peek.      ==> 12
> stream next.      ==> 12
> stream atEnd.     ==> false
> stream next.      ==> 142
> stream atEnd.     ==> true
>
> This code uses three stream:
> - NSReadableCollectionStream is equivalent to ReadStream.
> - NSNumberReader is waiting for characters on its input and converts
> them to numbers. Spaces separate numbers.
> - NSSelectStream reads its input and only returns elements matching
> the selectBlock (http://wiki.cs.uiuc.edu/PatternStories/SelectStream)
>
>
> Each pipe is really easy to implement: subclass a particular class and
> implement a method and a constructor.
>
> What is your opinion about this work?
>
> -- 
> Damien Cassou
>

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.software-artist.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






More information about the Squeak-dev mailing list