this post was submitted on 10 May 2024
26 points (88.2% liked)

Programming

17419 readers
22 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
 

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?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 6 months ago

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