Why DEL is at the end of ASCII (I have a theory! -- well, maybe?)

So we have all these control characters in ASCII and besides newline, horizontal tab and carriage return (on Windows) the only use for them is on terminal emulators (which I am making one!) Also as an extension, us NeoVim/Vim users have extensive use for them.

But all these control characters are 0-31, for example, newline is 10, horizontal tab is 9, carriage return is 13, etc. But DEL is aaaalll at the bottom, the last one, 127!

Here's my theory. So, DEL is supposed to delete one row of text, it's backspace that is supposed to just delete one character (I think backspace is 31?). So since 127 is literally 7 1s, marking it on a punch-card 'by mistake' would be kinda hard right? So you want have delete ruin your batch. It's kinda like a built-in 'Are you sure you want to delete this row of punch-card?'

Now I could be wrong. Opinions?

PS: If this is so, this kind of 'physical sentinels' is nothing new. According to Alan Kay, the earliest linked lists were not data structures, THEY WERE 1-TONN MAGNETIC DISKS! So basically, you had the address, and by 'address' I mean the physical address, a real location on planet earth, of the next magnetic disk stored on a fixed location on the previous magnetic disk. Fun huh?

Lmaydev ,

As it's all 1s in binary you can overwrite any character by doing an or with DEL

bizdelnick ,

DEL is supposed to delete one row of text

It's not. It overrides a row on a punch card, i. e. one character.

BigMikeInAustin ,

That was a pretty solid reasoning path. Nice work! (Not sarcasm)

0x0 ,

Misread Dell for a second there and was wondering why were they screwing around with ASCII...

PopGreene ,
@PopGreene@programming.dev avatar

It's about Punch Tape. Old Teletype terminals allowed P-tape to be "written" and read. If the typist made a mistake, they could back up the tape and type "Rub Out." That would write a DEL, effectively punching holes across the tape - effectively a bitwise OR. P-tape readers were designed to ignore the DEL.

Carighan ,
@Carighan@lemmy.world avatar

Fascinating, and makes perfect sense. The only character you could viably write over every other one without conflict ist 1111111, after all.

gravitas_deficiency , (edited )

Incredibly obvious once you think about it. Very cool though. TIL!

echo ,
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • programming@programming.dev
  • All magazines