Re:CRLF is obsolete and should be abolished
by nunobrito on Sunday October 13, 2024 @06:12PM
(#41832157)
I won't mention telnet because you don't use it, but in CSV and similar data it is quite a trouble to normalize the data. So instead of 2 possibilities now we 3 to detect.
[ Parent
| on HN ]
Re:CRLF is obsolete and should be abolished
by viraptor on Sunday October 13, 2024 @07:10PM
(#41832567)
I don't get the CSV part. You can emit a new row after a line ending and on EOF with non-empty buffer. What's the tricky part or third option here? The crlf is never a part of the data.
Re:CRLF is obsolete and should be abolished
by nightpool on Sunday October 13, 2024 @07:03PM
(#41832526)
I have never had any issues with this using a standards compliant CSV parser.
Re:CRLF is obsolete and should be abolished
by nunobrito on Tuesday October 15, 2024 @12:48PM
(#41850490)
Absolutely correct: You never had issues. Other people have built other software that does not use modern CSV libraries. They work just fine today and don't need to update, wouldn't even be possible for most cases in either case.
Please do consider that many software products will not change and they will still be actively used on production environments that you will never have interest about.
Re:CRLF is obsolete and should be abolished
by nightpool on Tuesday October 15, 2024 @03:27PM
(#41852209)
Well, GP proposed removing the idea of trailing newlines from standard *nix tools entirely, so I think it's fair to ask what shop is going to update their RHEL deployment to upgrade to a version of `cat` or `sed` that doesn't have trailing newlines but can't spend 5 minutes to handle a newline properly in their CSV parser? That doesn't make a lot of sense.
And it was pretty clear from the context of norir's comment that they were not talking about legacy software, they were talking about writing new projects/file formats that used newlines as a separator. Just because you want to shoehorn your legacy projects into this discussion doesn't mean that they fit.