[ANN] Slowly testing Nile in the image

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] Slowly testing Nile in the image

Damien Cassou-3
Hi,

I've started replacing the Stream hierarchy by Nile, a complete
reimplementation based on traits.

The process I'm following is:

1) change SequenceableCollection>>readStream from:

readStream
  ^ ReadStream on: self

to:

SequenceableCollection>>readStream
  ^ self nsReadStream

#nsReadStream returns a Nile stream.


2) then, rewrite all methods which contain

... ReadStream on: @Expression...

to

... @Expression readStream...

To do this, I use ParseTreeRewriter.


I have already changed Kernel, KernelTests, Collections,
CollectionTests. All the tests passes.

--
Damien Cassou

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Slowly testing Nile in the image

stephane ducasse
Damien

could you identify what is not available in Nile to perform such change?
I guess that the fileout and other friends can have a problem.
Each time I look at FileStream and others I think how nice is Nile.
Stef


On 27 juil. 07, at 14:44, Damien Cassou wrote:

> Hi,
>
> I've started replacing the Stream hierarchy by Nile, a complete
> reimplementation based on traits.
>
> The process I'm following is:
>
> 1) change SequenceableCollection>>readStream from:
>
> readStream
>   ^ ReadStream on: self
>
> to:
>
> SequenceableCollection>>readStream
>   ^ self nsReadStream
>
> #nsReadStream returns a Nile stream.
>
>
> 2) then, rewrite all methods which contain
>
> ... ReadStream on: @Expression...
>
> to
>
> ... @Expression readStream...
>
> To do this, I use ParseTreeRewriter.
>
>
> I have already changed Kernel, KernelTests, Collections,
> CollectionTests. All the tests passes.
>
> --
> Damien Cassou
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Slowly testing Nile in the image

Damien Cassou-3
Hi Stéphane,

2007/7/27, stephane ducasse <[hidden email]>:
> could you identify what is not available in Nile to perform such change?


This is why I slowly replace by Nile. It helps me identify what is
missing in Nile. I've already implemented some missing methods.

The only incompatibility I have found is #back:

((ReadStream on: 'abc') next: 2; yourself) back.       => $a.

((NSReadableCollectionStream on: 'abc') next: 2; yourself) back.      => $b


I don't want to follow the Squeak version here. For Squeak, there is a
current element, a previous element and a future element. In all the
documents I read, the position is always between 2 elements, so, there
is no current element.

--
Damien Cassou