[Cuis-dev] Replace Pharo newline char on filein
juan at jvuletich.org
Mon Jul 29 10:04:17 PDT 2019
On 7/29/2019 1:02 PM, Máximo Prieto wrote:
> Hi, Juan. I didn't know the story but I suspected it. It never made
> sense to me to have different standards for fileOuts.
Well, I agree, but it is broader than just fileOuts. To me it doesn't
make sense to have different line ending conventions at all.
In the old days, OSes had various line ending conventions:
https://en.wikipedia.org/wiki/Newline . When Smalltalk-80 was built it
made perfect sense to choose cr as the line end. Later MacOS also chose
it. Unix had already chosen lf. CP/M and later DOS and Windows, chose crLf.
Much later, in 2001, Mac OS X started using lf on Mac. After that
moment, to keep using cr is asking for problems on _any_ platform.
Another thing that happened is that Windows programs started to handle
lf reasonably. Last year, Microsoft finally fixed Notepad:
As an argument against automatic line ending conversions, also consider
that it requires the program to know whether a file (or network stream)
is text or not, as it would break any executable or jpg, etc. It is
better not to do it, and stick to _some_ convention. On the convention
of using lf for code stored in GitHub, see
Also take into account that GitHub considers changing the line ending of
a file as a diff.
I think lf is the most reasonable convention today, and I made Cuis use
it many years ago, before Cuis had wide adoption, so it was a hindrance
for few people.
> Quoting you: "Besides, isn't it time for Pharo to drop cr as the line
> ending?" Stop quoting. How do we make that happens?
1) be an active member of the Pharo community
2) try to convince others
3) be ready to lead the technical effort to make it happen
> El lun., 29 jul. 2019 a las 12:49, Juan Vuletich via Cuis-dev
> (<cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>>) escribió:
> On 7/26/2019 6:24 PM, Gastón Caruso via Cuis-dev wrote:
>> Hi all! With Facu we've done a changeset to replace all the new
>> line characters used by Pharo by the ones Cuis uses when we
>> perform a File in.
>> Let us know what do you think!
> Hi Folks,
> In general, I don't like tools modifying files without me asking.
> In Cuis lf, cr, and crLf are shown in a clearly distinct way. If
> the user wants to convert a file, the user can select it in the
> File List, and do cmd-a (select all) shift-cmd-u (convert to Cuis
> line ending) and cmd-s (save). I think it is convenient enough,
> and there's no risk the user not knowing the file is being modified.
> Besides, isn't it time for Pharo to drop cr as the line ending?
> The ony mainstream platform using it was MacOS something like 20
> years ago...
> Juan Vuletich
> www.cuis-smalltalk.org <http://www.cuis-smalltalk.org>
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Cuis-dev