News for hackers. Stuff that matters.
Re:Things you wish you didn't need to know about S3 by coolgoose on Friday May 31, 2024 @12:38AM (#40531553)
A lot of them are interesting points, but I am not sure I agree with the complaint the file system is case sensitive.

That's how it should be and I am annoyed at macos for not having it.

Re:Things you wish you didn't need to know about S3 by smt88 on Friday May 31, 2024 @01:06AM (#40531680)
> That's how it should be

Why? Windows is also not case-sensitive, so it's not like there's a near-universal convention that S3 is ignoring.

Case sensitivity in file names is surprising even to non-technical people. If someone says they sent you "Book Draft 1.docx" and you check your email to find "Book draft 1.docx," you don't say, "Hey! I think you sent me the wrong file!"

Casing is usually not meaningful even in written language. "Hi, how are you?" means the same thing as "hi, how are you?" Uppercase changes meaning only when distinguishing between proper and common nouns, which is rarely a concern we have with file names anyway.

Re:Things you wish you didn't need to know about S3 by josephcsible on Friday May 31, 2024 @01:20AM (#40531765)
> If someone says they sent you "Book Draft 1.docx" and you check your email to find "Book draft 1.docx," you don't say, "Hey! I think you sent me the wrong file!"

But you also wouldn't say that if they sent "Book - Draft 1.docx", "Book Draft I.docx", "BookDraft1.docx", "Book_Draft_1.docx", or "Book Draft 1.doc", and surely you wouldn't want a filesystem to treat all of them as the same.

Re:Things you wish you didn't need to know about S3 by quickslowdown on Friday May 31, 2024 @01:58AM (#40531938)
This is a personal reason, but the reason I prefer case sensitive directory names is I can make "logical groupings" for things. So, my python git directory might have "Projects/" and "Packages/," and the capitalization not only makes them stand out as a sort of "root path" for whatever's underneath, but the capitalization makes me conscious of the commands I'm typing with that path. I can't just autopilot a path name, I have to consciously hit shift when tab completion stops working.

That might sound like a dumb reason, but it's kept me from moving things into the wrong directory, or accidentally removing a directory multiple times in the past.

I also use Windows regularly and it really isn't a hindrance, so maybe I wouldn't actually be bothered if everything was case sensitive.

Re:Things you wish you didn't need to know about S3 by pwagland on Friday May 31, 2024 @08:47AM (#40534450)
TBF, you don't need case sensitive FS for that, just case retaining is enough. And then have the option on how to sort it.
Re:Things you wish you didn't need to know about S3 by josephcsible on Friday May 31, 2024 @12:15PM (#40536952)
Don't you need case sensitivity for this part?

> I can't just autopilot a path name, I have to consciously hit shift when tab completion stops working.

On a system that's case retaining but not case sensitive, wouldn't "pr" autocomplete to "Projects"?

Re:Things you wish you didn't need to know about S3 by zoky on Friday May 31, 2024 @08:58PM (#40541889)
No, MacOS doesn’t do that. `cat Foo` and `cat foo` will both work, but only the first one will tab complete if the file is called `Foo`.
Re:Things you wish you didn't need to know about S3 by chuckadams on Sunday June 02, 2024 @12:36PM (#40555400)
zsh tab-completed both just fine, preserving the case in both. I’d have preferred it corrected the case, but meh.
Re:Things you wish you didn't need to know about S3 by notjoemama on Friday May 31, 2024 @11:51AM (#40536683)
I like it! That's a great idea.

To me, this sounds like a great practice for terminal environments but may be less intuitive when using file system apps. I could easily overlook a single letter capitalization in a GUI view of many directories. Maybe it's because at a terminal the "view" into the file system is narrow?

Now I'm wondering how I can use this in my docker images. I mean that might irritate devops. Well, maybe they'll like it too. Man, thanks for posting this.

Re:Things you wish you didn't need to know about S3 by cmcconomy on Friday May 31, 2024 @01:34AM (#40531828)
you called it - those are different situations all right
Re:Things you wish you didn't need to know about S3 by stronglikedan on Friday May 31, 2024 @11:00AM (#40536062)
Capitalization isn't part of grammar. Those examples are different strings of characters altogether.
Re:Things you wish you didn't need to know about S3 by otteromkram on Friday May 31, 2024 @11:52AM (#40536704)
I'll augment your statement by noting that punctuation is also not part of grammar.
Re:Things you wish you didn't need to know about S3 by selenography on Friday May 31, 2024 @01:22PM (#40537847)
Another classic counterexample: "This book is dedicated to my parents, Ayn Rand, and God." "This book is dedicated to my parents, Ayn Rand and God."
Re:Things you wish you didn't need to know about S3 by selenography on Friday May 31, 2024 @01:06PM (#40537618)
The classic, if crude, counterexample: "I helped my uncle Jack off a horse."

