3 ms·
There's no need for conspiracy theories about adding delays. CR and LF were just separate functions and it's useful for them to be separate. CRT terminals (or e
by wrs 5y ago
There's no need for conspiracy theories about adding delays. CR and LF were just separate functions and it's useful for them to be separate. CRT terminals (or emulations thereof) still work the same way. You have to send CR and LF to a VT100 to get the cursor to both move to the left margin and then go to the next line down.
The Unix stty command lets you set cr0/1/2/3 modes for inserting NUL characters after a CR for exactly this reason, to give the carriage time to return on your printing terminal.
- blihp 5y agoNot just terminals: most printers until the mid-80's or so also cared about the distinction for the same reason. They started adding DIP switches allowing you change the default behavior and by the end of the 80's the need for CR+LF was pretty much a thing of the past. While the original reason for this distinction probably did date back to teletypes, some practical use cases evolved out of the capability. IIRC, some word processors used the ability to provide an overstrike mode before bold was a thing most printers could do. ASCII art photos were also a thing both for printers that didn't support a graphics mode as well as providing a way of printing a larger 'image' on the paper faster while also using less (ribbon) ink.
- romwell 5y agoThe distinction goes back to typewriters. The author mentions that the typewriters had a return lever that could also do a line feed. What they missed is that: * You could still freely move the carriage without advancing the paper if you wanted: there was a carriage release button; * You could also advance paper manually at any time, while keeping the carriage at its current position; * You could often adjust line spacing, including setting it to 0, which means that the big lever would only return the carriage, but not advance the paper. In short, CR and LF were separate useful functions on a typewriter. The backspace key was useful for the same reason; obviously, it wouldn't erase text - it would move the carriage just like the space bar would, but in opposite direction. These were necessary for: * Underlining text (by overtyping the underscore character over lines of text); * Adding accents, or crossing zeros with overtyping; * Bold text by retyping the same line; Etc. Tab stops in your favorite document editor come from the same era: the "Tab" key would release the carriage, and the spring would pull it forward until the next physical stop (whose positions you would manually set). The feature was made to make typing tabular data easier, hence the name. That said, the author has a solid point about why we have CR and LF in that order. To wit, on typewriters, the LF+CR lever would advance the paper first, because it made sense both mechanically and from the UX perspective (you would nudge it to advance paper by whatever line spacing you set, as opposed to manual advance which could be a fraction of that). Returning the carriage, and then advancing paper indeed makes more sense on the terminal, where all operations but CR take a fixed amount of time. That was the value of the article, really : to give motivation for CR+LF rather than LF+CR for line ending. The former works well with the terminals, the latter - with typewriters. Computers therefore use CR+LF.
- kps 5y agoCR and LF were invented as codes, along with the teletypewriter, by Douglas Murray around 1900. Original Baudot (ITA#1) and other earlier telegraph codes were one-dimensional with no concept of lines. Perhaps someone with institutional access to his paper, Setting type by telegraph, can see whether it discusses the intent of the pair. Setting type by telegraph, Journal of the Institution of Electrical Engineers, Volume 34, Issue 172, May 1905, p. 555–597 https://doi.org/10.1049/jiee-1.1905.0034 https://doi.org/10.1049/jiee-1.1905.0034
- lokedhs 5y agoYou can download it from sci-hub. I just want to point out how ridiculous it is that a document that is obviously out of copyright is paywalled by these publishers.