Something is off (and/or I am getting crazy, probably both). $ ./pharo --headless Pharo.image eval '(FileStream stdin binary; next: 3)' 123 #[49] ?? This should return #[49 50 51] AFAIK.
On 11 Apr 2018, at 18:26, Alistair Grant <akgrant0710@gmail.com> wrote:
Hi Sven,
On 11 April 2018 at 17:33, Sven Van Caekenberghe <sven@stfx.eu> wrote:
I think we have to reset this whole discussion.
FileStream stdin
and
Stdio stdin
are completely different !
We'll have to check that first, before talking about the issues raised in this thread.
Are you sure you're comparing (roughly) equal things?
I would compare:
FileStream stdin
(very roughly) to:
ZnCharacterReadStream on: (ZnBufferedReadStream on: Stdio stdin).
Actually it is still not a fair comparison because MultiByteFileStream attempts to be writable as well. If you could notionally do:
FileStream stdin readOnly; binary; unbuffered; yourself.
you could compare FileStream and Stdio :-)
One important similarity: At the bottom they both use the same set of primitives to communicate with the OS stdio streams (FilePlugin).
HTH, Alistair
And BTW these terminal streams are a real pain to test ;-)