(The uncapitalized version doesn't just have different semantics; it has a completely different parse-tree!)

Re:Things you wish you didn't need to know about S3 by ooterness on Friday May 31, 2024 @11:28AM (#40536423)
You have to draw the line somewhere, but I do appreciate when the UI sorts "Book draft 2" before "Book draft 11". That requires nontrivial tokenization logic and inference, but simple heuristics can be right often enough to be useful.

On that note, ASCIIbetical sort is never the right answer. There is a special place in hell for any human-facing UI that sorts "Zook draft 1" between "Book draft 1" and "book draft 1".

Re:Things you wish you didn't need to know about S3 by saghm on Friday May 31, 2024 @12:52PM (#40537408)
I think there's a pretty big difference between how the UI orders things and how the filesystem treats things as equivalent. A filesystem treating names case sensitively doesn't prevent the UI from tokenizing the names in any other arbitrary way
Re:Things you wish you didn't need to know about S3 by yencabulator on Friday May 31, 2024 @05:22PM (#40540406)
And that line, at least for sorting, belongs firmly outside the filesystem.

Sorting is locale-dependent. Whether a letter-with-dots sorts next to letter-without-dots or somewhere completely different has no correct global answer.

Re:Things you wish you didn't need to know about S3 by lultimouomo on Friday May 31, 2024 @01:46AM (#40531882)
Case insensitive matching is a surprisingly complicated, locale-dependent affair. Should I.txt and i.txt match? (Note that the first file is not named I.txt).

Case insensitive filesystems make about as much sense as ASCII-only filenames.

Re:Things you wish you didn't need to know about S3 by HeatrayEnjoyer on Friday May 31, 2024 @03:24AM (#40532327)
How would locale matter?
Re:Things you wish you didn't need to know about S3 by ckolkey on Friday May 31, 2024 @03:40AM (#40532413)
Off the top of my head, in turkish, `i` doesn't become `I`, it becomes `İ`. And `ı` is the lower case version of `I`
Re:Things you wish you didn't need to know about S3 by Dylan16807 on Friday May 31, 2024 @09:11PM (#40541969)
You don't need to decide how to upper or lower case a character to be insensitive to case, though. Treating them all as matching isn't a terrible option.
Re:Things you wish you didn't need to know about S3 by GolDDranks on Friday May 31, 2024 @03:34AM (#40532383)
For example, it depends on the locale if the capitalized form of ß is ß or SS.
Re:Things you wish you didn't need to know about S3 by jodrellblank on Friday May 31, 2024 @07:29AM (#40533709)
And yet case insensitive file name matching / string matching is one of my favourite windows features. It’s enormously convenient. An order of magnitude more convenient than the edge cases it causes me.

People aren’t ASCII or UTF-8 machines; “e” and “E” are the same character, that they are different ASCII codes is a behind the scenes implementation detail.

(That said, S3 isn’t a filesystem, it’s more like a web hashtable key-to-blob storage)

Re:Things you wish you didn't need to know about S3 by lultimouomo on Friday May 31, 2024 @08:10AM (#40534059)
> People aren’t ASCII or UTF-8 machines; “e” and “E” are the same character

They are the same character to you, a native speaker of a Western language written in a latin script. They are the same to you because you are, in fact, an ASCII machine. Many many people in the world are not.

Re:Things you wish you didn't need to know about S3 by jodrellblank on Friday May 31, 2024 @09:29PM (#40542084)
They are the same to me, they are different in ASCII, therefore I am not an ASCII machine. To me, the person using the computer to do work. Not the person wanting to do extra work to support the computer's internal leaky abstractions of data storage.

Your position, the position of too many people, is that I a native speaker of English etc. should not be allowed to have a computer working how English works because somewhere, someone else is different. This is like saying I shouldn't be allowed an English spell checker because there are other people who speak other languages.

Re:Things you wish you didn't need to know about S3 by kaashif on Friday May 31, 2024 @09:01AM (#40534623)
> “e” and “E” are the same character

They don't look like the same character to me. A character is a written symbol. These are different symbols.

What definition of "character" are you using where they're the same character?

I haven't ruled out that I am wrong, this is a naive comment.

Re:Things you wish you didn't need to know about S3 by tacostakohashi on Friday May 31, 2024 @09:13AM (#40534732)
You are confusing characters with glyphs. A glyph is a written symbol.
Re:Things you wish you didn't need to know about S3 by taeric on Friday May 31, 2024 @10:34AM (#40535726)
And you seem to be conflating characters and letters. There are fewer letters in the standard alphabet than we have characters for the same, largely because we do distinguish between some letter forms.

I suppose you could imagine a world where we don't, in fact, do this with just the character code. Seems fairly different from where we are, though?

Re:Things you wish you didn't need to know about S3 by kaashif on Friday May 31, 2024 @09:31AM (#40534895)
I thought that if they're different glyphs they're different characters.

Surely the fact that they're represented differently in ASCII means ASCII regards them as different characters?

Whether they're different glyphs or not depends on the font.

Re:Things you wish you didn't need to know about S3 by Zambyte on Friday May 31, 2024 @06:40PM (#40541077)
Are the words hello and HELLO spelled differently? I am pretty squarely in the camp that filesystems should be case sensitive (perhaps with an insensitive shell on top), but I would not consider those two words as having a different spelling. To me that means they are the same sequence of characters.
Re:Things you wish you didn't need to know about S3 by jodrellblank on Friday May 31, 2024 @09:33PM (#40542107)
When you press the "E" key on a US keyboard and "e" comes out, do you return the keyboard because it's broken? If not, then you know what definition I'm using even if I misnamed it.
Re:Things you wish you didn't need to know about S3 by Zambyte on Friday May 31, 2024 @09:47AM (#40535105)
> It’s enormously convenient. An order of magnitude more convenient than the edge cases it causes me.

Can you elaborate on this?

Re:Things you wish you didn't need to know about S3 by jodrellblank on Friday May 31, 2024 @10:04PM (#40542275)
Every single time I type a path or filename (or server name) in the shell, or in Windows explorer, or in a file -> open or save dialog, I don't trip over capitalization. If I want to glob files with an 'ecks' in the name I can write *x* and not have to do it twice for *x* and *X*.

When I look at a directory listing and it has "XF86Config", I read it in my head as "ecks eff eight six config" not "caps X caps F num eight num six initial cap Config" and I can type what I read and don't have to double-check if it's config or Config.

Tab completion works if I type x<tab> instead of blanking on me and making me double check and type X<tab>.

Case sensitivity is like walking down a corridor and someone hitting you to a stop every few steps and saying "you're walking Left Right Left Right but you should be walking Right Left Right Left".

Case insensitivity is like walking down a corridor.

In PowerShell, some cmdlets are named like Add-VpnConnection where the initialism drops to lowercase after the first letter, others like Get-VMCheckpoint where the initialism stays capitalised, others mixed like Add-NetIPHttpsCertBinding where IP is caps but HTTPS isn't - any capitalisation works for running them or searching them with get-command or tab-completing them. I don't have to care. I don't have to memorise it, type it, pay attention to it, trip over it, I don't have to care!.

"A programming language is low level when its programs require attention to the irrelevant." - Alan Perlis.

DNS names - ping GOOGLE.COM works, HTTPS://NEWS.YCOMBINATOR.COM works in a browser, MAC addresses are rendered with caps or lowercase hex on different devices, so are IPv6 addresses in hex format, email addresses - firstname.lastname or Firstname.Lastname is likely to work. File and directory access behaving the same means it's less bother. In Vim I :set ignorecase.

In PowerShell even string equality check is case insensitive by default, string match and split too. When I'm doing something like searching a log I want to see the english word 'error' if it's 'error' or 'ERROR' or 'Error' and I don't know what it is.

If I say the name of a document to a person I don't spell out the capitalisation. I don't want to have to do that to the computer, especially because there is almost no reason to have "Internal site 2 Network Diagram" and "INTERNAL site 2 network diagram" and "internal site 2 NETWORK DIAGRAM" in the same folder (and if there were, I couldn't easily keep them apart in my head).

All the time in command prompt shell, I press shift less often, type less, change directories and work with files more smoothly with less tripping over hurdles and being forced to stop and doublecheck what I'm tripping over when I read "word" and typed "word" and it didn't work.

On the other hand, the edge cases it causes me are ... well, I can't think of any because I don't want to put many files differing only by case in one directory. Maybe uncompressing an archive which has two files which clash? I can't remember that happening. Maybe moving a script to a case sensitive system? I don't do that often. In PowerShell, method calls are case insensitive. C# has "string".StartsWith() and JavaScript has .startsWith() and PowerShell will take .startswith() or .StartsWith or .Startswith or anything else. That occasionally clashes if there's a class with the same name in different case but that's rare, even.

In short, the computer pays attention to trivia so I don't have to. That's the right way round. It's about the best/simplest implementation of Do What I Mean (DWIM) that's almost always correct and almost never wrong.

Re:Things you wish you didn't need to know about S3 by jasomill on Saturday June 01, 2024 @01:20AM (#40543097)
If I want to glob files with an 'ecks' in the name I can write x* and not have to do it twice for x and X.*

Adding

  shopt -s nocaseglob
to ~/.bashrc makes globbing case-insensitive in bash[1].

Tab completion works if I type x<tab> instead of blanking on me and making me double check and type X<tab>.

Adding

  set completion-ignore-case on
to ~/.inputrc makes completion case-insensitive in bash (and other programs that use libreadline)[2].

Both options are independent of file system case-sensitivity.

[1] https://www.gnu.org/software/bash/manual/html_node/The-Shopt...

[2] https://tiswww.cwru.edu/php/chet/readline/readline.html#inde...

Re:Things you wish you didn't need to know about S3 by jodrellblank on Monday June 03, 2024 @07:33PM (#40568979)
> Both options are independent of file system case-sensitivity.

In Windows world it works everywhere, in any win32 program - file open dialogs, et al. Here you have to have it built in to every tool. (and windows doesn't do it at the filesystem layer)

Re:Things you wish you didn't need to know about S3 by Zambyte on Sunday June 02, 2024 @07:57PM (#40558104)
None of these are the filesystem though, they are all abstractions over the file system that could easily implement case insensitivity, and as a sibling comment pointed out, actually do in many cases. I'm perfectly fine with the idea of interacting with files using a case insensitive interface. I just don't feel like it should be the job of the filesystem to enforce case insensitivity.
Re:Things you wish you didn't need to know about S3 by segfaltnh on Friday May 31, 2024 @11:15AM (#40536252)
Complicated for who? I've little pity for developers and kernels ease of life as a user.
Re:Things you wish you didn't need to know about S3 by raincole on Friday May 31, 2024 @03:29AM (#40532352)
> Casing is usually not meaningful even in written language. "Hi, how are you?" means the same thing as "hi, how are you?" Uppercase changes meaning only when distinguishing between proper and common nouns, which is rarely a concern we have with file names anyway.

The number of spaces is usually not meaningful in written language. "Hi, how are you?" means the same thing as "Hi, how are you ?". I don't think it's a good reason to make file system ignore space characters.

Re:Things you wish you didn't need to know about S3 by blahgeek on Friday May 31, 2024 @01:57AM (#40531930)
No offense, but I think that's a very western-centric view. Your example only make sense when the user is familiar to English (or other western languages, I guess). To me personally, I find it strange that "D.txt" and "d.txt" means the same file, since they are two very different characters. Likewise, I think you would also go crazy if I tell you "ア.txt" and "あ.txt" means the same file (which is hiragana and katakana for A respectively, which in a sense is equivalent to uppercase and lowercase in Japanese), or "一.txt" and "壹.txt" means the same file (which both means number 1 in Chinese, we call the latter one literally "uppercase number")
Re:Things you wish you didn't need to know about S3 by ClumsyPilot on Friday May 31, 2024 @04:16AM (#40532586)
Those are all the same, I don’t see an issue
Re:Things you wish you didn't need to know about S3 by n_plus_1_acc on Friday May 31, 2024 @07:06AM (#40533525)
What if Unicode updates some capitalization rules in the next version, and after an OS updates some filenames now collide and one of the is inaccessible?
Re:Things you wish you didn't need to know about S3 by taeric on Friday May 31, 2024 @10:37AM (#40535782)
Agreed, and you could even take this into "1.txt" being the same as "One.txt". Which, I mean, fair that I would expect a speech system to find either if I speak "One dot t x t". But, it would also find "Won.txt" and trying to bridge the phonetic to the symbolic is going to be obviously fraught with trouble.
Re:Things you wish you didn't need to know about S3 by JohnFen on Friday May 31, 2024 @12:06PM (#40536849)
> To me personally, I find it strange that "D.txt" and "d.txt" means the same file, since they are two very different characters.

As a native English speaker, I agree with this.

Re:Things you wish you didn't need to know about S3 by up2isomorphism on Friday May 31, 2024 @02:12AM (#40532004)
Then why don’t you just always write in lower case?
Re:Things you wish you didn't need to know about S3 by pkulak on Friday May 31, 2024 @01:31AM (#40531812)
Yeah, but that little bit of user friendliness ruins the file system for file system things. Now you need “registries” and other, secondary file systems to do file system things because you can’t even use base64 in file names. Make your file browsing app case insensitive, if that’s what you want. Don’t build inferiority down to the core.
Re:Things you wish you didn't need to know about S3 by re-thc on Friday May 31, 2024 @02:01AM (#40531947)
> you don't say, "Hey! I think you sent me the wrong file!"

You do! Why not?

It's a big trap. A lot of counterfeit, spam, phishing etc go by this method. You end up buying a fake brand or getting tricked.

Re:Things you wish you didn't need to know about S3 by fortran77 on Friday May 31, 2024 @01:47AM (#40531885)
> Why? Windows is also not case-sensitive, so it's not like there's a near-universal convention that S3 is ignoring.

You can enable case sensitivity for directories or disks, but this is usually done for special cases, like git repos

Re:Things you wish you didn't need to know about S3 by Lutger on Friday May 31, 2024 @04:56AM (#40532797)
There are just not the same characters. A filesystem should not have an opinion on what strings of characters _mean_ the same. It is the wrong level of abstraction.

filenames might even not be words at all, and surely not limited to English. We shouldn't implement rules and conventions from spoken English at a filesystem level, certainly not S3.

MacOS and Windows are just wrong about this.

Re:Things you wish you didn't need to know about S3 by jodrellblank on Friday May 31, 2024 @06:34AM (#40533337)
Windows doesn’t have it at the file system layer, NTFS is case sensitive. Windows has it at the Win32 subsystem layer, see replies and comments here:

https://superuser.com/questions/364057/

Re:Things you wish you didn't need to know about S3 by lelanthran on Friday May 31, 2024 @07:44AM (#40533819)
> Windows doesn’t have it at the file system layer, NTFS is case sensitive.

I think the common phrasing is "case-aware, not case-sensitive".

Re:Things you wish you didn't need to know about S3 by jasomill on Friday May 31, 2024 @05:58PM (#40540745)
No, NTFS has always been at least optionally case sensitive; current Windows versions even allow case-sensitivity to be controlled on a per-directory basis[1], which even works for (some) Win32 programs:

  Microsoft Windows [Version 10.0.22631.3593]
  (c) Microsoft Corporation. All rights reserved.
  
  C:\Users\jtm>mkdir foo
  
  C:\Users\jtm>fsutil file setCaseSensitiveInfo foo
  Case sensitive attribute on directory C:\Users\jtm\foo is enabled.
  
  C:\Users\jtm>echo bar > foo\bar.txt
  
  C:\Users\jtm>echo Bar > foo\Bar.txt
  
  C:\Users\jtm>dir foo
   Volume in drive C is Aristotle-Win
   Volume Serial Number is E4AE-428B
  
   Directory of C:\Users\jtm\foo
  
  2024-05-31  17:55    <DIR>          .
  2024-05-31  17:55    <DIR>          ..
  2024-05-31  17:55                 6 Bar.txt
  2024-05-31  17:55                 6 bar.txt
                 2 File(s)             12 bytes
                 2 Dir(s)  41,524,133,888 bytes free
  
  C:\Users\jtm>type foo\bar.txt
  bar
  
  C:\Users\jtm>type foo\Bar.txt
  Bar
[1] https://learn.microsoft.com/en-us/windows/wsl/case-sensitivi...
Re:Things you wish you didn't need to know about S3 by marcosdumay on Friday May 31, 2024 @10:39AM (#40535805)
That's way worse than just putting it on the file system.

Now you have hidden information, that you can't ever change, and may or may not impact whatever you are doing.

Re:Things you wish you didn't need to know about S3 by jodrellblank on Friday May 31, 2024 @10:15PM (#40542312)
What hidden information that you can't ever change?
Re:Things you wish you didn't need to know about S3 by RockRobotRock on Sunday June 02, 2024 @04:15PM (#40556915)
I think what they mean is if you somehow had two files with the same name but different cases (as NTFS supports this) it would be impossible to fix with win32 calls
Re:Things you wish you didn't need to know about S3 by ozim on Friday May 31, 2024 @06:16AM (#40533248)
You look from technical perspective. From average person perspective, even files are too much technicality to deal with.

As a user I want my work to be preserved, I want to view my photos and I want system to know where is my funny foto of my dog I did last Christmas.

As a developer I need an identifier for a resource and I am not going to let user decide on the Id of the resource, I put files in system as GUID and keep whatever user feels as metadata.

Exposing average people to the filesystem is wrong level of abstraction. That is why iOS and Android apps are going that way - but as I myself am used to dealing with files it annoys me that I cannot have that level of control, but I accept that I am quite technical.

Re:Things you wish you didn't need to know about S3 by graemep on Friday May 31, 2024 @07:12AM (#40533559)
Dealing with files used to be something everyone interacting with computers had to do. It is something average people can do.

I think too much abstraction is a mistake and adds a lot of unneeded complexity.

People should learn something about technology they use. If you want to drive, you need understand how steering wheels work, if you want to drive a manual car (usual where I live and have lived) then you need to know how to work a gear stick and the effect of changing gear.

Re:Things you wish you didn't need to know about S3 by mgkimsal on Friday May 31, 2024 @11:12AM (#40536222)
> used to be something everyone interacting with computers had to do

There were far fewer people 'interacting with computers' at that level years ago.

Re:Things you wish you didn't need to know about S3 by graemep on Friday May 31, 2024 @06:50PM (#40541154)
Everyone with an office job was still a lot of people though.
Re:Things you wish you didn't need to know about S3 by mgkimsal on Sunday June 02, 2024 @02:13PM (#40556141)
I'm not even sure 'everyone with an office job' had a computer. It certainly wasn't true 35 years ago. An office might have a computer or two, but not everyone had one, nor was everyone expected to use it.
Re:Things you wish you didn't need to know about S3 by frizlab on Friday May 31, 2024 @06:04AM (#40533175)
And so should we be able to have “é.txt” and “é.txt” in the same directory (with a different UTF-8 normalization?) What encoding should we use BTW?

I’m not advocating for case-insensitive fs (literally the first thing I do when I get a Mac is reformat it to be on a case-sensitive fs), but things are not that simple either.

Re:Things you wish you didn't need to know about S3 by marcosdumay on Friday May 31, 2024 @10:41AM (#40535840)
> And so should we be able to have “é.txt” and “é.txt” in the same directory

That's what Linux does.

It does create some problems that seem to never happen on practice, while it avoids some problems that seem to happen once in a while. So yeah, I'd say it's a good idea.

Re:Things you wish you didn't need to know about S3 by zarzavat on Friday May 31, 2024 @05:28AM (#40532965)
File systems are not user interfaces. They are interfaces between programs and storage. Case insensitive is much better for programs.

The user shell can choose however it wants to handle file names, a case sensitive file system does not prevent the shell from handling file names case insensitively.

Re:Things you wish you didn't need to know about S3 by zarzavat on Friday May 31, 2024 @08:25AM (#40534203)
> case insensitive is much better for programs

Can’t edit my comment. I mean case sensitive is better for programs, of course.

Re:Things you wish you didn't need to know about S3 by sergeykish on Friday May 31, 2024 @05:58AM (#40533143)
If someone says they sent you "Book Draft 1.docx" and you check your email to find "Ⓑⓞⓞⓚ Ⓓⓡⓐⓕⓣ ①.ⓓⓞⓒⓧ", "฿ØØ₭ ĐⱤ₳₣₮ 1.ĐØ₵Ӿ" - these are different files.
Re:Things you wish you didn't need to know about S3 by throwaway211 on Friday May 31, 2024 @09:28AM (#40534873)
I have a feeling you enjoyed that character set lookup. I know I did seeing it.
Re:Things you wish you didn't need to know about S3 by Izkata on Friday May 31, 2024 @11:45AM (#40536621)
Ages ago on Flowdock at work (a chat webapp kind of like Slack that no longer exists), I used the circle ones for a short time as my nickname, and no one could @ me.
Re:Things you wish you didn't need to know about S3 by koolba on Friday May 31, 2024 @06:50AM (#40533436)
> Casing is usually not meaningful even in written language. "Hi, how are you?"

How about: “pay bill” vs “pay Bill”?

“Usually” in the context of automated systems design is a recipe for disaster.

Computers store bytes, not characters that may just happen to mean similar things. Shall we merge ümlauts? How to handle ß?

Re:Things you wish you didn't need to know about S3 by lathiat on Friday May 31, 2024 @08:58AM (#40534583)
Case Preserving and Case Sensitive are subtly two different things. Most case insensitive file systems are case preserving and whatever the UTF8 equivalent is I forget the name.
Re:Things you wish you didn't need to know about S3 by nostrebored on Friday May 31, 2024 @11:02AM (#40536089)
But the gps point is that assuming you know the semantic meaning of the case and if retention is enough is silly.

Assuming case insensitivity is bizarre.

Re:Things you wish you didn't need to know about S3 by mdaniel on Sunday June 02, 2024 @12:32PM (#40555367)
heh, I especially enjoy that in a huge thread about how capitalization does and doesn't matter, "gps point" was not, in fact, concerning some coordinates of the global positioning system but rather "GP's point". I first chalked it up to some autocomplete artifact but then realized what was actually happening
Re:Things you wish you didn't need to know about S3 by ooterness on Friday May 31, 2024 @11:18AM (#40536293)
Perfect is the enemy of good. It is quite acceptable to streamline the easy cases now and the hard cases later or never.
Re:Things you wish you didn't need to know about S3 by paulddraper on Friday May 31, 2024 @09:22AM (#40534807)
> Why?

Because it introduces extra complexity.

Now, "Cache" and "cache" are the same, but also...different because you'd care if Cache suddenly became cache.

Re:Things you wish you didn't need to know about S3 by rzwitserloot on Friday May 31, 2024 @09:36AM (#40534953)
Also note that 'are these 2 words case insensitively equal' is impossible without knowing what locale rules to apply. And given that people's personal names tend to have the property that any locale rules that must be applied are _the locale that their name originates from_, and that no repository of names I am aware of stores locale along with the name, that means what you want, is impossible.

In line with case insensitivity, do you think `müller` and `muller` should boil down to for example the same username for login purposes?

That's... tricky. In german, the standard way to transliterate names to strict ASCII would be to turn `müller` into `mueller`. In swiss german that is in fact mandatory. Nobody in switserland is named `müller` but you'll find loads of `mueller`s. Except.. there _are_ `müller` in switzerland - probably german citizens living ther.

So, just normalize `ü` to `ue`, easy, right? Except that one doesn't reverse all that well, but that's probably allright. But - no. In other locales, the asciification of `ü` is not `ue`. For example, `Sjögren` is swedish and that transliterates to `sjogren`, not `sjoegren`.

Bringing it back to casing: Given the string `IJSSELMEER`, if I want to title case that, the correct output is presumably `IJsselmeer`. Yes, that's an intentional capital I capital J. Because it's a dutch word and that's how it goes. In an optimal world, there is a separate unicode glyph for the dutch IJ as a single letter so we can stick with the simple rule of 'to title case a string, upper case the first glyph and lowercase all others, until you see a space glyph, in which case, uppercase the next'. But the dutch were using computers fairly early on and went with using the I and the J (plain ascii) for this stuff.

And then we get into well trodden ground: In turkish, there is both a dotted and a dotless i. For... reasons they use plain jane ascii `i` for lowercase dotted i and plain jane ascii `I` for uppercase dotless I. But they have fancy non-ascii unicode glyphs for 'dotted capital I' and 'dotless lowercase i'.

So, __in turkish__, `IZMIR` is not case-insensitive equal to `izmir`. Instead, `İZMIR` and `izmir` are equal.

I don't know how to solve this without either bringing in hard AI (as in, a system that recognizes 'müller' as a common german surname and treats it as equal to 'mueller', but it would not treat `xyzmü` equal to `xyzmue` - and treats IZMIR as not equal to izmir, because it recognizes it as the name of a major turkish city and thus applies turkish locale rules), or decreeing to the internet: "get lost with your fancypants non-US/UKian weird word stuff. Fix your language or something" - which, well, most cultures aren't going to like.

'files are case insensitive' sidesteps alllllll of this.

Re:Things you wish you didn't need to know about S3 by JohnFen on Friday May 31, 2024 @11:59AM (#40536776)
> Why? Windows is also not case-sensitive, so it's not like there's a near-universal convention that S3 is ignoring.

Not sure why what Windows does is relevant to this, honestly. Personally, I strongly prefer case sensitivity with filenames, but the lack of it isn't a dealbreaker or anything.

Re:Things you wish you didn't need to know about S3 by CamperBob2 on Friday May 31, 2024 @12:03PM (#40536819)
What are some of the advantages of case sensitivity? Are you saying you actually want to save "Book draft 1.docx" and "Book Draft 1.docx" as two separate files? That just sounds like asking for trouble.
Re:Things you wish you didn't need to know about S3 by JohnFen on Friday May 31, 2024 @12:14PM (#40536944)
The advantages that I value are that case sensitivity means I can use shorter filenames, it makes it easier to generate programmatic filenames, and I can use case to help in organizing my files.

> Are you saying you actually want to save "Book draft 1.docx" and "Book Draft 1.docx" as two separate files?

That's a situation where sensitivity can cause difficulty, yes, but for me personally, that's a minor confusion that is easy to avoid or correct. Everything is a tradeoff, and for me, putting up with that annoyance is well worth the benefits of case sensitivity.

I do totally understand that others will have different tradeoffs that fit them better. I'm not taking away from that at all. But saying "case sensitivity is undesirable" in a broad sense is no more accurate than saying "case sensitivity is desirable" in a broad sense.

Personally, I think the ideal tradeoff is for the filesystem to be case sensitive, but have the user interfaces to that file system be able to make everything behave as case-insensitive if that's what the user prefers.

Re:Things you wish you didn't need to know about S3 by Dylan16807 on Friday May 31, 2024 @09:22PM (#40542040)
Even with only one case, just four characters is enough for a million files. How much benefit are you really getting from case sensitivity?
Re:Things you wish you didn't need to know about S3 by marssaxman on Friday May 31, 2024 @11:33PM (#40542662)
Unicode case folding is a complicated algorithm, and its definition is subject to change with updated Unicode versions. It's nice not to have to worry about that.
Re:Things you wish you didn't need to know about S3 by Dylan16807 on Saturday June 01, 2024 @12:48AM (#40542965)
Okay, but I don't think this has anything to do with the use case JohnFen mentioned or my questions about it.

If your goal is super easy filename generation then you're probably not going to leave ASCII.

And if you do go beyond ASCII for filename packing/generating, then you should instead use many thousands of CJK characters that don't have any concept of case at all. Bypass the question of case sensitivity entirely.

Re:Things you wish you didn't need to know about S3 by JohnFen on Saturday June 01, 2024 @08:35AM (#40545217)
Enough that I prefer it. If that were the only advantage, I'd only slightly prefer it. But being able to use case as a differentiator in filenames intended for me to read is something I find even more valuable.

A filesystem not being case sensitive isn't a dealbreaker or anything. I just prefer case sensitivity because it increases flexibility and readability for me, and has no downsides that I consider significant.

Re:Things you wish you didn't need to know about S3 by josephcsible on Friday May 31, 2024 @01:18AM (#40531745)
macOS has case sensitivity. It's just off by default and is a major pain to turn on. You have to either reinstall from scratch onto a case-sensitive partition, or change the "com.apple.backupd.VolumeIsCaseSensitive" xattr from 0 to 1 in a Time Machine backup of your whole system and then restore everything from it.
Re:Things you wish you didn't need to know about S3 by JonathonW on Friday May 31, 2024 @01:28AM (#40531799)
You shouldn't do this if you value things working, though-- this is a pretty rare configuration (you have to go way out of your way to get it), so many developers won't test with it and it's not unheard of for applications to break on case-sensitive filesystems.

If you absolutely need case-sensitivity for a specific application or a specific project, it's worth seeing if you can do what you need to do within a case-sensitive disk image. It may not work for every use-case where you might need a case-sensitive FS, but if it does work for you, it avoids the need to reinstall to make the switch to a case-sensitive FS, and should keep most applications from misbehaving because the root FS is case-sensitive.

Re:Things you wish you didn't need to know about S3 by josephcsible on Friday May 31, 2024 @01:46AM (#40531880)
Most things work fine, but it will break (or at least did break at one point) Steam, Unreal Engine, Microsoft OneDrive, and Adobe Creative Cloud. I'm rather surprised about the first two, since they both support Linux with case-sensitive filesystems. I took the opposite approach as you, though: making my root filesystem case-sensitive and creating a case-insensitive disk image if I ever needed those broken programs.
Re:Things you wish you didn't need to know about S3 by danielheath on Friday May 31, 2024 @02:19AM (#40532040)
I keep a case sensitive volume around to checkout code repositories into. For everything else I prefer it insensitive, but my code is being deployed to a case sensitive fs.
Re:Things you wish you didn't need to know about S3 by jimvdv on Friday May 31, 2024 @07:21AM (#40533648)
I just mount a case sensitive Apple File System disk image at ~/code, works well
Re:Things you wish you didn't need to know about S3 by dagrz on Friday May 31, 2024 @03:08AM (#40532243)
Author here. There's no complaint. It's an observation rather than an absolute good or bad. It's something you have the consider in designing your application.
Re:Things you wish you didn't need to know about S3 by pjmlp on Friday May 31, 2024 @02:11AM (#40532001)
UNIX is one of the few OSes that went down that path.

Others do offer the option if one is so inclined, and also prepared to deal with legacy software that expects otherwise.

Which is also the case with macOS, because although it is a UNIX, OS X had to catter to the Mac OS developer community used to HFS and HFS+.

Re:Things you wish you didn't need to know about S3 by codeflo on Friday May 31, 2024 @07:46AM (#40533850)
Curiously, iOS and iPadOS file systems are case-sensitive. There's less legacy there, so they opted to do the correct thing.
Re:Things you wish you didn't need to know about S3 by larkost on Friday May 31, 2024 @01:15PM (#40537742)
Please don't call this "the correct thing". Please recognize that there are multiple, valid, points of view. What you meant is "the thing I like".
Re:Things you wish you didn't need to know about S3 by codeflo on Friday May 31, 2024 @05:32PM (#40540511)
It's not "the thing I like", it's the better tradeoff. It's less complex and thus more secure (due to reduced API surface and fewer opportunities to make lookup mistakes or to mistakenly choose the wrong out of dozens of kinds of case-insensitive comparison in a security decision). It's also potentially faster, and more compatible with other Unixes.
Re:Things you wish you didn't need to know about S3 by sholladay on Friday May 31, 2024 @01:03AM (#40531663)
macOS is case preserving, though. To me, it’s the best of both worlds. You can stylize your file names and they will be respected, but you don’t have to remember how they are stylized when you are searching for or processing them because search is case insensitive.
Re:Things you wish you didn't need to know about S3 by smt88 on Friday May 31, 2024 @01:06AM (#40531683)
Windows is also case-insensitive but case-preserving
Re:Things you wish you didn't need to know about S3 by self_awareness on Friday May 31, 2024 @01:51AM (#40531911)
Maybe macOS is case-preserving, but it's not encoding-preserving. If you create a file using a composed UTF-8 "A", the filesystem layer will decompose the string to another form, and create the filename using that decomposed form "B". Of course, "A" and "B" when compared can be completely different (even when compared using case insensitivity enabled), yet will point to the same file.

More info here: https://eclecticlight.co/2021/05/08/explainer-unicode-normal...

Re:Things you wish you didn't need to know about S3 by halostatue on Friday May 31, 2024 @12:38PM (#40537235)
macOS (Darwin) has always written filenames as NFD via the macOS APIs. The underlying POSIX-ish APIs may not do NFD, but Finder and every native macOS GUI program gets files in NFD format.
Re:Things you wish you didn't need to know about S3 by self_awareness on Friday May 31, 2024 @04:55PM (#40540133)
And this is different from what I wrote how exactly?

Btw, this has nothing to do with POSIX vs Finder, it's a filesystem driver trait, at least for HFS+, but probably for APFS as well.

Re:Things you wish you didn't need to know about S3 by alt227 on Friday May 31, 2024 @08:13AM (#40534089)
IMO this is the worst possible solution, as what you are seeing is not what you are getting. You do not actually know what is being stored on the file system, and your searches are fuzzy rather than precise.
Re:Things you wish you didn't need to know about S3 by filleduchaos on Friday May 31, 2024 @12:04PM (#40536825)
> You do not actually know what is being stored on the file system

This makes no sense to me. Did the user's file explorer (whether GUI or via commands like `ls`) suddenly disappear?

Re:Things you wish you didn't need to know about S3 by pavlov on Friday May 31, 2024 @01:26AM (#40531789)
Case insensitive is how humans think about names. “John” and “New York” are the same identifiers as “john” and “new york”. It would be pretty weird if someone insisted that their passport is invalid because the name is printed in all caps and that’s not their preferred spelling.

IMO the best thing would be to call Unix-style case-sensitive file names something else. But it’s obviously too late for that.

Re:Things you wish you didn't need to know about S3 by lalaithion on Friday May 31, 2024 @02:54AM (#40532179)
The word “Turkey” is not the same as “turkey”, “August” is not the same as “august”, and “Muse” is not the same as “muse”. https://en.m.wikipedia.org/wiki/Capitonym
Re:Things you wish you didn't need to know about S3 by pavlov on Friday May 31, 2024 @03:32AM (#40532370)
Yet "TURKEY" is not a separate word from "Turkey" and "turkey". Ultimately context disambiguates these words, not capitalization.
Re:Things you wish you didn't need to know about S3 by justincormack on Friday May 31, 2024 @05:01AM (#40532818)
And “polish” and “Polish” are not even pronounced the same.
Re:Things you wish you didn't need to know about S3 by scosman on Friday May 31, 2024 @07:59AM (#40533958)
They might be at the beginning of a sentence (depends on the reason for capitalization).

It’s more like identifier reuse, on a case insensitive “system”.

“John” isn’t the same as “John” if I’m talking about two separate Johns.

Re:Things you wish you didn't need to know about S3 by bigstrat2003 on Friday May 31, 2024 @02:47AM (#40532152)
Agreed. I think case sensitivity in Unix filesystems is actually a pretty poor design decision. It prioritizes what is convenient for the computer (easy to compare file paths) over what makes sense for the user (treating file paths the same way human intuition does).
Re:Things you wish you didn't need to know about S3 by JackSlateur on Friday May 31, 2024 @07:11AM (#40533553)
But end users do not speak to filesystems.

Programs speak to filesystems.

Re:Things you wish you didn't need to know about S3 by howerj on Friday May 31, 2024 @08:54AM (#40534529)
Except that is not true, it is sometimes convenient, and sometimes very inconvenient and not wanted. My reasoning for file systems that are case sensitive is the following:

1. Some people want file systems to case sensitive. 2. Case sensitive is easier to implement. This is very much not a trivial thing. Case insensitivity only really makes sense for ASCII.

In the camp of wanting case insensitivity:

1. Some people want file systems to be case insensitive.

There is more in favor of case sensitivity.

Re:Things you wish you didn't need to know about S3 by kaashif on Friday May 31, 2024 @09:11AM (#40534717)
I don't know if that's right. The most obvious way two characters can be the same is if they actually look exactly the same i.e. are homoglyphs https://en.wikipedia.org/wiki/Homoglyph

But no filesystem I am aware of is actually homoglyph insensitive.

Case insensitive filesystems picked one arbitrary form of intuition (and not even the .oat obvious one) in one language (English) and baked that into the OS at a somewhat deep level.

You say "human intuition" - are those using different writing systems nonhuman then?

Re:Things you wish you didn't need to know about S3 by sham1 on Friday May 31, 2024 @10:02AM (#40535299)
But the thing is that the file system doesn't need to be case-insensitive for your system to support human intuition! As others have said, people don't look at and use filesystems, they use programs that interface with the filesystem. You can absolutely have a case-sensitive system that nonetheless lets you search files in a case-insensitive manner, for example. After all, to make searches efficient, you might want to index your file structure, and while doing that, you might as well also have a normalised file name within the index you search against.

Now, as you said, UNIX did the choice that's easier for computers. And for computers, case-insensitive filesystems would be worse. There are things that are definitely strange about UNIX filesystems (who doesn't love linefeeds in file names!?), but case-sensitivity is not one of them.

Re:Things you wish you didn't need to know about S3 by 7bit on Friday May 31, 2024 @12:03PM (#40536820)
In Germany there is a lowercase letter ß. It actually is a ligature of the letters s and z. It does not have an uppercase variant, because there is no word that begins with it. One word would be Straße. If you write that all in uppercase, it technically becomes STRASZE, although you almost always see STRASSE. But if you write that all in lowercase without substituting SS with ß, you are making a mistake. And although Switzerland is a german-speaking country, they have different spelling and rarely use ß -- if not ever.

This is just one of many cases, where case-insensitiy would give more trouble than it's worth. And others pointed out similar cases with the Turkish language in this post.

Re:Things you wish you didn't need to know about S3 by Hamuko on Friday May 31, 2024 @02:41AM (#40532112)
Humans will also treat "Jyväskylä", "Jyvaskyla" and "Jyvaeskylae" as the same identifiers but I don't think that's a good basis for file storage to have those be the same filenames.
Re:Things you wish you didn't need to know about S3 by pavlov on Friday May 31, 2024 @03:34AM (#40532380)
In the era of Unicode, this battle is pretty much lost. Several different code point sequences can produce the glyph 'ä', and user input can contain any of these. You need to normalize anyway.
Re:Things you wish you didn't need to know about S3 by glandium on Friday May 31, 2024 @06:38AM (#40533361)
And macOS does that normalization at the filesystem level.
Re:Things you wish you didn't need to know about S3 by justincormack on Friday May 31, 2024 @05:02AM (#40532826)
Passport offices care and may object.
Re:Things you wish you didn't need to know about S3 by ivanhoe on Friday May 31, 2024 @07:26AM (#40533685)
> That's how it should be

Why exactly? I'm not aware of any benefits of filenames being case-sensitive, it just opens a room for tons of very common mistakes that literally can't happen otherwise. It's not like in coding where it helps enforce the code style and thus aids readability - and even in programming it was a source of PITA to solve bugs before IDEs became smart enough to catch typos in var names. One thing I loved in Pascal the most is that it didn't care about the case, unlike the C.

Re:Things you wish you didn't need to know about S3 by codeflo on Friday May 31, 2024 @07:44AM (#40533829)
Except at the UI layer (where you can easily offer suggestions and do fuzzy search), the opposite is true. There are so many different ways to do case-insensitive string comparisons, and it's so easy to forget to do that in one place, that case-insensitivity just leads to ton of bugs (some of which will be security critical).

For example, did you know that Microsoft SQL Server treats the columns IS_ADMIN and is_admin as either the same or two different columns depending on the database locale (because e.g. Turkish distinguishes between i and I)? That's at least a potential security bug right there.

Re:Things you wish you didn't need to know about S3 by capitol_ on Friday May 31, 2024 @08:35AM (#40534325)
The case-sensitivity algorithm needs a locale as input in order to correctly calculate the case conversion rules.

The most common example is probably that i (U+0069 LATIN SMALL LETTER I) and I (U+0049 LATIN CAPITAL LETTER I) transform into each other in most locales, but not all. In locales az and tr (the Turkic languages), i uppercases to İ (U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE), and I lowercases to ı (U+0131 LATIN SMALL LETTER DOTLESS I).

case-insensitive is all fine if you only handle text that consist of A-Za-z, but as soon as you want to write software that works for all languages it becomes a mess.

Re:Things you wish you didn't need to know about S3 by jerf on Friday May 31, 2024 @09:39AM (#40534997)
This is the main point, and almost all the other chatter is not particularly relevant. A dumb computer and a human can agree with "files are case sensitive and sometimes that's a bit weird but computers are weird sometimes". If there was indeed exactly one universal way to have case insensitivity it would be OK. Case insensitive file systems date from when there was. Everything was English and case folding in English is easy. Problem solved. But that doesn't work today. And having multiple case folding rules is essentially as unsolvable a problem as the problems that arise from case sensitivity, except they're harder for humans to understand, including programmers.

Simple and wrong is better than complicated and wrong and also the wrong is shoved under the carpet until it isn't.

Though you still ought to declare a Unicode normalization on the file system. Which would be perfectly fine if it weren't for backwards compatibility.

Re:Things you wish you didn't need to know about S3 by yencabulator on Friday May 31, 2024 @05:51PM (#40540696)
Minor nitpick: case-insensitive comparison is a separate problem from case conversion, and IIRC a little simpler. Still locale-specific.
Re:Things you wish you didn't need to know about S3 by andruby on Friday May 31, 2024 @11:01AM (#40536077)
You can format disks in MacOS to be case sensitive.
Re:Things you wish you didn't need to know about S3 by segfaltnh on Friday May 31, 2024 @11:13AM (#40536225)
Case sensitive filesystems are a mistake.
Re:Things you wish you didn't need to know about S3 by imadj on Friday May 31, 2024 @12:43PM (#40537287)
I agree 100%.

From a technical implementation pov 'A' & 'a' are well established as different characters (ascii, unicode, etc). Regardless of personal preference, I don't understand how can a developer/Sys admin be surprised and even frustrated that a file system is case sensitive.

The developer is still free to abstract this away for the end user when it makes sense such as search results

Re:Things you wish you didn't need to know about S3 by yencabulator on Friday May 31, 2024 @05:57PM (#40540741)
It would be incredibly weird not to be able to store urlsafe-base64 encoded paths on S3.
Re:Things you wish you didn't need to know about S3 by ansgri on Sunday June 02, 2024 @05:36AM (#40552753)
TIL. I've switched to Mac about a year ago and it's sufficiently Linux-like to take such things for granted. I wonder what other surprises are going to bite me in the future.
Re:Things you wish you didn't need to know about S3 by aldanor on Sunday June 02, 2024 @06:02AM (#40552861)
Sufficiently BSD-like :)