Yeah, I understand. The thing is that we will remove in the near
future MultiByteFileStream.
And not all streams have conceptually a position. Today there was a mail
from Sven about that.
On Mon, Nov 13, 2017 at 2:48 PM, Prof. Andrew P. Black
wrote:
>
> > On 2 Nov 2017, at 10:10 , Guillermo Poli
> On 2 Nov 2017, at 10:10 , Guillermo Polito wrote:
>
> My first hunch is that you don't want to change PositionableStream. Because
> it works on collections and files (because of inheritance). But not on other
> kind of streams that are not part of the hierarchy, such as sockets. And we
> ar
How about #peekAhead?
- HH
> Original Message
> Subject: Re: [Pharo-users] Peeking at a stream
> Local Time: November 2, 2017 9:28 AM
> UTC Time: November 2, 2017 1:28 PM
> From: aglyn...@gmail.com
> To: Any question about pharo is welcome
>
> Pe
a code
block completes. Are there methods breaking that convention?
cheers -ben
*From: *Prof. Andrew P. Black
> *Sent: *Thursday, November 2, 2017 5:00 AM
> *To: *Any question about pharo is welcome
> *Subject: *[Pharo-users] Peeking at a stream
>
>
>
> I sometimes find
Perhaps #keepStateWhile or something similar might be better than
#unchangedDuring ?
Sent from Mail for Windows 10
From: Prof. Andrew P. Black
Sent: Thursday, November 2, 2017 5:00 AM
To: Any question about pharo is welcome
Subject: [Pharo-users] Peeking at a stream
I sometimes find, when
Hi.
In XStreams this method called #explore: .
2017-11-02 9:59 GMT+01:00 Prof. Andrew P. Black :
> I sometimes find, when working with a stream, that I need to "peek ahead”
> a few items, without disturbing the state of the stream. The message stream
> peek gives me the next item, but doesn’t ge
I use the approach you mention, restoring stream position, in my ParrotTalk
code, both in Pharo and in Java. I am not peeking more than one character but I
had to implement peek in Java and your code example is how I did this code.
- HH
On Thu, Nov 2, 2017 at 04:59, Prof. Andrew P. Black
<[bl.
Hi Andrew,
My first hunch is that you don't want to change PositionableStream. Because
it works on collections and files (because of inheritance). But not on
other kind of streams that are not part of the hierarchy, such as sockets.
And we are cleaning that part.
Instead, some time ago Sven produ
I sometimes find, when working with a stream, that I need to "peek ahead” a few
items, without disturbing the state of the stream. The message stream peek
gives me the next item, but doesn’t generalize to multiple items, So I end up
writing code like this:
findSomething
| savedPos