if you could pick a standard format for a purpose what would it be and why?

e.g. flac for lossless audio because…

(yes you can add new categories)

summary:

  1. photos .jxl
  2. open domain image data .exr
  3. videos .av1
  4. lossless audio .flac
  5. lossy audio .opus
  6. subtitles srt/ass
  7. fonts .otf
  8. container mkv (doesnt contain .jxl)
  9. plain text utf-8 (many also say markup but disagree on the implementation)
  10. documents .odt
  11. archive files (this one is causing a bloodbath so i picked randomly) .tar.zst
  12. configuration files toml
  13. typesetting typst
  14. interchange format .ora
  15. models .gltf / .glb
  16. daw session files .dawproject
  17. otdr measurement results .xml
      • kadu@lemmy.world
        link
        fedilink
        arrow-up
        3
        arrow-down
        22
        ·
        edit-2
        1 year ago

        Having “double” extensions is a terrible convention for operating systems where extensions actually matter and users are used to them, like Windows.

        “.tar.xz” should be something like “.tarxz” or “.txz”

        • Longpork_afficianado@lemmy.nz
          link
          fedilink
          arrow-up
          24
          ·
          1 year ago

          But it’s not a tarxz, it’s an xz containing a tar, and you perform operations from right to left until you arrive back at the original files with whatever extensions they use.

          If I compress an exe into a zip, would you expect that to be an exezip? No, you expect it to be file.exe.zip, informing you(and your system) that this file should first be unzipped, and then should be executed.

          • kadu@lemmy.world
            link
            fedilink
            arrow-up
            1
            arrow-down
            4
            ·
            1 year ago

            it’s an xz containing a tar

            So what? When you zip 5 documents together do you name it .zip or .config.lib.sh.deb.zip?

            No, you expect it to be a file.exe.zip

            Double extensions are not conventional on Windows, so no, I do not.

            • 7eter@feddit.de
              link
              fedilink
              arrow-up
              3
              ·
              1 year ago

              Dots in filenames are commonly used in any operating system like name_version.2.4.5.exe or similar… So I don’t see a problem.

                • 7eter@feddit.de
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  1 year ago

                  Hiding part of a file name might be the real problem. A IMG.jpg.exe - would result in a harmless looking JPG, but it isn’t.

                  • kadu@lemmy.world
                    link
                    fedilink
                    arrow-up
                    1
                    ·
                    1 year ago

                    A IMG.jpg.exe - would result in a harmless looking JPG, but it isn’t.

                    True. Which is why getting people used to seeing .extension.extension2 is a terrible convention. Call a .zip a .zip, not a .exe.zip.

          • kadu@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            Cool. So it means it’s a problem for over 70% of all active desktop and laptop computers.

            • DigitalJacobin@lemmy.ml
              link
              fedilink
              English
              arrow-up
              4
              ·
              edit-2
              1 year ago

              I get the frustration, but Windows is the one that strayed from convention/standard.

              Also, i should’ve asked this earlier, but doesn’t Windows also only look at the characters following the last dot in the filename when determining the file type? If so, then this should be fine for Windows, since there’s only one canonical file extension at a time, right?

              • kadu@lemmy.world
                link
                fedilink
                arrow-up
                2
                ·
                1 year ago

                You’re absolutely correct when it comes to how Windows will interpret the file - it will ignore all the preceding “extensions” and will use the last one as the filetype and as the hook for whatever default action or application should handle it. However, getting people used to double extensions is one quick way of increasing the success rate of attacks such as the infamous “.pdf.exe” invoice from an email attachment. It also creates issues with renaming files and, though admittedly not many, some Windows application’s own file pickers.

                Still - from just a theoretical point of view, I can’t see how Windows’ convention is worse, in fact, it makes significantly more sense. If I zip a file, it doesn’t matter what it was in a previous life, it’s now a zip - this is also how Unix deals with many filetypes, I’ve never seen a .h264.mp4 file, even though the .mp4 container can actually represent different types of encoding. Why have one filetype use the Windows convention and another, for no reason, a different one?

                • DigitalJacobin@lemmy.ml
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  1 year ago

                  However, getting people used to double extensions is one quick way of increasing the success rate of attacks such as the infamous “.pdf.exe” invoice from an email attachment.

                  Very good point. Though, i would argue that this would be much less of a problem if Windows stopped sometimes hiding file extensions.

                  I can’t see how Windows’ convention is worse

                  I don’t believe what you’re referring to is really a Windows versus Linux/Unix thing.

                  If I zip a file, it doesn’t matter what it was in a previous life, it’s now a zip - this is also how Unix deals with many filetypes, I’ve never seen a .h264.mp4 file, even though the .mp4 container can actually represent different types of encoding.

                  I disagree, but i do get what you’re saying here. I don’t think that example really works though, because a .mp4 file isn’t derived from a .h264 file. A .mp4 is a container that may include h264-encoded video, but it may also have a channel with Opus-encoded audio or something. It’s apples and oranges.

                  Also, even though there shouldn’t be any technical issues with this on Windows, you can still use a typical short filename suffix if you wish, though i would argue that using the long filename suffix is more expressive. From “tar (computing)” on Wikipedia:

                  Compressor Long Short
                  bzip2 .tar.bz2 .tb2, .tbz, .tbz2, .tz2
                  gzip .tar.gz .taz, .tgz
                  lzip .tar.lz
                  lzma .tar.lzma .tlz
                  lzop .tar.lzo
                  xz .tar.xz .tx
                  compress .tar.Z .tZ, .taZ
                  zstd .tar.zst .tzst
                  • kadu@lemmy.world
                    link
                    fedilink
                    arrow-up
                    2
                    ·
                    1 year ago

                    Though, i would argue that this would be much less of a problem if Windows stopped sometimes hiding file extensions.

                    You and I are in strong agreement here, I think hidden file extensions is a super bad move.

                    And as per the table you kindly included, if there’s a short single extension version of the file, I’m happy. I still don’t understand the logic behind using the long version for user-facing files, like file sharing or software distribution, but different conventions coexisting isn’t anything new in computing so it is what it is.

        • Gamma@programming.dev
          link
          fedilink
          English
          arrow-up
          6
          ·
          1 year ago

          I get your point. Since a .tar.zst file can be handled natively by tar, using .tzst instead does make sense.

        • sebsch@discuss.tchncs.de
          link
          fedilink
          arrow-up
          5
          arrow-down
          1
          ·
          1 year ago

          I would argue what windows does with the extensions is a bad idea. Why do you think engineers should do things in favour of these horrible decisions the most insecure OS is designed with?

          • kadu@lemmy.world
            link
            fedilink
            arrow-up
            1
            arrow-down
            4
            ·
            1 year ago

            That’s much better. Thanks for actually answering the comment, rather than the usual “Windows bad, Linux good, upvotes please”

            • jaaval
              link
              fedilink
              arrow-up
              1
              ·
              1 year ago

              In this case it really seems this windows convention is bad though. It is uninformative. And abbreviations mandate understanding more file extensions for no good reason. And I say this as primarily a windows user. Hiding file extensions was always a bad idea. It tries to make a simple reduced UI in a place where simple UI is not desirable. If you want a lean UI you should not be handling files directly in the first place.

              Example.zip from the other comment is not a compressed .exe file, it’s a compressed archive containing the exe file and some metadata. Windows standard tools would be in real trouble trying to understand unarchived compressed files many programs might want to use for logging or other data dumps. And that means a lot of software use their own custom extensions that neither the system nor the user knows what to do with without the original software. Using standard system tools and conventions is generally preferable.