Ben,On Fri, Apr 28, 2017 at 6:16 AM, Eliot Miranda <eliot.miranda@gmail.com> wrote:On Thu, Apr 27, 2017 at 2:38 PM, Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com > wrote:The LF are displayed correctly in Squeak/Pharo and we can use nextLine in replacement of upTo: Character cr, so I fail to see the problem of LF.Hi Eliot,it's not about my favourite editor, it's about the universally available one:
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/57c 9ef837f7b0914351c4836734d1df3c 880c288
Could you explain?It's ok. I give up. This is another example of the tail wagging the dog, which gets on my nerves. But getting them to fix their interface is way more difficult than us accommodating their limitations so go ahead.Its not github! When looking into Sophie's issue, opening those ST scripts were unreadablewhen opened in `vi` . It was a pain that I had to break context to hunt for a GUI text app to read them
It's a three liner to wrap vi in a script that converts from CR to LF, invokes vi and then concerts back. Is it really that problematic?
On Fri, Apr 28, 2017 at 09:39:28AM +0200, Tobias Pape wrote:
>
> (in .vimrc)
>
> set fileformats=unix,mac,dos
Tobias,
Thank you! I can't believe I have gone so many years without ever knowing
about this simple editor setting.
Dave
CR-only line endings are sooooooo last century, for machines like: Commodore 8-bit machines, Acorn BBC, ZX Spectrum, TRS-80, Apple II family, Oberon, the classic Mac OS up to version 9, MIT Lisp Machine and OS-9 [1]. These dogs died a long time ago ;)Is there something particularly Smalltalk related I'm not aware of that makes CR-only line endings preferable?
Ben,There's no need to have three ways to do the same thing, line ending.
So Smalltalk has chosen one and stick to it. it was CR.
Thus you will see a message #cr used everywhere in the code base (either sent to Character or to a WriteStream to write an end of line).
Also, carriage return is used thru a CR variable in TextConstants pool dictionary.The wisdom was that connections to/from outside world (external streams like files/sockets...) should do the conversion in/out the Smalltalk space.But this has been inequally applied, especially in Squeak/Pharo where the zoo of Stream is not so well engineered (it's a mess!).Since the boundary was messy, I've taken the responsibility to introduce the complexity inside the code base by:- changing display of LF and adding hacks to display a single end of line in case of CR-LF pair- introduce nextLine et a few other methods to deal with the zoo of line endingsI'm still not completely sure that it was a good idea... Maybe
If we want to change our conventions to be more fashioned, we must get rid of cr message in the code base and replace it with something like eol (end of line).
Cuis has changed the CR to LF inside the image.