• fubo@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    5 days ago

    I recall a case-insensitivity bug from the early days of Mac OS X.

    There are three command-line utilities that are distributed as part of the Perl HTTP library: GET, HEAD, and POST. These are for performing the HTTP operations of those names from the command line.

    But there’s also a POSIX-standard utility for extracting the first few lines of a text file. It’s called head.

    I think you see where I’m going with this. HEAD and head are the same name in a case-insensitive filesystem such as the classic Mac filesystem. They are different names on a Unix-style filesystem.

    Installing /usr/bin/HEAD from libwww-perl onto a Mac with the classic filesystem overwrote /usr/bin/head and broke various things.

    • MudMan@fedia.io
      link
      fedilink
      arrow-up
      0
      arrow-down
      2
      ·
      5 days ago

      Case insensitive is more intuitive and MUCH safer.

      You do not want every Windows user to live in a world where Office.exe, office.exe, Offlce.exe and 0fflce.exe are all different files.

      OSs and filesystems aren’t built for programmers, they’re built for grandmas. Programmers just happen to use them. It’s much more sensible to give programmers a harder time fixing bugs and incompatibilities than it is to make the user experience even marginally worse.

      I mean, all due respect for the guy, but that is an absolutely terrible opinion and I will die on this hill.

      • pelya@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        5 days ago

        Your grandma will never type file names in shell, she’ll use Open File dialog, where case sensitivity does not matter.

      • Deebster@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        4 days ago

        Case insensitive is more intuitive

        Are these the same filename?

        • ΑΓΑΘΉ.txt
        • αγαθή.txt

        What about these?

        • MY-NOTES-ON-Δ.txt
        • μυ-notes-on-δ.txt

        Databases have different case-insensitive collations - these control what letters are equivalent to each other. The fact that there’s multiple options should tell you that there’s no one-size-fits-all solution to case insensitivity.

        This issue is only simple and obvious if you don’t know enough about it.

        • SwingingTheLamp@midwest.social
          link
          fedilink
          English
          arrow-up
          0
          ·
          3 days ago

          I don’t have Windows here to test, so I keep wondering, are all of these forms the same?

          • facture-février.pdf
          • FACTURE-FÉVRIER.PDF
          • FACTURE-FEVRIER.PDF
          • MudMan@fedia.io
            link
            fedilink
            arrow-up
            1
            ·
            3 days ago

            On a NTFS drive on Windows with default settings the first two are the same, the third one is not.

            Caps and non-caps are matched, accented/unaccented characters are not, which is probably what you’d expect.

            • SwingingTheLamp@midwest.social
              link
              fedilink
              English
              arrow-up
              1
              ·
              2 days ago

              Thanks. That is what I’d expect, and highlights the disconnect I saw in this comment chain: I think what some other folks were trying (less-than-artfully) to say is that there’s a difference between what one might expect case-insensitive means as a computer programmer, and what one might expect case-insensitive to mean in human language. All three of those should be the same filename in fr_FR locale, since some French speakers consider diacritical marks to be optional in upper case. While that might be an edge case, it does exist. English is even worse, with a number of diacritical marks that are completely optional, but may be used to aid legibility, e.g. café, naïve, coöperation. (Whether that quirk is obvious or not, or whether it outweighs any utility of case-insensitivity is not something that I have a strong opinion on, though.)

              • MudMan@fedia.io
                link
                fedilink
                arrow-up
                1
                ·
                1 day ago

                Whaaaat? You’re telling me someone in the Linux community chooses to be deliberately obscure based on a technicality no end user cares about in a patronizing, elitist manner?

                Naah. Impossible.

                The issue with the special characters for accent marks and diacritics is their importance fluctuates per language, so you have to keep them separate unless you want to make different rules per locale instead of per character.

                They do it the other way for number formatting and that’s already a mess. If you’ve ever tried to work with spreadsheets across locale formats it’s absolutely bonkers. Excel outright changes the separators in formulas.

      • masterspace@lemmy.ca
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 days ago

        OSs and filesystems aren’t built for programmers, they’re built for grandmas.

        You’re just flat out and completely wrong.

        1. No grandma is typing out file URLs. This is not a point.
        2. OSes literally do nothing useful on their own. Their explicit purpose is to allow developers to write applications for them for users to use.
        3. Case insensitivity can be handled at the application level, there is no necessity to handle it at the OS level.
        4. Case insensitivity isn’t even clearly defined as Linus outlined, but you know what is clearly defined? Different character byte codes.
        • MudMan@fedia.io
          link
          fedilink
          arrow-up
          0
          arrow-down
          1
          ·
          5 days ago

          The entire issue is that gradmas don’t type out filepaths.

          When you’re tying filenames case is easy, because a) you have to press something different, and b) typically terminal monospace fonts look very different in caps and non caps.

          But in a GUI where you aren’t typing the names out? For a human reading human text caps and non caps are interchangeable. So as the name of an icon case sensitivity is confusing and prone to human error.

          I mean, it’s that in typing, too, because it’s a very easy typo to make and all sorts of mixed case choices can be hard to remember, but it’s MORE confusing if you end up with just an icon with a name and the exact same icon with the exact same name just one character is a different case.

          OSs don’t do anything by themselves, but they come bundled with all sorts of standardize applications built on top of them. If case sensitivity is baked into the filesystem, it’s baked into the filesystem. And absolutely no, you can’t put it in at the application level. I mean, congratulations for finding the absolute worst of both worlds, but how would that even work? If I tell an app to use a file and there are two of them with different cases how would that play out? You can build it into indexing and search queries and so on when they will display more than one result (and that, by the way, is typically extra EXTRA confusing), but you can’t possibly override the case sensitive filesystem.

          Now, character byte codes are a different thing, and it’s true that the gripe in this particular rant seems to be almost more focused into weird unicode quirks and the case sensitivity thing seems to be mostly a pet peeve he rolls into it, I suspect somewhat facetiously.

          But still, that’s for the OS, the filesystem and the applications to sort out. It’s an edge case to handle and it can be sorted out via arbitrary convention regardless of whether you do case sensitivity for filenames. “Case insensitive means insensitive to other things, too” is not a given at all.

          • masterspace@lemmy.ca
            link
            fedilink
            English
            arrow-up
            0
            ·
            edit-2
            5 days ago

            Now, character byte codes are a different thing, and it’s true that the gripe in this particular rant seems to be almost more focused into weird unicode quirks and the case sensitivity thing seems to be mostly a pet peeve he rolls into it, I suspect somewhat facetiously.

            No, it has nothing to do with “weird Unicode quirks”.

            It has everything to do with their being a universal standard for representing different characters, and the file system deciding to then apply its own random additional standard on top that arbitrarily decides some thing are probably the same as others.

            This is just like Javascript’s early ==, fuzzy equality choice. It was done to be helpful, but was a fuzzy system that doesn’t cover enough edge cases to be implemented at that low of a level.

            • MudMan@fedia.io
              link
              fedilink
              arrow-up
              0
              ·
              5 days ago

              Arbitrary is the word.

              Arbitrary means you can implement it however you want. The limits to it are by convention. There is no need to go any further than case insensitive filenames. At all. Rolling case insensitive filenames into the same issue is entirely an attempt to make a case against a pet peeve for unrelated reasons.

              You want it to handle the edge cases? Have it handle the edge cases. You want to restrict it to the minimum feature just for alphabet characters? Do that.

              But you do NOT give up on the functionality or user experience because of the edge cases. You don’t design a user interface (and that’s what a OS with a GUI is, ultimately) for consistency or code elegance, you design it for usability. Everything else works around that.

              I can feel this conversation slipping towards the black hole that is the argument about the mainstream readiness of Linux and I think we should make a suicide pact to not go there, but man, is it starting to form a narrative and am I finding it hard to avoid it.

              • masterspace@lemmy.ca
                link
                fedilink
                English
                arrow-up
                0
                ·
                edit-2
                5 days ago

                There is no need to go any further than case insensitive filenames. At all. Rolling case insensitive filenames into the same issue is entirely an attempt to make a case against a pet peeve for unrelated reasons.

                This is literally just the same issue. I cannot see what two issues you are separating this into.

                All of this stems from case insensitive file names.

                But you do NOT give up on the functionality or user experience because of the edge cases. You don’t design a user interface (and that’s what a OS with a GUI is, ultimately) for consistency or code elegance, you design it for usability. Everything else works around that.

                The OS is not the GUI. Every GUI you see in the OS is an application running on top of the actual OS.

                The OS should not arbitrarily decide that some characters are the same as others, it should respect the unified standards for what bytes represent what characters. Unless there is an internationally agreed upon standard for EXACTLY what case insensitive means for every character byte code, then you are building a flawed system that will ruin the user experience when massive bugs and stability issues come up because you didn’t actually plan out your system properly to cover edge cases.

                You know, as Linus is pointing out given his multi decade history of running Linux.

                • MudMan@fedia.io
                  link
                  fedilink
                  arrow-up
                  0
                  ·
                  5 days ago

                  No, hold on, this is not about the OS.

                  This is about whether the filesystem in the OS supports case insensitive names.

                  That determines whether the GUI supports case insensitive names down the line, so the choices made by the filesystem and by the OS support of the filesystem must be done with the usability of the GUI in mind.

                  So absolutely yes, the OS should decide that some characters are the same as others, not arbitrarily but because the characters are hard to read distinctly by humans and that is the first consideration.

                  Or hey, we can go back to making all filenames all caps. That works, too and fully solves the problem.

                  • masterspace@lemmy.ca
                    link
                    fedilink
                    English
                    arrow-up
                    0
                    ·
                    edit-2
                    5 days ago

                    No, hold on, this is not about the OS.

                    Holding on.

                    This is about whether the filesystem in the OS supports case insensitive names.

                    K, now that we’re done being pedantic…

                    That determines whether the GUI supports case insensitive names down the line, so the choices made by the filesystem and by the OS support of the filesystem must be done with the usability of the GUI in mind.

                    Oh yes, let’s prioritize making sure that when grandmas are using the raw filesystem they’re not confused by case sensitivity, totally worth it over stable, bug-free, secure, software.

                    Definitely couldn’t have just built grandmas a case insensitive option on the user portion of the file system instead of introducing bugs and edges cases into literally every single piece of software they might use…