4 ms·
> Microsoft reportedly wanted to use the forward slash as path separator, but IBM nixed the idea because it would have created an incompatibility with DOS 1.x,
by naikrovek 3y ago
> Microsoft reportedly wanted to use the forward slash as path separator, but IBM nixed the idea because it would have created an incompatibility with DOS 1.x, which already used the forward slash as a switch character, separating command options.
It isn’t a poor engineering decision, that guy just didn’t read the decision criteria.
Also, according to spec, CRLF is the proper sequence for a newline, and both Unix and MacOS chose incorrectly.
- Alupis 3y agoWhich spec would that be? It's not the ISO spec, nor POSIX. CRLF existed originally because of mechanical typerwriters required two separate actions - Carriage Return (move the carriage back to the start of the line), Line Feed (advance the page to the next line). CR is a waste for computing... it literally does nothing beneficial. Someone should figure out the climate impact of decades of wasted processing of CR characters... that might motivate people to fix this as well.
- naikrovek 3y ago> Someone should figure out the climate impact of decades of wasted processing of CR characters... that might motivate people to fix this as well. LF vs CRLF is a single molecule of water compared to the seven seas of waste created by Electron apps or even just JavaScript itself. Todays developers are lazy as FUCK and there is no pressure for them to stop being lazy. See: https://tonsky.me/blog/js-bloat/ https://tonsky.me/blog/js-bloat/ > CR is a waste for computing... it literally does nothing beneficial. When “LF” means “line feed and carriage return” both, as it does thanks to UNIX, yes. On teletype machines “line feed” meant “line feed” and “carriage return” meant “carriage return”. You need both. Today we use an LF which means both “CR” and “LF” and we act like CR is the problem, when it was us choosing a single byte to mean two separate things joined together. Even as a kid in school in typing class, I used a typewriter with a parallel port (probably serial, really, because you could use the keyboard without putting text on paper), and it could be used to print text sent to it. CR and LF had very different meanings on that typewriter. I wish I remembered what make and model it was…
- deleted 3y ago[deleted]
- tracker1 3y agoIt's not the same in many terminals... I also think lack of Vertical tabs on keyboards is sometimes a shortcoming.
- Const-me 3y ago> CR is a waste for computing... it literally does nothing beneficial CR enables to update a line of text. Print some text without newline at the end, print CR, print another line, and the old text will be overwritten with the new one. Some command-line apps are using the trick to print progress bars, progress percentage, or similar. This is very beneficial.
- Alupis 3y agoThis is almost always implemented using direct placement of the cursor, not via a literal CR char/command. CR is literally useless, except for being artificially required in some windows text editors.
- Const-me 3y agoCursor placement is hard to do portably because every OS has incompatible ways for that. You gonna need SetConsoleCursorPosition on Windows, and multiple versions of these terminal escape codes on Linux. printf( "\rsomething " ) is much easier.
- skissane 3y ago> Which spec would that be? It's not the ISO spec, nor POSIX. RFC3676, RFC2045, among others. CRLF is the Internet standard newline
- naikrovek 3y agothank you. I was about to look, but saw this.
- Alupis 3y agoWhich explains it's use in operating systems how exactly?
- skissane 3y agoHow did it become the Internet standard? Because at the time it was adopted as the Internet standard the majority of operating systems used it. Probably the biggest influence on both the Internet standard and Microsoft was DEC. And actually, it is used by Unix too, in the TTY layer: Unix by default translates LF to CRLF on output - and that translation is in the POSIX standard. So the claim that CRLF isn’t in POSIX is false