On 06/08/17 15:25, Peter Uhnak wrote:
Hi,
that's why one of the proposals was to configure the stream to either use
always specific line endings
stream beForWindows.
stream newLine. "outputs CRLF irrespective of where the image is currently
running"
and
stream beForCurrentPlatform.
stream
Hi Guille
I agree with you :).
Stef
On Sun, Aug 6, 2017 at 11:05 AM, Guillermo Polito wrote:
>
>
> On Sun, Aug 6, 2017 at 10:54 AM, Stephane Ducasse > wrote:
>
>> Agreed :)
>>
>> But so far what do we do?
>>
>>
>> - #cr and #lf just put
Hi,
that's why one of the proposals was to configure the stream to either use
always specific line endings
stream beForWindows.
stream newLine. "outputs CRLF irrespective of where the image is currently
running"
and
stream beForCurrentPlatform.
stream newLine. "returns whatever it is
On Sun, Aug 6, 2017 at 11:47 AM, Thierry Goubier
wrote:
> Hi Stef, all,
>
> I'd like to point out that, during the life of an image (prepared on
> windows, then used on Linux, then on Mac), the meaning of a new line
> changes -> should then all 'newLines' done on
Hi Stef, all,
I'd like to point out that, during the life of an image (prepared on
windows, then used on Linux, then on Mac), the meaning of a new line
changes -> should then all 'newLines' done on streams while on windows
be changed when the image restart on Linux?
My take would be:
- Set
On Sun, Aug 6, 2017 at 10:54 AM, Stephane Ducasse
wrote:
> Agreed :)
>
> But so far what do we do?
>
>
> - #cr and #lf just put this character in the stream.
>
yes. I would even be a bit more agressive. Streams work on any collection,
not only on strings (that's why I
Agreed :)
But so far what do we do?
- #cr and #lf just put this character in the stream.
- #newLine put the underlying OS line ending.
Then we should revisit all the cr inside the system and use newline.
Then we should think about the internal usage of cr by default in
Pharo (We should change
> On 6 Aug 2017, at 08:59, Guillermo Polito wrote:
>
> Can somebody propose an implementation besides on top of this discussion? I
> propose such an implementation should take the form of a stream decorator
> instead of changing the base implementation.
YES, a
Can somebody propose an implementation besides on top of this discussion? I
propose such an implementation should take the form of a stream decorator
instead of changing the base implementation.
Guille
On Sun, Aug 6, 2017 at 12:01 AM, Peter Uhnak wrote:
> Hi,
>
> just to
Hi,
just to (hopefully) clarify my intention, maybe pseudocode would describe my
thoughts better.
Stream>>beForWindows
"Use consistenly Windows line endings (CRLF) in the stream"
self convertLineEndings: true
lineEnding := String crlf
Stream>>convertLineEndings:
Hi all,
First, we should not confuse "writing into a stream" with "writing into a
text file". Not all streams are to write into a text file. This means that
we cannot pretend that the basic stream implementation should always do a
conversion. I think that should belong to a text writer, also
Hi Stef,
On 5 August 2017 at 18:14, Stephane Ducasse wrote:
> So one step at a time:
>
> - #cr and #lf just put this character in the stream.
> - #newLine put the underlying OS line ending. ( and sorry for the
> nostalgic but nl sucks and to me this is netherlands and
:)
Me too.
Stef
On Sat, Aug 5, 2017 at 6:32 PM, Cyril Ferlicot wrote:
> On Sat, Aug 5, 2017 at 6:14 PM, Stephane Ducasse
> wrote:
>> So one step at a time:
>>
>> - #cr and #lf just put this character in the stream.
>> - #newLine put the
On Sat, Aug 5, 2017 at 6:14 PM, Stephane Ducasse
wrote:
> So one step at a time:
>
> - #cr and #lf just put this character in the stream.
> - #newLine put the underlying OS line ending. ( and sorry for the
> nostalgic but nl sucks and to me this is netherlands and not
So one step at a time:
- #cr and #lf just put this character in the stream.
- #newLine put the underlying OS line ending. ( and sorry for the
nostalgic but nl sucks and to me this is netherlands and not newline
:).
Then we should revisit all the cr inside the system and use newline.
Then we
On Friday 04 August 2017 07:11 PM, Damien Pollet wrote:
Stream >> newLineFor: platform
self nextPutAll: platform lineEnding
EOL encoding is a property of a text file and not a platform. While
files created on a certain proprietary platforms ;-) may use an encoding
that does not make it
+1
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> On Aug 4, 2017, at 8:19 AM, Esteban Lorenzano wrote:
>
> sometimes you actually want to write a cr (or a lf). So it needs to
Hi Esteban,
On Sat, Aug 05, 2017 at 11:30:58AM +0200, Esteban Lorenzano wrote:
>
> > On 5 Aug 2017, at 11:17, Peter Uhnak wrote:
> >
> >> I think there is a consensus we need to keep #cr and #lf as intended
> >
> > Is there?
> >
> > My argument was that there's no
> On 5 Aug 2017, at 11:17, Peter Uhnak wrote:
>
>> I think there is a consensus we need to keep #cr and #lf as intended
>
> Is there?
>
> My argument was that there's no (obvious) reason to combine different line
> endings in the same document. Therefore if you were to use
> I think there is a consensus we need to keep #cr and #lf as intended
Is there?
My argument was that there's no (obvious) reason to combine different line
endings in the same document. Therefore if you were to use #cr, #lf, #crlf, you
would actually mean that you just want to enter newline.
> On 5 Aug 2017, at 11:14, Alistair Grant wrote:
>
> On Sat, Aug 05, 2017 at 11:09:51AM +0200, Esteban Lorenzano wrote:
>>
>>> On 5 Aug 2017, at 11:06, Alistair Grant wrote:
>>>
>>> On Sat, Aug 05, 2017 at 10:49:02AM +0200, Esteban Lorenzano
On Sat, Aug 05, 2017 at 11:09:51AM +0200, Esteban Lorenzano wrote:
>
> > On 5 Aug 2017, at 11:06, Alistair Grant wrote:
> >
> > On Sat, Aug 05, 2017 at 10:49:02AM +0200, Esteban Lorenzano wrote:
> >> I think there is a consensus we need to keep #cr and #lf as intended,
>
> On 5 Aug 2017, at 11:06, Alistair Grant wrote:
>
> On Sat, Aug 05, 2017 at 10:49:02AM +0200, Esteban Lorenzano wrote:
>> I think there is a consensus we need to keep #cr and #lf as intended,
>> yet to add some kind of #newLine (which btw is different to EOL :P)
>>
On Sat, Aug 05, 2017 at 10:49:02AM +0200, Esteban Lorenzano wrote:
> I think there is a consensus we need to keep #cr and #lf as intended,
> yet to add some kind of #newLine (which btw is different to EOL :P)
> vocabulary, isn???t?
>
> In this, I favour Peter approach for define line ending
I think there is a consensus we need to keep #cr and #lf as intended, yet to
add some kind of #newLine (which btw is different to EOL :P) vocabulary, isn’t?
In this, I favour Peter approach for define line ending convention (the way
#newLine will work)… and of course by default it should use
+1.
We need a basic representation of those characters. Logical ones should be
derived from the simple ones.
Doru
> On Aug 4, 2017, at 3:44 PM, Esteban Lorenzano wrote:
>
>
>> On 4 Aug 2017, at 15:41, Damien Pollet wrote:
>>
>> I agree with
On 4 August 2017 at 18:52, Peter Uhnak wrote:
> On Fri, Aug 04, 2017 at 03:41:05PM +0200, Damien Pollet wrote:
>
> > Stream >> newLineForWindows "convenience for the most common platforms
> > Stream >> newLineForUnix
> > Stream >> newLineForHistoricReasons
>
> Practically
I vote for:
#cr and #lf just put this character in the stream.
#newLine put the underlying OS line ending.
This is consisten also with String>>expandMacrosWithArguments:
-> cr
-> lf
-> OSPlatform current lineEnding
On Fri, Aug 4, 2017 at 7:03 AM, Stephane Ducasse
On Fri, 2017-08-04 at 14:06 +0200, Stephane Ducasse wrote:
> Well. This is not implemented like that in Pharo.
>
> cr is bad because it does not mean that it is independent of the
> platform.
> So cr can be redefined as newLine and keep but not used inside the
> system.
Yes, that's exactly what
On Fri, Aug 04, 2017 at 03:41:05PM +0200, Damien Pollet wrote:
> Stream >> newLineForWindows "convenience for the most common platforms
> Stream >> newLineForUnix
> Stream >> newLineForHistoricReasons
Practically speaking this looks insanely wordy. In 102% (est.) you want to use
the same
Yes :)
On Fri, Aug 4, 2017 at 2:25 PM, teso...@gmail.com wrote:
> To me it is clear that cr and lf should be in streams. But they should put
> the 'cr' or 'lf' character only. And of course the platform independent
> newline should be also.
>
> The first (cr, lf) should be
> On 4 Aug 2017, at 15:41, Damien Pollet wrote:
>
> I agree with Pablo, #cr and #lf should not be clever and just be names for
> the carriage return and linefeed characters/codepoints.
+1
>
> Making #newLine's behavior dependent on the current platform disturbs me,
I agree with Pablo, #cr and #lf should not be clever and just be names for
the carriage return and linefeed characters/codepoints.
Making #newLine's behavior dependent on the current platform disturbs me,
though. I'd rather have:
Stream >> newLineFor: platform
self nextPutAll: platform
or eol
On Fri, Aug 4, 2017 at 9:19 AM, Esteban Lorenzano
wrote:
>
> > On 4 Aug 2017, at 14:06, Stephane Ducasse
> wrote:
> >
> > Well. This is not implemented like that in Pharo.
> >
> > cr is bad because it does not mean that it is independent of
To me it is clear that cr and lf should be in streams. But they should put
the 'cr' or 'lf' character only. And of course the platform independent
newline should be also.
The first (cr, lf) should be used by the code wanting to have absolute
control of what is in the stream. The later (newline)
> On 4 Aug 2017, at 14:06, Stephane Ducasse wrote:
>
> Well. This is not implemented like that in Pharo.
>
> cr is bad because it does not mean that it is independent of the platform.
> So cr can be redefined as newLine and keep but not used inside the system.
Well. This is not implemented like that in Pharo.
cr is bad because it does not mean that it is independent of the platform.
So cr can be redefined as newLine and keep but not used inside the system.
Stef
On Fri, Aug 4, 2017 at 12:50 PM, Jan Vrany wrote:
> On Fri,
But the question is: what does cr do?
- Does it write a platform independent newLine?
- Or does it write a (platform dependent) cr ascii character?
http://www.theasciicode.com.ar/ascii-control-characters/carriage-return-ascii-code-13.html
On Fri, Aug 4, 2017 at 12:50 PM, Jan Vrany
On Fri, 2017-08-04 at 12:03 +0200, Stephane Ducasse wrote:
> Hi guys
>
> While writing pillar code, I ended up using "stream cr" and it
> worries
> me to still expand usage
> of a pattern I would like to remove.
>
> Let us imagine that we would like to prepare the migration from cr.
> I was
Hi guys
While writing pillar code, I ended up using "stream cr" and it worries
me to still expand usage
of a pattern I would like to remove.
Let us imagine that we would like to prepare the migration from cr.
I was thinking that we could replace cr invocation by newLine so that
after newLine
40 matches
Mail list logo