▲ 883 ▼ i hate when this happens (pawb.social) submitted 3 years ago by tibor@pawb.social to c/programmerhumor@lemmy.ml 90 comments fedilink hide all child comments
[–] maeries@feddit.de 27 points 3 years ago (2 children) Why is that actually? permalink fedilink source hideshow 4 child comments replies: [–] Anticorp@lemmy.ml 29 points 3 years ago* Because fuck you! That's why! Edit: serious answer, I'm pretty sure it's outputting the key events to the terminal line. permalink fedilink source parent [–] gornius@lemmy.world 26 points 3 years ago (1 child) Because terminal emulators are literally the old terminal emulators (ye oldy screens + keyboard combos that looked like a computer but were just IO) and everything modern they do is just a hack. permalink fedilink source parent hideshow 2 child comments replies: [–] grue@lemmy.world 17 points 3 years ago* (last edited 3 years ago) Terminals with screens? What's all that newfangled shit? Nah, whippersnapper, this tech goes all the way back to teletypes. You didn't get a fancy-shmancy "screen;" instead, it printed out the results of your commands. On actual paper! Seriously though, that's why the device files for terminals in Linux are named tty[$NUM] -- "tty" is shorthand for "TeleTYpe." I believe it's also why really primitive programs can't scroll up and do things like writing an entire screen worth of content in order to emulate interactivity (as opposed to seeking the cursor backwards and replacing only the parts the program wants to replace): they're using a version of the control protocol so primitive that it didn't have a function to go backwards because teletypes didn't need it due to physical impossibility. (That's my theory, anyway -- I haven't dug deep enough into the guts of TERMCAP etc. to be sure. I'm also not actually old enough to have experienced that stuff, despite my joke above.) Edit: look at this excerpt from man terminfo(5), for instance: Basic Capabilities The number of columns on each line for the terminal is given by the cols numeric capability. If the terminal is a CRT, then the number of lines on the screen is given by the lines capability. If the terminal wraps around to the beginning of the next line when it reaches the right margin, then it should have the am capability. If the terminal can clear its screen, leaving the cursor in the home position, then this is given by the clear string capability. If the terminal overstrikes (rather than clearing a position when a character is struck over) then it should have the os capability. If the terminal is a printing terminal, with no soft copy unit, give it both hc and os. To this day, the info database entry for your virtual terminal has to specify that it's capable of deleting a line of text instead of merely striking it out, because some terminals back in the day actually couldn't! permalink fedilink source parent
[–] Anticorp@lemmy.ml 29 points 3 years ago* Because fuck you! That's why! Edit: serious answer, I'm pretty sure it's outputting the key events to the terminal line. permalink fedilink source parent
[–] gornius@lemmy.world 26 points 3 years ago (1 child) Because terminal emulators are literally the old terminal emulators (ye oldy screens + keyboard combos that looked like a computer but were just IO) and everything modern they do is just a hack. permalink fedilink source parent hideshow 2 child comments replies: [–] grue@lemmy.world 17 points 3 years ago* (last edited 3 years ago) Terminals with screens? What's all that newfangled shit? Nah, whippersnapper, this tech goes all the way back to teletypes. You didn't get a fancy-shmancy "screen;" instead, it printed out the results of your commands. On actual paper! Seriously though, that's why the device files for terminals in Linux are named tty[$NUM] -- "tty" is shorthand for "TeleTYpe." I believe it's also why really primitive programs can't scroll up and do things like writing an entire screen worth of content in order to emulate interactivity (as opposed to seeking the cursor backwards and replacing only the parts the program wants to replace): they're using a version of the control protocol so primitive that it didn't have a function to go backwards because teletypes didn't need it due to physical impossibility. (That's my theory, anyway -- I haven't dug deep enough into the guts of TERMCAP etc. to be sure. I'm also not actually old enough to have experienced that stuff, despite my joke above.) Edit: look at this excerpt from man terminfo(5), for instance: Basic Capabilities The number of columns on each line for the terminal is given by the cols numeric capability. If the terminal is a CRT, then the number of lines on the screen is given by the lines capability. If the terminal wraps around to the beginning of the next line when it reaches the right margin, then it should have the am capability. If the terminal can clear its screen, leaving the cursor in the home position, then this is given by the clear string capability. If the terminal overstrikes (rather than clearing a position when a character is struck over) then it should have the os capability. If the terminal is a printing terminal, with no soft copy unit, give it both hc and os. To this day, the info database entry for your virtual terminal has to specify that it's capable of deleting a line of text instead of merely striking it out, because some terminals back in the day actually couldn't! permalink fedilink source parent
[–] grue@lemmy.world 17 points 3 years ago* (last edited 3 years ago) Terminals with screens? What's all that newfangled shit? Nah, whippersnapper, this tech goes all the way back to teletypes. You didn't get a fancy-shmancy "screen;" instead, it printed out the results of your commands. On actual paper! Seriously though, that's why the device files for terminals in Linux are named tty[$NUM] -- "tty" is shorthand for "TeleTYpe." I believe it's also why really primitive programs can't scroll up and do things like writing an entire screen worth of content in order to emulate interactivity (as opposed to seeking the cursor backwards and replacing only the parts the program wants to replace): they're using a version of the control protocol so primitive that it didn't have a function to go backwards because teletypes didn't need it due to physical impossibility. (That's my theory, anyway -- I haven't dug deep enough into the guts of TERMCAP etc. to be sure. I'm also not actually old enough to have experienced that stuff, despite my joke above.) Edit: look at this excerpt from man terminfo(5), for instance: Basic Capabilities The number of columns on each line for the terminal is given by the cols numeric capability. If the terminal is a CRT, then the number of lines on the screen is given by the lines capability. If the terminal wraps around to the beginning of the next line when it reaches the right margin, then it should have the am capability. If the terminal can clear its screen, leaving the cursor in the home position, then this is given by the clear string capability. If the terminal overstrikes (rather than clearing a position when a character is struck over) then it should have the os capability. If the terminal is a printing terminal, with no soft copy unit, give it both hc and os. To this day, the info database entry for your virtual terminal has to specify that it's capable of deleting a line of text instead of merely striking it out, because some terminals back in the day actually couldn't! permalink fedilink source parent