5 ms·
It's no more odd than just 'LF'. At the end of the day, something has to represent 'end of line'. The outlier here is really MS DOS, wasting a perfectly good by
by pvg 9y ago
It's no more odd than just 'LF'. At the end of the day, something has to represent 'end of line'. The outlier here is really MS DOS, wasting a perfectly good byte on pretend-lineprinter codes.
- kevin_thibedeau 9y agoExcept that LF was also designated as NL before Apple came onto the scene. They were deliberately incompatible.
- pvg 9y agoIt was? By whom? What were they 'deliberately incompatible' with?
- mappu 9y agoUNIX, for one.
- tom_ 9y agoI wonder if this would have been a big concern for home computer vendors at the time. How many of them would have used Unix? Even if they had, would Unix even have been popular enough to really matter?
- pvg 9y agoNo.
- Lionsion 9y agoAt that time Apple chose CR, UNIX was just one of a multitude of minicomputer operating systems. Compatibility with it would have been only important in hindsight.
- carussell 9y agoYou're pulling things out of your ass. I'm interested in comments like yours. At some point between reading the previous comment and responding to it, you must have had some thought that goes, roughly, "Hey, I'm just going to make some shit up now and post it." Right? How else does it happen? Apple's is not the only ecosystem that settled on carriage return. Who do you think was around for them to deliberately break compatibility with in 1977? Kildall?
- kalleboo 9y agoYou think when Woz was designing the Apple II he was going "oh better make this incompatible with UNIX"? Just like some people will defend Apple to the death, others will desperately assign malice to literally anything they do. Funny company.
- SmellyGeekBoy 9y agoIt's the same for pretty much every company that has ever existed, try not to take it personally.
- Someone 9y agoMS-DOS isn’t alone in that. https://en.wikipedia.org/wiki/Newline#Representations_in_different_character_encoding_specifications https://en.wikipedia.org/wiki/Newline#Representations_in_dif... claims ”Atari TOS, Microsoft Windows, DOS (MS-DOS, PC DOS, etc.), DEC TOPS-10, RT-11, CP/M, MP/M, OS/2, Symbian OS, Palm OS, Amstrad CPC, and most other early non-Unix and non-IBM operating systems” used it. The real surprise is the BBC Micro, which used LF+CR.
- jandrese 9y agoDOS did it because CP/M did it. If I had to guess I'd say CP/M was developed for extra dumb teletypes that needed both to properly handle a newline. So many quirks in terminals date back to the days when everybody was just making it up as they went along. Legacy support is the root of most braindamage.
- Someone 9y agoTeletypes needed it for timing. https://en.wikipedia.org/wiki/Newline#History https://en.wikipedia.org/wiki/Newline#History: ”The separation of newline into two functions concealed the fact that the print head could not return from the far right to the beginning of the next line in one-character time. That is why the sequence was always sent with the CR first. A character printed after a CR would often print as a smudge, on-the-fly in the middle of the page, while it was still moving the carriage back to the first position.”
- tom_ 9y agoThere's an entry point in the BBC Micro's OS that's routine that prints a character, or LF+CR if the character is CR (13). This routine prints the CR second, so that when it was called with 13 originally it can fall through into the main, non-translating character print routine with 13 in the accumulator, and then return to the caller that way too. (These two routines promise to preserve the accumulator.) Saves a couple of bytes in the ROM. (There's also an entry point partway through the wrapper that just prints a newline. DRY and all that.) The code is not exactly this, but differs from it in no relevant way: .osasci \ print char, translating CR to newline cmp #13:bne oswrch .osnewl \ print newline lda #10:jsr oswrch lda #13:\fall through .oswrch \ print char without translation pha ... pla rts The Atom's ROM does the same thing, so they presumably just copied this for the BBC. After all, it doesn't really matter which order you print them.
- toomanybeersies 9y agoThe internet also uses CRLF for newlines since about 1973: https://tools.ietf.org/rfc/rfc542.txt https://tools.ietf.org/rfc/rfc542.txt So historically speaking, MS DOS is doing the right thing.
- pvg 9y ago1971, really - https://tools.ietf.org/html/rfc158 https://tools.ietf.org/html/rfc158 In 1973, the 'internet' was yay big: https://twitter.com/workergnome/status/807704855276122114/photo/1 https://twitter.com/workergnome/status/807704855276122114/ph... Apple sold more Apple I's than that in its first few months of existence.
- toomanybeersies 9y agoAhh, you're correct. I wasn't sure if CRLF was actually codified in rfc158, I just did a search for "CRLF" on it, I didn't realise they were using the hex values of CR and LF (X'0D' X'0A'). The internet is now 8 or 9 million devices big, and CRLF is still the standard newline for internet protocols.
- petee 9y agoA lone CR is certainly more odd than a LF...LF is implicitly a new line. CR by definition is a return to the beginning of the line; literally NOT the end of the line! Who would choose 'beginning of line' to mean 'end of line'?? Oh, Apple :)
- pvg 9y agoThere's nothing more 'implicitly new line' about either, in a text file. But if you're particularly set on hardware analogies - there's a 'return' key on keyboards and no 'line feed' one.
- petee 9y agoUmm, there absolutely is, unless you want to start using the backspace character instead of line feed or any other arbitrary swap, or maybe 'null', or 'delete'; Sure, 'null' should mean new line... 'Line Feed' by words, use and history, means new line....it feeds lines...i don't understand how you could make such an argument. The fact that some keyboards say 'return' (but usually have a down-and-to-the-left graphic) is a separate issue, now that we are talking actual hardware; The lack of need for a specific CR, LF keys is obvious. Once again, of course today apple is using the odd choice of 'return', despite the rest of the industry. Many (most?) of 70s onward keyboards had an 'enter' key, no?
- petee 9y agoI'm sorry, I should have written "whatever apple says is the only logical conclusion" to appease the fan boys lol. Forget English language, or standard bodies...fake news :P