• fubo@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    17 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
      1
      ·
      17 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
        1
        ·
        17 days ago

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

            • LaggyKar@programming.dev
              link
              fedilink
              arrow-up
              0
              ·
              edit-2
              16 days ago

              If you’re running Wine on a case-sensitive file system, and you it tries to open a file, it would first try to open a file whose case matches exactly. But if it doesn’t find one, it would then need to list all the files in the directory, normalize their case, and go through them all to see if there is a file with the given name but in a different case. That can take some time if there is a lot of files in the directory.

              But if you’re on a case-insensitive filesystem, the FS can keep case-normalized names of all files on disk, so you can do a case-insensitive open just as fast as you can do a case-sensitive open.

              BTW, another application that can benefit from this is Samba, since SMB is case-insensitive.

              • soc@programming.dev
                link
                fedilink
                arrow-up
                1
                ·
                edit-2
                16 days ago

                That –at best– gives you the same performance.

                EDIT: Ok, I misunderstood – you meant the performance of “case insensitive in kernel” vs. “case insensitive in userspace”. I get your point now.