Re: [Pharo-users] Pharo 7 file streams guideline

2018-08-11 Thread Sven Van Caekenberghe
> On 31 Jul 2018, at 18:28, Damien Pollet wrote: > > Hi Sven… a couple questions: Very interesting questions, Damien. > - is there a preferred order of composition between the encoding and > buffering streams ? If yes, it the same for read and write stream, or > reversed ? > E.g. if Stdio

Re: [Pharo-users] Pharo 7 file streams guideline

2018-08-07 Thread Henrik Sperre Johansen
Guillermo Polito wrote > On Tue, Jul 31, 2018 at 6:29 PM Damien Pollet < > damien.pollet+pharo@ > > > wrote: > >> Hi Sven… a couple questions: >> >> - is there a preferred order of composition between the encoding and >> buffering streams ? If yes, it the same for read and write stream, or >> re

Re: [Pharo-users] Pharo 7 file streams guideline

2018-08-01 Thread Guillermo Polito
On Wed, Aug 1, 2018 at 11:19 AM Guillermo Polito wrote: > > > On Tue, Jul 31, 2018 at 6:41 PM Damien Pollet < > damien.pollet+ph...@gmail.com> wrote: > >> On Tue, 31 Jul 2018 at 18:28, Damien Pollet < >> damien.pollet+ph...@gmail.com> wrote: >> >>> Hi Sven… a couple questions: >>> >> >> For conte

Re: [Pharo-users] Pharo 7 file streams guideline

2018-08-01 Thread Guillermo Polito
On Tue, Jul 31, 2018 at 6:41 PM Damien Pollet wrote: > On Tue, 31 Jul 2018 at 18:28, Damien Pollet > wrote: > >> Hi Sven… a couple questions: >> > > For context, I'm considering options in Clap, for providing accessors to > Stdio that: > - are convenient in most cases > - discourage users from e

Re: [Pharo-users] Pharo 7 file streams guideline

