this post was submitted on 01 Feb 2025
1344 points (99.2% liked)

Programmer Humor

20275 readers
971 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
 
(page 2) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 58 points 1 day ago (2 children)

You can actually use / as a path separator on Windows in functions like fopen(), because it supports some ancient version of POSIX standard.

[–] [email protected] 35 points 1 day ago

There used to be an undocumented setting in early versions of MS-DOS that would allow the setting of the command option character to something other than the slash, and if you did that, the slash automatically became the path separator. All you needed was SWITCHAR=- in your CONFIG.SYS and DOS was suddenly very Unix-y.

It was taken out after a while because, with the feature being undocumented, too many people didn't know about it and bits of software - especially batch files, would have been reliant on things being "wrong". The modern support for regular slash in API calls probably doesn't use any of the old SWITCHAR code, but it is, in some way, the spiritual descendant of that secret feature.

Here's an old blog that talks about it: https://learn.microsoft.com/en-gb/archive/blogs/larryosterman/why-is-the-dos-path-character

[–] [email protected] 12 points 1 day ago

The one thing about NT was that it didn't have it's own semantics, but it could emulate any system you wanted. It's the unofficial successor of an OS that was based on creating VMs where you could run any other OS you want.

Then Microsoft decided to create their own system in it, and only really finished writing that one.

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

The number of times I had to ask "how can I tell where the file 'physically'" (I know) "lives" on the network when I took up work at a Windows shop, it was just baffling. And Win people couldn't understand what I was asking.

There's a location for this effing thing. I want to know where it is, really! How do I get that info?!

load more comments (2 replies)
[–] [email protected] 34 points 1 day ago* (last edited 1 day ago) (4 children)

Also the internet belongs on the left.

And really, Linux/macos could be reduced to "Unix" https://upload.wikimedia.org/wikipedia/commons/7/77/Unix_history-simple.svg

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

And BSD. It's really just Windows vs. literally everything. Or is there anything else that uses backslashes?

[–] [email protected] 27 points 1 day ago

CP/M

Which in this context is named hilariously.

[–] [email protected] 12 points 1 day ago

Typical windows behavior

[–] [email protected] 10 points 1 day ago (1 children)

Only Mac OS 10 and later, based on BSD, uses ‘/‘. (And, I guess, A/UX.) Classic MacOS used a ‘:’, but it wasn’t regularly exposed in the UI. The only way most users would know is that the colon couldn’t be used in a file name.

load more comments (1 replies)
load more comments (2 replies)
[–] [email protected] 20 points 1 day ago (1 children)

I don't really watch Star Wars. I'm a more of a Trekkie gal.

🖖

See, you can separate files both ways as long as it's logical

load more comments (1 replies)
[–] yeather 2 points 1 day ago

Shouldn’t the blade be green? I thought Luke wore all black in ROTJ when he got hos green lightsaber.

[–] [email protected] 12 points 1 day ago (10 children)
[–] [email protected] 7 points 1 day ago (1 children)

The lightsaber direction is like / \

load more comments (1 replies)
load more comments (9 replies)
[–] [email protected] 10 points 1 day ago (1 children)

Both works fine in Windows tho?

[–] [email protected] 23 points 1 day ago (3 children)
[–] Gestrid 2 points 1 day ago (1 children)

Actually, from what I can tell in my brief 15-minute internet search, every version of Windows since NT has accepted both because DOS 2.0 supported both. The exception to this was Command Prompt. But, these days, it supports both. Not sure when they made that change in Command Prompt, but I think it's been that way since at least Windows 7.

[–] [email protected] 2 points 1 day ago* (last edited 1 day ago)

Sadly, I had the great displeasure of writing code for Windows (and DOS) well before then.

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

Times change. You used to not be able to run Linux in Windows, but you can do that too.

[–] [email protected] 11 points 1 day ago

Yeah, and I've tried that. It turns out it works even better if you throw away the Windows part.

load more comments (1 replies)
load more comments (1 replies)
load more comments
view more: ‹ prev next ›