4 ms·
> it will be 100% clear to the user which application the file belongs to. The most popular operating system hides it from the user, so clarity would not impro
by delusional 1y ago
> it will be 100% clear to the user which application the file belongs to.
The most popular operating system hides it from the user, so clarity would not improve in that case. At leat one other (Linux) doesn't really use "extensions" and instead relies on magic headers inside the files to determine the format.
Otherwise I think the decision is largely aestethic. If you value absolute clarity, then I don't see any reason it won't work, it'll just be a little "ugly"
- hiAndrewQuinn 1y agoI don't even think it's ugly. I'm incredibly thankful every time I see someone make e.g. `db.sqlite`, it immediately sets me at ease to know I'm not accidentally dealing with a DuckDB file or something.
- wvbdmp 1y agoYes, oh my god. Stop using .db for Sqlite files!!! It’s too generic and it’s already used by Windows for those thumbnail system files.
- dist-epoch 1y ago> At leat one other (Linux) doesn't really use "extensions" and instead relies on magic headers inside the files to determine the format. mostly for executable files. I doubt many Linux apps look inside a .py file to see if it's actually a JPEG they should build a thumbnail for.
- scrollaway 1y agoYour doubts are incorrect. There's a fairly standard way of extracting the file type out of files on linux, which relies on a mix of extensions and magic bytes. Here's where you can start to read about this: https://wiki.archlinux.org/title/XDG_MIME_Applications https://wiki.archlinux.org/title/XDG_MIME_Applications A lot of apps implement this (including most file managers)
- delusional 1y agoI'm a little surprised that that link doesn't go to libmagic[1]. No doubt XDG_MIME is an important spec for desktop file detection, but I think libmagic and the magic database that underpins it are more fundamental to filetype detection in general. It's also one of my favorite oddities on Linux. If you're a Windows user the idea of a database of signatures for filetypes that exists outside the application that "owns" a file type is novel and weird. [1]: https://man7.org/linux/man-pages/man3/libmagic.3.html https://man7.org/linux/man-pages/man3/libmagic.3.html
- scrollaway 1y agolibmagic maintains its own separate database from xdg. XDG db is meant from the ground up to have other apps add to it etc… so that one is the one apps use as a library usually, if they want to integrate nicely and correctly with other installed apps. libmagic is the hacking of the two :)
- whyoh 1y ago>The most popular operating system hides it from the user, so clarity would not improve in that case. If you mean Windows, that's not entirely correct. It defaults to hiding only "known" file extensions, like txt, jpg and such. (Which IMO is even worse than hiding all of them; that would at least be consistent.) EDIT: Actually, I just checked and apparently an extension, even an exotic one, becomes "known" when it's associated with a program, so your point still stands.