this post was submitted on 02 Oct 2023
1350 points (96.6% liked)
Programmer Humor
19564 readers
573 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You've come from Windows and have brought dangerous expectations.
MacOS has a case insensitive file system. It causes me untold grief
Is a 40 year old it guy who love linux, wat
Macos is case insensitive?!
OSX offers both case sensitive and case insensitive filesystems
Defaults to insensitive and if you want to change it you have to reformat 🥲
I've been using case insensitive fs on macOS for years and the only software having issues with this is onedrive.
can't say i'm surprised.
I have issues with Docker a lot. Example: Rename a file from "File.js" to "file.js" in a dependency and it's like something caches the old name so even when I redownload or install that dep it tries the old name and fails to find the file. Might just be me and my tomfoolery
if you're renaming from
File.js
tofile.ts
, which is also changing suffixes instead of just capitalization, then that couldn't be explained by case sensitivity, unless it was a typo and you meantFile.js
tofile.js
Yep typo thanks
This is likely because docker runs Linux in a VM on MacOS right?
We've had similar problems with stuff that works on the developers Mac but not the server which is case sensitive. It can be quite insidious if it does not cause an immediate "file not found"-error but say falls back to a default config because the provided one has the wrong casing.
The same issue happens with git (on windows). The file system says they're the same file and they haven't changed, so you have to manually tell the program the file changed. With git, you'd run
git rm --cached && git add
. On docker, you could just do a non-cached build viadocker build . --no-cache
That isn't true.
Which part? I'd love to switch if there's no reformatting, and if your exception is with the first part, I'd ask for some evidence. All of my mac machines arrived brand new, case insensitive. Granted that's only 3 so far, but it's a smattering from 2019 onward. All the literature online points to this being the default too
Wow, I figured it'd be case sensitive, crazy, gotta make it more windows like I guess.
Why would case sensitive path names be considered dangerous?
I don't know about dangerous, but case-insensitive Unicode comparison is annoying, expensive and probably prone to footguns compared to a simple byte-for-byte equality check.
Obviously, it can be done, but I guess Linux devs don't consider it worthwhile.
(And yes, all modern filesystems support Unicode. Linux stores them as arbitrary bytes, Apple's HFS uses... some special bullshit, and Windows uses UTF-16.)
Meanwhile fishshell:
so if linux stores file names as arbitrary bytes them could I modify a ext4 fs to include a / in a file name