74
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 23 Aug 2023
74 points (95.1% liked)
Programming
17314 readers
65 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 !webdev@programming.dev
founded 1 year ago
MODERATORS
Pretty much all programming languages in use today have been invented decades after the keyboard.
The keyboard was originally invented for typewriters, but since they don't interact with anything and are self-contained systems, typewriters don't need their keys standardized. However, the keyboard converged as HP, Brother et al. brought the typewriter forward, especially near the end when typewriters were keyboards connected to printers.
Early computers weren't programmed with keyboards at all and used punch cards to be programmed. As you move forwards with the invention of the computer as we know it today, you find out that the modern keyboard was invented to be able to type most characters in use at the time (a classic example is that the @ sign was used by tellers on tills, to mark stuff like 2 units @ $5 per), and actual standards body such as iso and ANSI simply implemented that.
Early personal computers were not powerful enough to compile programs quickly(and compilers were very expensive), so for a while all programming was done either in assembly, which requires very few special characters, or in higher lever languages by people who could pay to get their programs compiled. These higher lever languages, such as B (precursor to C), were often written right on paper by hand, or by typewriter. After this point, home compilers became more and more accessible (the internet basically guaranteed you could get a compiler if needed), and this was the last point in history you could design a language with characters not present on a standard keyboard (you could still have a nonstandard typewriter, or write them by hand for example). After this and the explosion of home computing, people designed their own languages that they were able to use themselves, using their own keyboards.
Worth noting that there exist languages today that you cannot type, pretty much at all. They are however largely considered esolangs (esoteric languages) and most of their use is relegated to the practice of code-golf, in which a programmer tries to accomplish a task using the fewest bytes. Since the characters on a keyboard make up a fraction of all characters available in Unicode or even just ASCII, these languages try to increase the number of things you can do with a single characters by disregarding the fact you can't type most of them, lowering the amount of bytes one needs to do a task.
An example of this is O5AB1E (pronounced "osable"), which has over 250 single-character commands, such as Δ which "repeats code until 'a' doesn't change".
An example (that you can't type) is: yā<ã.Δ¹sŸèOQ
This program gets an input n and a string of numbers, then outputs the first run in the string that sums to n. The program is explained here
I'd just like to take a moment to commend you on an absolutely exquisite answer.
Given time, there is a slim chance I could have covered the same ground and no chance that it would have been as clear and concise.
Well thanks, that really made my day.
I think the only thing here you can’t type is the superscript. The rest is easily typeable, at least on a Mac or a smartphone.
@snowe @themoonisacheese I can type ¹ on a smartphone pretty easily
Are you typing the character or using markdown to accomplish that?
@snowe Typing the character. With GBoard it's switch to numbers+symbols then press and hold a number (in this case 1) to access fractions and superscripts.
Hmm Gboard on iphone doesn't do that. Strange. I can hold plenty of other letters and numbers (like 0 to get °), but not 1-9.
@snowe not sure if this image attachment is going to federate correctly from Mastodon to Lemmy
It did not. Cool to see federation between mastodon and lemmy though!
@snowe It's got its quirks. For example, if I am replying to someone who's not on programming.dev then I have to make sure to tag @programming (or another account on the instance) in order for my post to still federate to your server, otherwise only the person I'm replying to would see my reply and it wouldn't show in comments.
I did discover that adding the tag as a trailing reply to a missing comment thread will cause the entire reply chain to federate, so that's neat.
@snowe if not, I'll try markdown:
@snowe@programming.dev screw it, let's try HTML. [🖼 medias.meow.social/media_attac…]
Woah that’s cool. Wonder why it’s not on iOS. It’s clearly not a limitation, so I’m just guessing google doesn’t want to.
@snowe a very common reason with Google products, I've found; up to and including not wanting to provide that product anymore.
😂 yeah, that's why I've been trying to stop using google entirely, it's just asking to lose data or lose a workflow you use, or whatever. I got sick and tired of it.
Well, soft keyboards thend to do that yeah. But nobody is using a smartphone to program.
The point is that nobody is good enough at 05AB1E to type it by hand, everyone just has an idea of what they're trying to accomplish and copy-pastes commands from the documentation.
I wasn’t talking just touchscreen keyboards. On Mac you just hold option and you can type almost all of those letters. I do understand your point though. Thanks for explaining