Pharo vs. GLASS: ReadStream

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

Pharo vs. GLASS: ReadStream

Thelliez
Another interesting one:

Runnning:

| s r |
r := 'abcde'.
s := ReadStream on: r.
s upToAll: 'bcd'.
s position


In Pharo = 4
in GLASS = 2


(I encountered that while parsing Google recaptcha results...).
Thierry
Reply | Threaded
Open this post in threaded view
|

Re: Pharo vs. GLASS: ReadStream

Dale Henrichs
#upToAll: is not up to snuff, I think that greaseUpToAll: should do the trick for you...

Dale

On Apr 17, 2011, at 10:05 AM, Thierry Thelliez wrote:

> Another interesting one:
>
> Runnning:
>
> | s r |
> r := 'abcde'.
> s := ReadStream on: r.
> s upToAll: 'bcd'.
> s position
>
>
> In Pharo = 4
> in GLASS = 2
>
>
> (I encountered that while parsing Google recaptcha results...).
> Thierry

Reply | Threaded
Open this post in threaded view
|

Re: Pharo vs. GLASS: ReadStream

Tobias Pape

Am 2011-04-17 um 19:49 schrieb Dale Henrichs:

> #upToAll: is not up to snuff, I think that greaseUpToAll: should do the trick for you...
>
> Dale
>
> On Apr 17, 2011, at 10:05 AM, Thierry Thelliez wrote:
>
>> Another interesting one:
>>
>> Runnning:
>>
>> | s r |
>> r := 'abcde'.
>> s := ReadStream on: r.

what about
s := r readStream ?

>> s upToAll: 'bcd'.
>> s position

So Long
        -Tobias

Reply | Threaded
Open this post in threaded view
|

Re: Pharo vs. GLASS: ReadStream

Thelliez
Tobias,

Thanks for the suggestion.

However the results are also interesting:

| s r |
r := 'abcde'.
s :=  r readStream.
s upToAll: 'bcd'.
s position


In Pharo = 4
In GLASS = 1  (s is an AnsiReadStream)

The greaseUpToAll suggested by Dale worked for now.
Thierry

what about
s := r readStream ?

>> s upToAll: 'bcd'.
>> s position

So Long
       -Tobias