Mastodon Feed: Post

Mastodon Feed

Boosted by cstanhope@social.coop ("Your weary 'net denizen"):
MaddieM4@raphus.social wrote:

A file is a big container of Maybes. Is a file a region of disk blocks that can be mutably edited in place? Maybe. Is a file a logical sequence of bytes which might be entirely in-memory and unpersisted to disk? Maybe. Is it an archive which needs to be hash-checked to confirm no corruption happened to it? I dunno man, maybe!

And then you need to think about the fact that some files support rewinding/skipping with fseek, but other "files" are network streams or `/dev/urandom` or UNIX pipes.

See, the problem with "everything is a file" is that the abstraction comes back up worse in your esophagus later, turned around: "a file is everything." Files are, in a specific sense, a violation of the UNIX principle, ironically enough: they do every job, and just kind of okay. In fact they're pretty bad on any filesystem with less than 5 developer-years invested. And you all know me: I am unusually willing to let difficulty cliffs tell me when something is a bad idea.