this post was submitted on 16 Jul 2024
710 points (97.2% liked)

Programmer Humor

19147 readers
1190 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 

cross-posted from: https://lemmy.zip/post/19231076

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 month ago (1 children)

No, it isn't. Why would it be?

[–] [email protected] 4 points 1 month ago* (last edited 1 month ago) (1 children)

Because you would need to know the code for å in all kb layouts, on all OS's, even in a bare terminal with no way to just open the emoji picker, with or without special keys and no clipboard. Of course, tab completion or globs may help you, but not in all cases.

Try to select blåhaj.txt in a dir with blåhaj.txt and blahaj.txt present. Easy, ls bl*haj.txt | grep -i blahaj.txt. Now with blåhaj.txt and bløhaj.txt. Not as easy anymore, but doable with tail -n1 or head -n1. Now do it consistently in a script. So you again need to single out the right string, or single char, and >> it into the script so you have the special char. Then you have a component that does not like certain special chars, so you need to escape it. All because one decided to use special chars as a file name/identifier. Using [a-zA-Z0-9-_.:;,]* would be so easy.

[–] [email protected] 3 points 1 month ago (1 children)

Because you would need to know the code for å in all kb layouts, on all OS's,

WTF!? Why would you ever need to know that!?

[–] [email protected] 0 points 1 month ago (1 children)

So, you create a file with the name containing å. Then you send it to another person. They want to handle it via the command line. Because it's more efficient. So that person needs to know said information.

[–] [email protected] 2 points 1 month ago (1 children)

Most people never type a full file name on the command line, they normally just use file name completion.

And if they happen to have a lot of files that are only distinguished by some single character, what would be so difficult about typing that one character then?

[–] [email protected] 0 points 1 month ago (1 children)

The fact they couldn't type that one character, on the command line, without those special chars.

[–] [email protected] 1 points 1 month ago

I still don't get what would be so difficult about typing one such character if ever needed.