2018-08-01 Thread Guillermo Polito
On Tue, Jul 31, 2018 at 6:29 PM Damien Pollet wrote: > Hi Sven… a couple questions: > > - is there a preferred order of composition between the encoding and > buffering streams ? If yes, it the same for read and write stream, or > reversed ? > E.g. if Stdio binaryStdin was implemented, Stdio stdi

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-31 Thread Damien Pollet
On Tue, 31 Jul 2018 at 18:28, Damien Pollet wrote: > Hi Sven… a couple questions: > For context, I'm considering options in Clap, for providing accessors to Stdio that: - are convenient in most cases - discourage users from explicitly referencing the Stdio global (so that one can inject other st

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-31 Thread Damien Pollet
Hi Sven… a couple questions: - is there a preferred order of composition between the encoding and buffering streams ? If yes, it the same for read and write stream, or reversed ? E.g. if Stdio binaryStdin was implemented, Stdio stdin should be decoded, but buffering it as well would be a problem f

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-26 Thread Norbert Hartl
> Am 26.07.2018 um 17:59 schrieb Sven Van Caekenberghe : > > Richard, > > I am only engaging in a discussion with you in order to explain what we did > and why. The changes that we did were years in the making and are now being > pushed into the system. The discussions happened long ago, we

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-26 Thread Sven Van Caekenberghe
Richard, I am only engaging in a discussion with you in order to explain what we did and why. The changes that we did were years in the making and are now being pushed into the system. The discussions happened long ago, we are not going to revert them. Of course you are entitled to have your o

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-26 Thread Richard O'Keefe
Yes there was no mention of BOMs, but there *was* mention of #position, and the presence or absence of byte order marks makes a difference. As for mailing list discussions over a year, that is not the kind of single coherent source I was hoping for. As someone *using* the system classes, I don't

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-25 Thread David T. Lewis
On Wed, Jul 25, 2018 at 02:20:30PM +0200, Damien Pollet wrote: > On Wed, 25 Jul 2018 at 13:48, Sven Van Caekenberghe wrote: > > > > On 25 Jul 2018, at 13:39, Damien Pollet > > wrote: > > > Related issue: command line arguments come from VM system attributes as > > ByteStrings??? and thus interpr

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-25 Thread Damien Pollet
On Wed, 25 Jul 2018 at 13:48, Sven Van Caekenberghe wrote: > > On 25 Jul 2018, at 13:39, Damien Pollet > wrote: > > Related issue: command line arguments come from VM system attributes as > ByteStrings… and thus interpreted as iso-8859-1, which is incorrect in most > cases nowadays, even though

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-25 Thread Sven Van Caekenberghe
> On 25 Jul 2018, at 13:39, Damien Pollet wrote: > > On Tue, 24 Jul 2018 at 11:39, Alistair Grant wrote: > > On 23 Jul 2018, at 12:07, Sven Van Caekenberghe wrote: > So, > > Stdio stdout > > should return return a character write stream with UTF-8 encoding while > > Stdio binaryStdout

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-25 Thread Damien Pollet
On Tue, 24 Jul 2018 at 11:39, Alistair Grant wrote: > > On 23 Jul 2018, at 12:07, Sven Van Caekenberghe wrote: >> So, >> >> Stdio stdout >> >> should return return a character write stream with UTF-8 encoding while >> >> Stdio binaryStdout >> >> should be the lower level binary one. >> This

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-24 Thread Alistair Grant
On Tue., 24 Jul. 2018, 10:13 Sven Van Caekenberghe, wrote: > > > > On 23 Jul 2018, at 12:07, Sven Van Caekenberghe wrote: > > > > Stdio stdout and friends just return a binary stream, hence they need > wrapping for encoding. > > > > Maybe > > > > Stdio stdoutAsText > > > > might be an idea, but

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-24 Thread Sven Van Caekenberghe
> On 23 Jul 2018, at 12:07, Sven Van Caekenberghe wrote: > > Stdio stdout and friends just return a binary stream, hence they need > wrapping for encoding. > > Maybe > > Stdio stdoutAsText > > might be an idea, but this is so uncommon that I am not sure this is a good > idea. Given all

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-23 Thread David T. Lewis
On Mon, Jul 23, 2018 at 07:38:16PM +0100, Denis Kudriashov wrote: > Hi. > > I wonder does not stdout and stdin are always about text input/output? No. Consider the case of reading and writing serialized objects on stdin and stdout, possibly between two images sending serialized objects to one ano

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-23 Thread Ben Coman
On 24 July 2018 at 02:38, Denis Kudriashov wrote: > > 2018-07-23 19:19 GMT+01:00 Alistair Grant : >> >> Hi Pavel & Sven, >> >> Thanks for writing this, it is a great quick reference. >> >> >> On Mon, 23 Jul 2018 at 12:08, Sven Van Caekenberghe wrote: >> > >> > >> > >> > > On 23 Jul 2018, at 11:13

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-23 Thread Denis Kudriashov
Hi. I wonder does not stdout and stdin are always about text input/output? I never saw examples when somebody explicitly write raw bytes into these streams. If I am right then it is better to introduce binaryStdout and binaryStdin messages. And make stdout and stdin use most common encoding by de

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-23 Thread Alistair Grant
Hi Pavel & Sven, Thanks for writing this, it is a great quick reference. On Mon, 23 Jul 2018 at 12:08, Sven Van Caekenberghe wrote: > > > > > On 23 Jul 2018, at 11:13, Ben Coman wrote: > > > > I like all the new code examples until "Write a UTF-8 text to STDOUT" > > and I wonder "Stdio stdout

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-23 Thread Sven Van Caekenberghe
> On 23 Jul 2018, at 18:52, Richard O'Keefe wrote: > > Oh, I think a clarification is needed when talking about UTF-8. Why ? > To the best of my knowledge you don't need a Byte-Order-Mark at > the beginning of a UTF-8 stream because there is no byte order > issue to result, Nothing was said

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-23 Thread Richard O'Keefe
I am a little confused by Filestreams.MD #position and #position: report and set the number of past items. So when you open a stream, #position is 0. So why does the first "Positionable streams" example use ... position: 4 ... while the second one skips 3 characters? ... position: 3 ... would be

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-23 Thread Sven Van Caekenberghe
> On 23 Jul 2018, at 09:38, Pavel Krivanek wrote: > > Hello, > > I've prepared a draft of a short document that should help you with the > transition to the "new" file streams API in Pharo 7. > > https://github.com/pavel-krivanek/pharoMaterials/blob/master/Filestreams.MD > > Pull requests

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-23 Thread Sven Van Caekenberghe
> On 23 Jul 2018, at 11:13, Ben Coman wrote: > > On 23 July 2018 at 15:38, Pavel Krivanek wrote: >> Hello, >> >> I've prepared a draft of a short document that should help you with the >> transition to the "new" file streams API in Pharo 7. >> >> https://github.com/pavel-krivanek/pharoMater

Re: [Pharo-users] Pharo 7 file streams guideline

2018-07-23 Thread Ben Coman
On 23 July 2018 at 15:38, Pavel Krivanek wrote: > Hello, > > I've prepared a draft of a short document that should help you with the > transition to the "new" file streams API in Pharo 7. > > https://github.com/pavel-krivanek/pharoMaterials/blob/master/Filestreams.MD > > Pull requests are welcome.

[Pharo-users] Pharo 7 file streams guideline

2018-07-23 Thread Pavel Krivanek
Hello, I've prepared a draft of a short document that should help you with the transition to the "new" file streams API in Pharo 7. https://github.com/pavel-krivanek/pharoMaterials/blob/master/Filestreams.MD Pull requests are welcome. Cheers, -- Pavel