Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by forgottenpass on Tuesday January 13, 2015 @12:17PM
(#8881136)
This is just blogspam of something that was popular on social media yesterday. Which is where Linux Veda found it in the first place and proceeded to not add any meaningful commentary or context.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by kevingadd on Tuesday January 13, 2015 @11:48AM
(#8880929)
For reference, NTFS is case-sensitive. Win32 is case-insensitive. The case sensitivity is implemented at a layer above the filesystem so that classic Windows apps will behave the way users expect. (Case sensitive filesystems are confusing for users and mostly create opportunities for horrible mishaps.) As a result, the POSIX subsystem can store case sensitive files just like a linux FS would, with 'FOO' and 'foo' being separate files right next to each other:
Case insensitivity like win32's is still kind of a mess, but it's unfair to paint the developers of NTFS as idiots when they actually got this right. Above the FS layer is the correct place to implement case insensitivity, because case insensitivity is a feature that aids users in selecting files, not a feature that aids applications in opening them or creating them.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by durin42 on Tuesday January 13, 2015 @11:56AM
(#8880982)
I don't know. Now you end up in a circumstance where you have N files named some variant of "Foo" and the GUI layer can't distinguish them.
Enforcing this invariant at the filesystem layer (with well defined semantics, which HFS+ at least documents semi-well) seems eminently reasonable to me.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by babl-yc on Tuesday January 13, 2015 @11:41AM
(#8880874)
As a developer I could see case-sensitive file systems as more "proper" and predictable. But as an everyday Mac user, I'd be annoyed if I accidentally selected "upload.png" instead of "Upload.png" and sent the wrong file.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by userbinator on Tuesday January 13, 2015 @12:03PM
(#8881040)
But as an everyday Mac user, I'd be annoyed if I accidentally selected "upload.png" instead of "Upload.png" and sent the wrong file.
That assumes you somehow created two files with names differing only in case, which I'd argue would happen only if you were naming your files with such generic names. Also, I don't think the fact that two files' names look similar should be any reason to treat them as the same - otherwise, would you suggest that the letter O and the number 0 (along with the letter o) should be considered identical for filenames?
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by stygiansonic on Tuesday January 13, 2015 @11:28AM
(#8880782)
Interesting: I didn't realize the "Epoch" in this case was "midnight, January 1, 1904, GMT". Given that the representation is stored as an unsigned 32-bit integer, it seems like you cannot represent dates older than this "Epoch" starting value. Since it's a file system, that's probably of much less concern than a more general date-time format.
However, does anyone know the genesis behind which this particular date was chosen? It's far enough back to not cause any issues and appears to be close to the minimum date-time value obtained using the minimum value for signed 32-bit integer and the standard Unix Epoch (which would be around 13 Dec 1901), but other than that?
"Explains why the year 1900 is treated as a leap year in Excel 2000"
Mac OS was written in a time of memory scarcity; 1904 is just an easier choice for the epoch than 1900. That's also why they didn't choose the Unix epoch, as it would have required supporting multiple epochs, one for disk time stamps, and one to handle birth dates (time stamps on classic Mac OS are unsigned; there were no times before the epoch. And yes, there were no Mac users over 80 :-))
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by kaolinite on Tuesday January 13, 2015 @11:36AM
(#8880832)
There are very real problems with HFS+ related to reliability and data corruption. It really is quite bad. Linus's argument is silly, however, and purely a matter of taste. Case insensitivity certainly isn't the reason that HFS+ is bad.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by jiggy2011 on Tuesday January 13, 2015 @11:41AM
(#8880871)
I don't even understand why he doesn't like case insensitivity. I can't think of a reason to have two files with the same name that vary only in capitalisation.
The answer to all that is that it depends on the user and their locale settings. So to get this right you would have to pass the locale settings into system calls that go into the filesystem so it can do the right thing on every call. But then what happens if the locale later gets changed? Before some file names may be considered equivalent, but with the new one they are different and things break. Ok how about a system wide locale setting that can't be changed? Are you going to require a disk reformat each time a different user is on the system, or a multilingual user who travels?
The right solution is exactly what Unix did in the first place. The filesystem stores names exactly as is without having to deal with locales. User space is then responsible for doing the right thing for a user. For example a word processor can treat Résumé and Resume as the same for Americans in file selection dialogs.
User space already has to deal with all this, for example by sorting file names. Here is how hard that is http://www.unicode.org/reports/tr10/ and a simple example is if z comes before or after ö. Or when showing a list of Swedish names to a German user do you use Swedish or German sort order?
A similar analogy is dealing with time. The best approach is to store the time as UTC in the filesystem and let user space show it in whatever way is relevant for the user. On the other hand if you store local time in the filesystem, you will end up in a world of hurt trying to work around that. (UTC to local time is a lossy conversion making local time back to UTC hard to work out.)
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by archagon on Tuesday January 13, 2015 @12:55PM
(#8881416)
But half the time, I'm having to deal with file access and creation in the terminal. That's as an important user experience to me (a power user) as anything in the GUI. Does Unix change the way the terminal handles files depending on the locale? My understanding is that it does not. (If it did, maybe that would be the best solution for everyone, but I imagine a lot of geeks would be up in arms about how the terminal experience is not consistent...)
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by rogerbinns on Tuesday January 13, 2015 @03:06PM
(#8882200)
There are multiple layers at play. For example someone looking a file selection dialog in a gui has at least these layers, lowest level first:
- Filesystem implementation (actual on disk bytes)
- Filesystem compatibility (adjustments to OS semantics)
- Generic filesystem layer in the kernel
- System call interface (between userland and kernel)
- Userland low level library (eg system call wrappers)
- Higher level libraries (eg libc)
- User interface libraries
- App level modules & libraries
The problem with the filesystem being case insensitive is that is the first level above, where there is virtually no context or user information. That is the hardest place to work out if the user considers Résumé and RESUME to be the same. The lower down the list the easier it gets. The important point is that how you store things and how you present does not need to be the same.
Command line tools typically use the libc level of things. It is perfectly possible to make that level so the system appears case insensitive (another poster mentioned Windows doing that).
Your Unix command line experience is very much affected by your locale. For example the ls command does the following:
- Sorts filenames
- Displays sizes (different locales have different conventions for floating point representation, digit grouping etc)
- Displays times
Environment variables like $LANG, $LC_*, $TZ etc control this in Unix.
Individual programs can also alter behaviour. For example bash can be configured to do case insensitive filename completion.
TLDR: while case insensitivity is a nice user experience for humans, it is awful for the lower layers including filesystems. The closer a program is to a human, the easier it is to give that nice user experience. There is no requirement for a case insensitive user experience to then make filesystems also implement that. And as my examples show, they couldn't do it correctly anyway.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by woodman on Tuesday January 13, 2015 @04:21PM
(#8882674)
Don't forget the additional fun that terminal emulators add in the journey from libc to your eyeballs. Some of the most difficult bugs I've worked on involved grep with the color flag and automatic build systems...
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by tankenmate on Tuesday January 13, 2015 @03:12PM
(#8882254)
In that case it isn't the terminal (as a terminal's job is to handle input of text, and output of text). What you need to adjust is your shell; and in the case of bash with file completion it already does equivalencies and ordering correctly for your LANG / LC_* already. Your problem is largely fixed already; it works fine on my case sensitive Linux machine and I am using the default Ubuntu bash settings.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by Afforess on Tuesday January 13, 2015 @11:48AM
(#8880927)
Case insensitivity only makes sense dealing with ASCII. Once you allow files and directory names with unicode characters, case insensitivity no longer makes any sense.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by chousuke on Tuesday January 13, 2015 @05:04PM
(#8882930)
I don't see your point. In every case where you depend on filenames to identify blobs of data, case-sensitivity (actually byte-sensitivity) is the only behaviour that a filesystem can reliably implement. Once you allow cases where two different byte sequences must be considered equal depending on configuration, your filesystem can no longer work reliably.
Case sensitivity may bother users sometimes, but the filesystem is not the right place to solve that problem.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by Morgawr on Tuesday January 13, 2015 @12:12PM
(#8881097)
I always bring this up when people talk about case sensitive/insensitive. Traditionally, a machine only sees the difference in glyphs, not in letters. 'a' is a different glyph to 'A'. We are used to dealing with case sensitivity because that's the most common instance in the English language where we have collision in meaning but not in glyphs.
Let's take other non-latin characters, like accented letters or cyrillic. Some of these alphabets have letters that act as 'a' but are not 'a'. Some of these alphabets have glyphs that look like 'a' but are not 'a'. All of these glyphs are encoded using different codes as seen by a machine.
If you want to support 'a' == 'A', then I could argue that I would want you to support 'a' == 'A' == <letter in cyrillic that means 'a'>. It is a very slippery slope, in my opinion. Logically, I would rather have 'a' and 'A' separated to avoid ambiguity, but feel free to disagree.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by userbinator on Tuesday January 13, 2015 @11:50AM
(#8880941)
A lot more code, if you count the fact that the definition of "case" varies between languages, some of which don't even have such a concept. Add to that Unicode's varying representations that are visually identical but different sequences of bytes, and you have one hell of morass to deal with.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by thirsteh on Tuesday January 13, 2015 @12:09PM
(#8881081)
But that's a pretty silly complaint if that's really his argument. Nobody except kernel devs cares if the kernel needs to do case folding when it's 98% a UX issue.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by bunderbunder on Tuesday January 13, 2015 @11:59AM
(#8881006)
I think the main complaint would be that it means Linux users will create bugs and security holes if they aren't constantly keeping track of the fact that a huge chunk of the computing world doesn't follow the same convention.
To me it smacks of a rather egregious failure to grasp Postel's law. And case-sensitivity is just bad UX for the 99% of computer users who aren't programmers or IT; perhaps it makes sense on Linux but Windows and OS X are dealing with a different audience and Linus's failure to give that fact some credit makes him come across as tone deaf.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by sigsergv on Tuesday January 13, 2015 @01:22PM
(#8881586)
He's absolutely right about NFD, it's horrible. If you're using plain latin-1 you usually don't have any problems. And everything changes if you are using “composite” characters like à or ё or й. It's not just HFS+ issue, it's a system-wide issue, that break mounted network resources for example. Or even USB sticks.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by archagon on Tuesday January 13, 2015 @12:24PM
(#8881185)
Technical hurdles aside, I just can't agree that case-sensitivity makes sense. To most people, an "a" and an "A" are not different symbols; they're the same letter with "uppercase" formatting applied, much like bold or italics. And although one could argue that you could make a case-insensitive GUI layer while keeping the implementation case-sensitive, I feel that the terminal can be just as important from a UX perspective as anything else in the OS. After all, it's one of the main places power users create and access files.
Given how much Siracusa and Torvalds (to an extent) advocate for better user experience over ease of technical implementation, I feel I'm missing something. Our job as programmers is to encompass the complexity of the real world in our programs, not to make our users think like machines.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by forgottenpass on Tuesday January 13, 2015 @12:31PM
(#8881237)
not to make our users think like machines.
If differentiating between "file" and "File" is thinking like a machine, how isn't differentiating between "my files" and "myfiles" thinking like a machine?
Should "my files" and "myfiles" be collapsed to mean the same thing? What about "files"?
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by archagon on Tuesday January 13, 2015 @12:38PM
(#8881294)
An "f" is not a different character from an "F". To most people, it's the same letter with special formatting applied. They don't see it and think, "Oh, that's ASCII character 102." An F is an f, no matter how you type it.
On the other hand, "myfiles" and "my files" have different numbers of characters. They sound different in your head, and you can easily point to the difference. It's the same as typing "alien" versus "a lien".
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by msbarnett on Tuesday January 13, 2015 @12:39PM
(#8881307)
> If differentiating between "file" and "File" is thinking like a machine, how isn't differentiating between "my files" and "myfiles" thinking like a machine?
Spaces are lexically significant in the English language because they indicate the breaks between words. "My files" are two English words that convey meaning to English speakers; "myfiles" is not a word at all and is meaningful only if we charitably insert the spacing necessary to make them meaningful.
Capitalization does not impact meaning to English speakers in the same manner; "my files" and "My files" are understood to mean the same thing. Capitalization is in this case merely an artifact of sentence positioning and the like. It's orthographic convention and nothing more.
Thus, to make the user have to understand that what is a meaningless distinction in English is a meaningful distinction to the user is, by definition, forcing the user to think like a machine.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by dragonwriter on Tuesday January 13, 2015 @12:56PM
(#8881426)
> To most people, an "a" and an "A" are not different symbols; they're the same letter with "uppercase" formatting applied, much like bold or italics.
So, what you are saying, is that there is no semantic difference between "1 mm" and "1 Mm"? Or between "my next computer" and "my NeXT computer"? Or between "acorn" and "ACORN"?
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by mproud on Tuesday January 13, 2015 @01:36PM
(#8881657)
Focusing on the non-technical details… case-sensitive filesystems just seems horrible for consumers!
At my day job, I work with people who have barely used a computer before. I could see an 80-year old woman having three versions of a letter she typed in Pages or Word, simply because she had mixed use capital letters, and then mistakening the versions and deleting the wrong file.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by haberman on Tuesday January 13, 2015 @12:25PM
(#8881191)
I seem to remember a story of how this decision was made (or at least a part of it). I thought I remembered hearing that Steve Jobs was in a roomful of developers and took a quick poll of whether they liked case sensitive vs case-preserving filesystems, and case-preserving won.
I could be totally making this up though. Anyone remember hearing this and can confirm?
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by duaneb on Tuesday January 13, 2015 @11:20AM
(#8880734)
This is just Linux grumping about subjective tastes—he rags on the default case sensitivity of HFS+ and the finder, neither of which he's forced to use even if he's stapled to a mac. If you want a case sensitive filesystem, reformat your damn mac! I've seen it confuse enough non-computer savvy people I wouldn't want Apple to change their filesystem for the sake of developers who need to distinguish between headers by case.
NB: I use a case-sensitive HFS+ install for cross-compiling when it's necessary.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by outworlder on Tuesday January 13, 2015 @11:32AM
(#8880811)
Don't underestimate the power of defaults.
Also, this can trip up in several other contexts besides headers. For instance, someone renames a file in their repository, changing just a filename case. And then you'll have to scratch your head a bit to understand a git issue that will invariably arise when you pull in the changes. Unless you are fortunate enough not to have a deadline, you won't be so quick to reformat the machine.
This actually happened to me. In the end, it was quicker to spin up a linux vm than to reformat the machine.
EDIT: Also, you appear to have missed the part that says "There is a case sensitive option, but Apple actively hides it and doesn't support it." No support is really, really, really bad. Noone will deploy OSX machines formatted like that if it is unsupported.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by duaneb on Tuesday January 13, 2015 @12:02PM
(#8881027)
I'm not saying reformat the machine, I'm saying don't depend on case sensitivity if you use a default configured mac. And if you do depend on it, don't use the default configuration of the mac. How hard is this to figure out? It's not like case sensitivity is inherently desirable or better, especially for source code, where I would argue it's actively confusing and a huge code smell.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by tambourine_man on Tuesday January 13, 2015 @12:05PM
(#8881052)
OS X is primarily a consumer's OS. Every time a decision has to be made between making the life of the programer or the consumer easier, Apple will choose the latter.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by walterbell on Tuesday January 13, 2015 @12:10PM
(#8881086)
On iOS, Apple made a consumer-unfriendly change when they disabled virtual printing, e.g. local Print-to-PDF from any application to a virtual-printer app.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by duaneb on Tuesday January 13, 2015 @11:59AM
(#8881004)
It's subjective. HFS+ is perfectly capable of being case-sensitive if necessary, so it's not a fault of the filesystem. He's just griping about the default configuration of developer machines. News flash: if you're a developer, you may have to think about how your computer is configured. You might as well complain how some linux distros don't come with emacs installed and calling it 'brain damaged design' because it isn't what you want.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by duaneb on Tuesday January 13, 2015 @12:04PM
(#8881044)
> As the primary author of the most widely used cross platform VCS, he does have to use OSX.
Sure, but he doesn't need to bitch about things just to bitch about things... it's not like case sensitivity is a problem for anything but poorly designed build systems.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by tambourine_man on Tuesday January 13, 2015 @11:37AM
(#8880843)
What a shitty article. HFS+ has many problems, but case insensitivity is a feature. It's good for end users. There's a case sensitive version of it, but it's not the default, and for a good reason.
If you want a good critique of HFS+, check one of John Siracusa's many rants[1].
Also, Gruber is not the author of Byword:
Even John Gruber of Daring Fireball and author of Byword…
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by gondo on Tuesday January 13, 2015 @11:53AM
(#8880957)
what a shitty comment.
did you try to use some Adobe product on case sensitive version of HFS+?
let me guess, no you didn't. because if you would, you would find out that some programs simply doesnt work on case sensitive HFS+, most likely because people like you, who simply "know" whats better for end user
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by durin42 on Tuesday January 13, 2015 @11:59AM
(#8881000)
It's almost certainly a bug in a build script somewhere, and they're dynamically linking against something via the wrong name. I once linked against Quicktime.framework, and it worked on everything but my case-sensitive Mac. QuickTime.framework worked everywhere.
So your Adobe example is flawed. They should be testing on case-sensitive volumes, but the vast majority of normal users don't want a file named README and readme in the same directory, and enforcing that invariant seems reasonable to me.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by tambourine_man on Tuesday January 13, 2015 @01:30PM
(#8881628)
It is a bad article. The author uses a quote from 2002 to criticize the Finder, in order to support his claim that today's Apple software is bad in general, and therefore HFS+ sucks.
Which it does indeed, pretty badly. You would be hard pressed to find a worse FS still in use, excluding FAT, which will just never die.
Except the article doesn't contribute to the discussion and the quotes from Linus are unfortunately not newsworthy. Instead of a deep critique, perhaps pointing what it should learn from Btrfs and ZFS, he acuses Apple of not shipping a consumer case sensitive FS and criticizes its string and slash encoding, which although bad, are successfully abstracted even from most developers.
It then ends stating that Apple, like the weather, pays no attention to criticism. As empty an analysis as can be.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by ZoFreX on Tuesday January 13, 2015 @12:03PM
(#8881038)
Really? The developer who wrote software for Windows and OS X that depends on a case-sensitive file-system is going to throw stones about bad software?
Windows and OS X use case-sensitive file-systems. That sucks. But if you are going to release software for those systems, you need to accept that that is the reality, and write your software accordingly. This is hardly the first issue Git has had due to this, Linus's time would be better spent fixing these issues rather than stamping his feet and expecting OS X and Windows to change.
Re:Linus Torvalds: Apple's HFS+ is probably the worst file-s...
by fulafel on Tuesday January 13, 2015 @12:15PM
(#8881123)
Linus didn't write or port git for Windows or OS X. In fact for the longest time git on Windows required Cygwin. I doubt Linus was even much involved in git maintenance by the time native Windows support was merged... or was it ever? Is msysgit a fork?
It was already discussed to death here: https://news.ycombinator.com/item?id=8876319
http://support.microsoft.com/kb/100625
Case insensitivity like win32's is still kind of a mess, but it's unfair to paint the developers of NTFS as idiots when they actually got this right. Above the FS layer is the correct place to implement case insensitivity, because case insensitivity is a feature that aids users in selecting files, not a feature that aids applications in opening them or creating them.
Enforcing this invariant at the filesystem layer (with well defined semantics, which HFS+ at least documents semi-well) seems eminently reasonable to me.
That assumes you somehow created two files with names differing only in case, which I'd argue would happen only if you were naming your files with such generic names. Also, I don't think the fact that two files' names look similar should be any reason to treat them as the same - otherwise, would you suggest that the letter O and the number 0 (along with the letter o) should be considered identical for filenames?
(please note the tongue firmly planted in cheek, even if a lot of people actually DO work like this. which is terrifying)
>The maximum representable date is February 6, 2040 at 06:28:15 GMT.
http://dubeiko.com/development/FileSystems/HFSPLUS/tn1150.ht...
However, does anyone know the genesis behind which this particular date was chosen? It's far enough back to not cause any issues and appears to be close to the minimum date-time value obtained using the minimum value for signed 32-bit integer and the standard Unix Epoch (which would be around 13 Dec 1901), but other than that?
The 1900 epoch needs additional code to handle the fact that 1900 was not a leap year. Why not the UNIX epoch? Well that's another question entirely.
"Explains why the year 1900 is treated as a leap year in Excel 2000"
Mac OS was written in a time of memory scarcity; 1904 is just an easier choice for the epoch than 1900. That's also why they didn't choose the Unix epoch, as it would have required supporting multiple epochs, one for disk time stamps, and one to handle birth dates (time stamps on classic Mac OS are unsigned; there were no times before the epoch. And yes, there were no Mac users over 80 :-))
How about Straße, STRASSE and strasse?
For an American audience, how about Résumé and RESUME and resume?
How about Ⅸ and IX? Hint: https://en.wikipedia.org/wiki/Unicode_equivalence#Normalizat...
The answer to all that is that it depends on the user and their locale settings. So to get this right you would have to pass the locale settings into system calls that go into the filesystem so it can do the right thing on every call. But then what happens if the locale later gets changed? Before some file names may be considered equivalent, but with the new one they are different and things break. Ok how about a system wide locale setting that can't be changed? Are you going to require a disk reformat each time a different user is on the system, or a multilingual user who travels?
The right solution is exactly what Unix did in the first place. The filesystem stores names exactly as is without having to deal with locales. User space is then responsible for doing the right thing for a user. For example a word processor can treat Résumé and Resume as the same for Americans in file selection dialogs.
User space already has to deal with all this, for example by sorting file names. Here is how hard that is http://www.unicode.org/reports/tr10/ and a simple example is if z comes before or after ö. Or when showing a list of Swedish names to a German user do you use Swedish or German sort order?
A similar analogy is dealing with time. The best approach is to store the time as UTC in the filesystem and let user space show it in whatever way is relevant for the user. On the other hand if you store local time in the filesystem, you will end up in a world of hurt trying to work around that. (UTC to local time is a lossy conversion making local time back to UTC hard to work out.)
- Filesystem implementation (actual on disk bytes)
- Filesystem compatibility (adjustments to OS semantics)
- Generic filesystem layer in the kernel
- System call interface (between userland and kernel)
- Userland low level library (eg system call wrappers)
- Higher level libraries (eg libc)
- User interface libraries
- App level modules & libraries
The problem with the filesystem being case insensitive is that is the first level above, where there is virtually no context or user information. That is the hardest place to work out if the user considers Résumé and RESUME to be the same. The lower down the list the easier it gets. The important point is that how you store things and how you present does not need to be the same.
Command line tools typically use the libc level of things. It is perfectly possible to make that level so the system appears case insensitive (another poster mentioned Windows doing that).
Your Unix command line experience is very much affected by your locale. For example the ls command does the following:
- Sorts filenames
- Displays sizes (different locales have different conventions for floating point representation, digit grouping etc)
- Displays times
Environment variables like $LANG, $LC_*, $TZ etc control this in Unix.
Individual programs can also alter behaviour. For example bash can be configured to do case insensitive filename completion.
TLDR: while case insensitivity is a nice user experience for humans, it is awful for the lower layers including filesystems. The closer a program is to a human, the easier it is to give that nice user experience. There is no requirement for a case insensitive user experience to then make filesystems also implement that. And as my examples show, they couldn't do it correctly anyway.
I disagree. I don't think a program should make any assumptions about the filesystem namespace—it's up to the user how they want to configure it.
Case sensitivity may bother users sometimes, but the filesystem is not the right place to solve that problem.
Let's take other non-latin characters, like accented letters or cyrillic. Some of these alphabets have letters that act as 'a' but are not 'a'. Some of these alphabets have glyphs that look like 'a' but are not 'a'. All of these glyphs are encoded using different codes as seen by a machine.
If you want to support 'a' == 'A', then I could argue that I would want you to support 'a' == 'A' == <letter in cyrillic that means 'a'>. It is a very slippery slope, in my opinion. Logically, I would rather have 'a' and 'A' separated to avoid ambiguity, but feel free to disagree.
That's a pretty major downside, and I think the back story for his dislike of it.
To me it smacks of a rather egregious failure to grasp Postel's law. And case-sensitivity is just bad UX for the 99% of computer users who aren't programmers or IT; perhaps it makes sense on Linux but Windows and OS X are dealing with a different audience and Linus's failure to give that fact some credit makes him come across as tone deaf.
macadam.doc might be about a type of road construction.
Given how much Siracusa and Torvalds (to an extent) advocate for better user experience over ease of technical implementation, I feel I'm missing something. Our job as programmers is to encompass the complexity of the real world in our programs, not to make our users think like machines.
If differentiating between "file" and "File" is thinking like a machine, how isn't differentiating between "my files" and "myfiles" thinking like a machine?
Should "my files" and "myfiles" be collapsed to mean the same thing? What about "files"?
On the other hand, "myfiles" and "my files" have different numbers of characters. They sound different in your head, and you can easily point to the difference. It's the same as typing "alien" versus "a lien".
If "most people" cannot tell the difference, then I believe that would be a failing of the education system.
Spaces are lexically significant in the English language because they indicate the breaks between words. "My files" are two English words that convey meaning to English speakers; "myfiles" is not a word at all and is meaningful only if we charitably insert the spacing necessary to make them meaningful.
Capitalization does not impact meaning to English speakers in the same manner; "my files" and "My files" are understood to mean the same thing. Capitalization is in this case merely an artifact of sentence positioning and the like. It's orthographic convention and nothing more.
Thus, to make the user have to understand that what is a meaningless distinction in English is a meaningful distinction to the user is, by definition, forcing the user to think like a machine.
So, what you are saying, is that there is no semantic difference between "1 mm" and "1 Mm"? Or between "my next computer" and "my NeXT computer"? Or between "acorn" and "ACORN"?
At my day job, I work with people who have barely used a computer before. I could see an 80-year old woman having three versions of a letter she typed in Pages or Word, simply because she had mixed use capital letters, and then mistakening the versions and deleting the wrong file.
I could be totally making this up though. Anyone remember hearing this and can confirm?
NB: I use a case-sensitive HFS+ install for cross-compiling when it's necessary.
Also, this can trip up in several other contexts besides headers. For instance, someone renames a file in their repository, changing just a filename case. And then you'll have to scratch your head a bit to understand a git issue that will invariably arise when you pull in the changes. Unless you are fortunate enough not to have a deadline, you won't be so quick to reformat the machine.
This actually happened to me. In the end, it was quicker to spin up a linux vm than to reformat the machine.
EDIT: Also, you appear to have missed the part that says "There is a case sensitive option, but Apple actively hides it and doesn't support it." No support is really, really, really bad. Noone will deploy OSX machines formatted like that if it is unsupported.
- Creative Suite http://helpx.adobe.com/creative-suite/kb/error-case-sensitiv...
- Steam https://support.steampowered.com/kb_article.php?ref=8601-RYP...
- Unity http://forum.unity3d.com/threads/fatal-error-case-sensitive-...
Mac apps not running on case sensitive filesystems is probably more common than not.
While tastes are certainly subjective, the exploit caused by this brain damaged design was not subjective, nor a matter of taste.
...by default.
Sure, but he doesn't need to bitch about things just to bitch about things... it's not like case sensitivity is a problem for anything but poorly designed build systems.
It's kind of impressive that Apple and MS have managed to make such balls of crap work as well as they have.
If you want a good critique of HFS+, check one of John Siracusa's many rants[1].
Also, Gruber is not the author of Byword:
Even John Gruber of Daring Fireball and author of Byword…
[1] http://arstechnica.com/apple/2011/07/mac-os-x-10-7/12/
[1] http://daringfireball.net/projects/markdown/
[2] http://vesperapp.co/
So your Adobe example is flawed. They should be testing on case-sensitive volumes, but the vast majority of normal users don't want a file named README and readme in the same directory, and enforcing that invariant seems reasonable to me.
Which it does indeed, pretty badly. You would be hard pressed to find a worse FS still in use, excluding FAT, which will just never die.
Except the article doesn't contribute to the discussion and the quotes from Linus are unfortunately not newsworthy. Instead of a deep critique, perhaps pointing what it should learn from Btrfs and ZFS, he acuses Apple of not shipping a consumer case sensitive FS and criticizes its string and slash encoding, which although bad, are successfully abstracted even from most developers.
It then ends stating that Apple, like the weather, pays no attention to criticism. As empty an analysis as can be.
Windows and OS X use case-sensitive file-systems. That sucks. But if you are going to release software for those systems, you need to accept that that is the reality, and write your software accordingly. This is hardly the first issue Git has had due to this, Linus's time would be better spent fixing these issues rather than stamping his feet and expecting OS X and Windows to change.