Live data from Hacker News

HFS+ is crazy

liminality.xyz

61–70 of 211 posts

Re: HFS+ is crazy

#61

Alternate parts to the main file are present on several platforms, and have the same problems. They are called resource forks on Mac. On Windows/NTFS they are called alternate data streams - https://en.wikipedia.org/wiki/Fork_(file_system) - to use specify a colon and name after the filename (eg example.txt:myads). On Unix, Linux, OS/2 etc you can find extended attributes - https://en.wikipedia.org/wiki/Extended_file…

BTW, one of the first very popular vulnerabilities of IIS involved making it serve a file's source code rather than executing it (a very convenient way to get database login credentials) through a ::$DATA appended to the URL.

Re: HFS+ is crazy

#62
post #22

Interesting that it is HFS+ getting accused of being crazy, rather than the (blatantly deficient) POSIX-style tools!

> Interesting that it is HFS+ getting accused of being crazy, rather than the (blatantly deficient) POSIX-style tools!

That's UNIX parochialism for you.

Re: HFS+ is crazy

#63
post #3

This is why it was really disappointing that Apple had to abandon ZFS. ZFS is one of the best file systems available and because Oracle owns it it is virtually unusable in most contexts. I wonder if Apple can afford to buy out Oracle at this point, take ZFS and wind up the useless parts.

I mean, there is http://open-zfs.org/wiki/Main_Page and FreeBSD has been proving the implementations reliability for some time now. Apple could adopt it. They don't. That's probably because the desktop OS is on life support, and there are indications Apple wants to abandon it in favor of a migration to a wholly iOS model.

There are no such indications.

Re: HFS+ is crazy

#64
post #31

Earlier quoted context omitted.

In 15 years of working with Macs (as a programmer and as a semi-pro DAW/NLE user), I've never been confused once by them. So it sure might be confusing (and I see how) but it's absolutely not very common.

> In 15 years of working with Macs (as a programmer and as a semi-pro DAW/NLE user), I've never been confused once by them. Gosh, are you saying that the common use of ADS was a common mac pattern and people very familiar with the history of macs would understand this well? Do you really think that refutes the point that they're confusing to everyone else? While many OSs have implementations of ADS, almost no one use…

>Gosh, are you saying that the common use of ADS was a common mac pattern and people very familiar with the history of macs would understand this well?

It was quite common, yes, and even more extended in the past, but I'm saying something else: that noticing it and having issues with it wasn't that common. It's a leaky abstraction, but you don't often meet that leak.

Case in point TFA's issue. He has a zero-sized font file where all the data are in the resource leak. All fonts I've dealt with in OS X have been proper files, you can copy over to other FS normally.

>Do you really think that refutes the point that they're confusing to everyone else?

No, as I wrote: "It sure can be confusing (and I see how)".

But it's not that often that it has a chance to be confusing (at least in my experience -- but I've also not seen much discussion in support forums, questions from friends/colleagues with Macs etc about such as issues, whereas I've seen for many other issues).

>While many OSs have implementations of ADS, almost no one uses them.

Wouldn't that make them even MORE confusing in those OSs, the times they're finally used? As opposed to an OS that regularly uses them?

Re: HFS+ is crazy

#65

Earlier quoted context omitted.

Arguably, NTFS implemented alternate data streams primarily to support Mac resource forks.

Nope. It was originally done as part of OS/2 (Windows NT was sort of OS/3 - the next version of OS/2) and OS/2 had "extended attributes" - https://en.wikipedia.org/wiki/Extended_file_attributes#OS.2F... - so NT also needed them for compatibility.

Thank you! All these Mac people think Apple Invented Everything.

Re: HFS+ is crazy

#66
post #45
post #33

Earlier quoted context omitted.

[deleted]

Actually, resource forks go all the way back to the origins of classic MacOS circa 1984-85! And they were a lot more than just extended attributes -- they were a b-tree storage abstraction full of stuff like icons, chunks of 68K machine code, and anything else that simply didn't belong in a linear data file. It's a hold-over from MacOS's very non-UNIX origins, and had the makings of an OO filesystem back in the day -…

What I find interesting is it you pop open Creation Kit and look at the database that powers Gamebryo/Creation Engine games like Morrowind, Oblivion, Skyrim, Fallout 3, Fallout 4, etc... take a look at their database structure.

It's virtually identical to a Mac Classic resource fork.

Re: HFS+ is crazy

#68

It's amazing how garbage like this always rockets to the top of HN. This guy doesn't know anything about file systems or about the operating system he's using. But he sounds confident, so that's evidently good enough for a lot of people. If you think it's crazy that a file system supports multiple data forks/steams, then you don't know very much about file systems. If you think it's crazy that an operating system mai…

I'm tired of having discussions with people on HN for this very reason. It's such a joke.

Re: HFS+ is crazy

#69

Alternate parts to the main file are present on several platforms, and have the same problems. They are called resource forks on Mac. On Windows/NTFS they are called alternate data streams - https://en.wikipedia.org/wiki/Fork_(file_system) - to use specify a colon and name after the filename (eg example.txt:myads). On Unix, Linux, OS/2 etc you can find extended attributes - https://en.wikipedia.org/wiki/Extended_file…

You wouldn't put the entire content of a file in an extended attribute, would you?

Fonts, when part of a program, were stored in a "FONT" fork (conversely, icons went into "ICON"). It's natural that font files would have nothing in the data fork and the font definition itself would be under FONT.

Full documentation is available at https://developer.apple.com/legacy/library/documentation/mac...

Re: HFS+ is crazy

#70
post #45

Earlier quoted context omitted.

Actually, resource forks go all the way back to the origins of classic MacOS circa 1984-85! And they were a lot more than just extended attributes -- they were a b-tree storage abstraction full of stuff like icons, chunks of 68K machine code, and anything else that simply didn't belong in a linear data file. It's a hold-over from MacOS's very non-UNIX origins, and had the makings of an OO filesystem back in the day -…

Great comment. Is there anywhere I can read about how it worked and what it was used for before it became a "veriform appendix"? It seems really interesting.

Inside Macintosh Vol I, II, II: http://www.weihenstephan.org/~michaste/pagetable/mac/Inside_...
Post reply on HN