this post was submitted on 11 May 2025
868 points (97.3% liked)

Programmer Humor

23609 readers
1414 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] Honytawk@feddit.nl 31 points 3 weeks ago (2 children)

Good luck with your 256 characters.

[–] SpaceCadet@feddit.nl 31 points 3 weeks ago (1 children)

When you run out of characters, you simply create another 0 byte file to encode the rest.

Check mate, storage manufacturers.

[–] PieMePlenty@lemmy.world 13 points 3 weeks ago* (last edited 3 weeks ago)

File name file system! Looks like we broke the universe! Wait, why is my MFT so large?!

[–] barsoap@lemm.ee 14 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

255, generally, because null termination. ZFS does 1023, the argument not being "people should have long filenames" but "unicode exists", ReiserFS 4032, Reiser4 3976. Not that anyone uses Reiser, any more. Also Linux' PATH_MAX of 4096 still applies. Though that's in the end just a POSIX define, I'm not sure whether that limit is actually enforced by open(2)... man page speaks of ENAMETOOLONG but doesn't give a maximum.

It's not like filesystems couldn't support it it's that FS people consider it pointless. ZFS does, in principle, support gigantic file metadata but using it would break use cases like having a separate vdev for your volume's metadata. What's the point of having (effectively) separate index drives when your data drives are empty.

[–] Brahvim@lemmy.kde.social 1 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

...Just asking, just asking: Why is the default FILENAME_MAX on Linux/glibc 4096?

[–] barsoap@lemm.ee 2 points 3 weeks ago (1 children)

Because PATH_MAX is? Also because it's a 4k page.

FILENAME_MAX is not safe to use for buffer allocations btw it could be INT_MAX.

[–] Brahvim@lemmy.kde.social 1 points 2 weeks ago

Thanks! Got an answer and not 200 downvotes. This is why I love Lemm-Lemm.