this post was submitted on 23 Sep 2025
365 points (95.1% liked)

Programmer Humor

26649 readers
2329 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 2 years ago
MODERATORS
 

Re-posted to fix my filename emoji. You can't make this shit up

you are viewing a single comment's thread
view the rest of the comments
[–] Cethin@lemmy.zip 7 points 1 week ago (2 children)

The way this should work is it's set as either left-to-right or right-to-left. (C:)/1/2/3.ext or ext.3/2/1/(:C). It shouldn't render part of it one direction and part of it the other direction logically. It's probably impossible to fix at this point, but this makes a lot more sense.

[–] NeatNit@discuss.tchncs.de 13 points 1 week ago* (last edited 1 week ago) (1 children)

Yeah, that is pretty much how it works in some GUIs like in the screenshot, where each slash is replaced by >. But if you represent the path in a string, and put that string in some context that doesn't know it's a path and that it should be rendered by some special rules, then it'll just be subject to the usual Unicode Bidirectional Algorithm (UBA).

The UBA is a masterpiece, and I'm not being sarcastic. For everyday text with mixed directionality, such as a WhatsApp chat in Arabic/Hebrew with a bit of English or just some numbers mixed in, the UBA's default output is the ideal way to order the characters.

The problem is, special cases (such as file paths) just can't be covered by a universal algorithm. You can insert special characters into the path, namely FSI and PDI ("First Strong directional Isolate" and "Pop Directional Isolate") to make the text render the way you want under the UBA... But then, when you copy that path, the special characters would still be there so software would consider them part of the path, and then of course, File Not Found.

[–] AnarchistArtificer@slrpnk.net 7 points 1 week ago

I was already interested based on your first comment but this:

"The UBA is a masterpiece, and I'm not being sarcastic."

has thoroughly piqued my interest. Thank you for being an opinionated nerd on the internet.

[–] MonkderVierte@lemmy.zip 1 points 1 week ago* (last edited 1 week ago)

(:-C) boah or (C:) nose?