Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Friday August 02 2019, @01:03PM   Printer-friendly
from the ASCII-and-you-will-receivii? dept.

https://bestasciitable.com/

To understand why Control+i inserts a Tab in your terminal you need to understand ASCII, and to understand ASCII you need know a bit about its history and the world it was developed in. Please bear with me (or just go the table).

Teleprinters

Teleprinters evolved from the telegraph. Connect a printer and keyboard to a telegraph and you've got a teleprinter. Early versions were called "printing telegraphs".

Most teleprinters communicated using the ITA2 protocol. For the most part this would just encode the alphabet, but there are a few control codes: WRU ("Who R U") would cause the receiving teleprinter to send back its identification, BEL would ring a bell, and it had the familiar CR (Carriage Return) and LF (Line Feed).

This is all early 20th century stuff. There are no electronic computers; it's all mechanical working with punched tape. ITA2 (and codes like it) were mechanical efficient; common letters such as "e" and "t" required only a single hole to be punched.

These 5-bit codes could only encode 32 characters, which is not even enough for just English. The solution was to add the FIGS and LTRS codes, which would switch between "figures" and "letters" mode. "FIGS R W" would produce "42". This worked, but typo'ing a FIGS or LTRS (or losing one in line noise) would result in gibberish. Not ideal.

Terminals

In the 1950s teleprinters started to get connected to computers, rather than other teleprinters. ITA2 was designed for mechanical machines and was awkward to use. ASCII was designed specifically for computer use and published in 1962. Teleprinters used with computers were called terminals (as in "end of a connection", like "train terminal"). Teleprinters were also called "TeleTYpewriter", or TTY for short, and you can still find names like /dev/tty or /bin/stty on modern systems.


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by jmorris on Saturday August 03 2019, @03:54AM

    by jmorris (4844) on Saturday August 03 2019, @03:54AM (#874979)

    Of course while VIM is limited to a TTY. GVIM could indeed gain the functionality to map a function to CTRL+I or L_CTRL+I and another to R_CTRL+I, etc. Because X11 doesn't know anything about that ASCII/tty nonsense, it just provides events when keys up up or down and what modifiers are also down. Of course then you would have key sequences that only worked in the graphical GVIM and create confusion.

    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2