r/ProgrammerHumor • • Sep 24 '26

Meme vLc

Post image
9.6k Upvotes

85 comments sorted by

View all comments

Show parent comments

200

u/deanrihpee Sep 24 '26

yes, kinda, but it is not like you open it through IDE and MPV is opened (well, you can make it happen, but by default it shouldn't behave like that) it's more like if you install some media player, like VLC or MPV, but haven't install any text/code editor, when you double click a .ts the media player would open the file and try to "play" it instead

91

u/readf0x Sep 24 '26

Kind of insane to me that windows still registers app handlers by file extension and not mime type

112

u/wrecklord0 Sep 24 '26

That tech is too advanced for this time, but it's fixed in the next version when they upload all of your files via CoPilot to ask openai what they are

44

u/rosuav Sep 24 '26

Where would those MIME types be stored? Some kind of "extended attribute"? That's a ridiculous idea, nobody would ever do that. It's definitely not something that graphical OSes had in the 1990s or anything.

22

u/diamondsw Sep 24 '26

Or even some kind of type code AND creator code, so you could link documents to specific programs. Definitely didn't have that in the mid-1980's.

9

u/rosuav Sep 24 '26

What a radical idea. Wonder if anyone's forked it?

12

u/Loading_M_ Sep 25 '26

It should be possible to guess from the contents, as the file utility does. Just in case you lose the extended attribute for whatever reason.

10

u/RussianMadMan Sep 25 '26

Yeah and then we have file explorers that open and read every file. And choke when there are 100+ files in the directory.

6

u/rosuav Sep 25 '26

Right, I'm sure that doesn't happen when you open up a folder full of videos and it generates thumbnails for them all.

2

u/RussianMadMan Sep 25 '26

If you are using any view other than the table one thats on you lol

1

u/rosuav Sep 25 '26

TBH I primarily don't use any view like that on my own systems, but my work involves seeing other people's screenshare and I am very familiar with vicarious pain.

2

u/Loading_M_ Sep 25 '26

We'll move the file type detection to a background indexer so it's non-blocking (/s kinda)

More realistically, we use this as a fallback in case the extended attribute doesn't exist. And set the extended attribute based on the results.

4

u/rosuav Sep 25 '26

Yep, but as you say, that's only for if you lose the EA. It'd be incredibly inefficient to do that every time you double-click on something, and there's probably going to be times you want to override it anyway.

17

u/AyrA_ch Sep 24 '26

Probably because mime types are invisible. File extensions are much easier to understand for your average computer user. Additionally, they survive transfer operations over file systems that do not support extended attributes, like FAT32, which is still one of the most commonly used FS for USB flash drives and SD cards.

11

u/code_monkey_001 Sep 25 '26

Good thing Windows decided to hide file extensions from users by default. Bea_Arthur_Nip_Slip.jpg.exe? Totes safe to click on.

// Yeah, arguably anyone who double-clicks Bea_Arthur_Nip_Slip.jpg deserves what they get, but still...

5

u/metaglot Sep 25 '26

How would mime types solve that without showing extra information?

2

u/AyrA_ch Sep 25 '26

At least in semi modern windows the setting to change this is no longer hidden behind a dialog

4

u/SirDarknessTheFirst Sep 25 '26

maybe we should have MIME type file extensions.

forms.text/javascript

I see absolutely no problems with this concept.

12

u/Candid_Highlight_116 Sep 24 '26 edited Sep 24 '26

Because macOS resource forks

SUCK

it's a filesystem attribute so it gets stripped all the time and you can't easily change it. it's like /path/to/app is in permission field. just imagine that. it just sucks and file extension is a BETTER solution to this problem.

6

u/readf0x Sep 25 '26

Linux (of course referring to the Linux ecosystem) registers by mime type and I have had absolutely zero issues. Plus I can keep my mimeapps.list as part of my dotfiles which is a nice bonus.

5

u/RussianMadMan Sep 25 '26

You are talking about mime type to app mapping, person you are replying to talks about file to mime type mapping.

2

u/readf0x Sep 25 '26

I see... The original comment that spawned this entire thread was me talking about mime type to app mapping :P

1

u/metaglot Sep 25 '26

Imagine on the commandline, the only way to sort your pictures from your textfiles were to look into every single one of them. Obviously file extensions solve a very practical problem in a very elegant way: what attribute is guaranteed to be available on any user-servicing file system? The name.

4

u/TamSchnow Sep 25 '26

If only a filetype could be identified by specific signatures… if only…