9 ms·
So first off: Very cool. Amazingly polished, and self-hosting! Especially since it looks to be an actually-independent project with POSIX as an optional compat
by yjftsjthsd-h 5y ago
So first off: Very cool. Amazingly polished, and self-hosting! Especially since it looks to be an actually-independent project with POSIX as an optional compat layer.
I feel like the features that are unique are mostly in 3 groups:
1. Features that shouldn't be unique to this system. Tabbed windows have occasionally happened on other systems, and probably should become more common, and there's no reason it shouldn't work on other systems. I hope this inspires other people to copy;)
2. Features that only work if you have really tight integration or different primitives than most OSs are using. Programs updating file name when you rename from the file manager, or the file manager showing when files are open... might be possible to graft on to other systems, but it'd be a right pain. Even systems like MacOS are going to struggle - the whole OS is under one company that could do cross-functional stuff like that, but any time it touches applications you need external developers to support it and that may or may not work out.
3. Features that are possible, but nobody else does it because it's impractical - possibly only impractical from their starting points, though. Showing total size of subdirectories is expensive on ex. Linux because you have to walk every file recursively. I don't know if they're just eating the cost because they haven't hit a case where it matters, or if their system actually makes it cheap (I could easily imagine a filesystem that moved the calculation cost up front).
- thom 5y agoWhat’s the state of the art for file systems in the age of M2 drives that are bonkers fast? I dunno about everyone else, but knowing hierarchically where my disk space is going is a really common concern.
- harikb 5y agoI would imagine, the “m2 fast” is visible more in reading medium sized files than 100k tiny reads (when recursively querying directories like this case GP is taking about) To make GP’s use case better, FS really needs an custom index or require that every write also update all hierarchy. Unless of course they work like indexers and just work with delayed data
- b112 5y agoYes, main speed improvement with SSDs come now via IOP/s, for metadata, small file ops like this.
- zoom6628 5y agoGood point but likewise one has to wonder why the need for folder hierarchies anyway. With bonkers fast disks and cpus the organising of files should be able to be dynamic and driven by some form of metadata and tags rather than static tree structures. The web doesn’t first require you to define a structure before search so why should a desktop?
- brnt 5y agoBecause spacetime is hierarchical in that way too. I can put a thing in a box in a room, but I can't put the thing in multiple boxes in various rooms. The filesystem thus makes intuitive sense: we store physical objects in exactly the same way. Now sure, it'd be nice to grep through my house, but I still couldn't hang the same painting in two places at the same time.
- reedciccio 5y agoLike beOS/Haiku does! Metadata and dynamic grouping of files + search is an amazing concept
- Hnrobert42 5y agoInteresting. Sounds like Gmail’s labels vs everyone else’s folders. I wonder if it is a patent holding things back.
- OJFord 5y agoNo, Fastmail uses labels, and is also the org behind JMAP, which uses them natively. Folders are so common in email because that's built-in to IMAP.
- vidarh 5y agoFolders are so common still in part because many of us want them to the point that both Fastmail and Gmail lets you use tags in ways that behaves almost entirely like folders, including a hierarchy. I'd never consider an e-mail system (or a filesystem) that doesn't allow me to at least very closely approximate that structure.
- dataflow 5y ago> Showing total size of subdirectories is expensive To me the real obstacle isn't that it's expensive (I mean, you could ostensibly cache the size on disk for each directory, if not find some other clever algorithmic solution), but that the notion of "size of a directory" itself isn't all that meaningful in the presence of e.g. hardlinks.
- NavinF 5y agoRoughly 0% of a typical desktop’s disk space is used by hardlinked files. You can safely double count them. That’s exactly what every disk space analyzer does! If you really wanna avoid double counting, just divide the size of every file by st_nlink. Of course you’d have to update the cached sizes of every directory that has a link to that inode so you’d need to cache the mapping from inodes to paths too. Another solution is to cache 2 sizes per directory, one for all files with 1 link and another for files that have 2 or more. The UI could hide the latter when it’s 0GB. But this discussion is academic; Nobody really cares about hardlinks.
- dataflow 5y agoNot sure what you consider a "typical desktop", but on Windows, WinSxS has gigabytes worth of hardlinks. If you don't care about them that's another matter I guess.
- dataflow 5y agoAlso note that the user will be confused when they delete the whole directory and observe 0 bytes get freed. (I guess a similar problem is also there even if you double count.) The point is, the problem itself is-ill defined. There's no solution to that other than scrapping or redefining the problem itself. And it's hard to define the problem precisely for a non-technical user.
- glandium 5y ago> Also note that the user will be confused when they delete the whole directory and observe 0 bytes get freed. Note that's already the case when the user removes files that are opened by some process.
- aulin 5y ago> Programs updating file name when you rename from the file manager Doesn't inotify provide move events that allow that?
- yjftsjthsd-h 5y agoIf every application uses inotify and correctly handles the events, I expect so. Which brings us back to "even if you can do it good luck getting buy in".
- aulin 5y agoIf you can't get applications to handle events on linux, good luck with a hobbyist pet-OS.
- delusional 5y agoThe entire point of OP was that all the applications are made by the same team. There are no 3rd party applications.
- CyberRabbi 5y agoThe universal tabbing is a genius feature.
- userbinator 5y agoor the file manager showing when files are open On Windows and Linux this is not difficult, I believe; the functionality is already present in things like https://docs.microsoft.com/en-us/sysinternals/downloads/handle https://docs.microsoft.com/en-us/sysinternals/downloads/hand... and lsof.
- pjerem 5y agoAgain, it depends on how the application accessing the file is developed. If your program just read to copy in memory then closes the file, waiting for the next save to reopen it, the OS can’t know on which file you are working. And this, i think, must be a pretty common implementation.
- userbinator 5y agoIf it closes the file, then it wouldn't be an open file?
- ghusbands 5y agoHere, I think "open" means "being worked on in some app", rather than "has an active file handle".
- grumbel 5y agoYou can use inotify to figure out what files are opened, closed or when they are written too. Can be used for example to indicate active file downloads in the file manager. However I don't think that's quite enough, as most apps will close the files again after they have read them. There is no need to keep them open, as you are working on their in-memory representation, not on the file on the disk until you hit 'Save'. So this seems more like a desktop level feature similar to "Recent Files", where the apps has to manually announce what it is doing instead of relying on low level file operations to figure it out.
- colordrops 5y agoTabbing like this is auported by the Sway window manager, and probably also i3 since Sway is an attempt to be compatible with i3 configs.
- cryptonector 5y agoYour examples of (2) and (3) have nothing to do with the desktop, really, or, rather, they are about things that one could see reflected in the desktop if only they were feasible at much lower layers. "total size of subdirectories" is basically impossible as long as there are hardlinks. But hardlinks are useful, so. Even w/o hardlinks, if you have anything like ZFS snapshots and clones then you have multiple kinds of "total size" to show, like "total size" of all the files below vs. total space consumed by those files in this snapshot/clone. You could have hardlinks and all of them and then asynchronously update caches of sizes, but now you waste cycles on that and those cached sizes will often be wrong. You basically can't get there without making trade-offs that kinda suck. It's just better to not bother with this particular feature.
- ninjanomnom 5y agoYou're assessing the feasibility here making the assumption that a polling pattern would be used but this is exactly what an event based pattern is perfect for. As long as files are modified through the os you can propagate changes upwards and only update folder metadata when required. This is what the parent meant by moving the cost upfront. If your only option is polling you're right but we're talking abou an os from first principles here. You have the control to make sure all file changes go through the proper api and update the metadata to be as accurate as you like.
- cryptonector 5y agoThere's a lot more to it than that. For example, two links to a file in the same directory shouldn't count as doubling the space it consumes in that directory nor all its parents -- that's an easy case to consider, but there are others that are much harder.
- ninjanomnom 5y agoAdding different kinds of measurements of size doesn't particularly increase the difficulty of tracking it here, just adds some more fields to the metadata and maybe some additional events. To take an example of size data types from another thread, let's imagine you want to track 2 kinds of size: size as read sequentially (A) and size gained if deleted (B). The first cares about links but the second does not. Every folder would track the size of sub-directories by listening for size calculation events firing on the contained files and folders. A lowest level folder would listen to the events of all its files and update it's own size metadata, this triggers another event that any parent folder is listening to, repeat. A link would just listen to the event of its linked file or folder and would only indicate size updates as relevant to the size data type A. This information gets propagated upwards normal. As you say, there's a lot of details here but I'm not coming up with any blockers that would invalidate the pattern. It's a very flexible system and I've written this sort of propagating update before with future features all being simple to add. If you can think of any blockers I would be very happy to hear them so I can design around it next time I touch a project like this.
- robertoandred 5y agoTabbed windows are a built-in feature of native Mac apps.
- pjerem 5y agoSorry but I will need a screenshot and how to do to believe you.
- dkdbejwi383 5y agohttps://www.macrumors.com/2016/09/20/macos-sierra-tabbed-windows/ https://www.macrumors.com/2016/09/20/macos-sierra-tabbed-win...
- eecc 5y agoI’m pretty sure it’s tabbing within the same application. What would be interesting to see how useful it would be, is heterogeneous tab grouping (tabs from different apps)
- paride5745 5y agoThe universal tab windows is implemented in Haiku since years.
- Lammy 5y agoRE: tabbed windows, try Stardock's "Groupy" if you're on Windows: https://www.stardock.com/products/groupy/ https://www.stardock.com/products/groupy/ This was going to be built in to Windows 10 v1903 as "Sets" but it got pulled: https://www.howtogeek.com/352109/how-to-use-sets-in-windows-10-to-organize-apps-into-tabs/ https://www.howtogeek.com/352109/how-to-use-sets-in-windows-...
- asddubs 5y agoI think the vector based UI should be on the list somewhere. Really smart solution to the HiDPI problem that gives you easy arbitrary scaling without any awkwardness
- joshspankit 5y agoI genuinely have no idea why vector-based UIs have not become common already in at least one of the major OSs’
- phyrex 5y agoIIRC macOS’ GUI is using PDF (or postscript?) as it’s top layer
- native_samples 5y agoThey have, no? GNOME/KDE have supported SVG icons for years, the themes are usually vector based. I don't think there are necessarily many bitmaps in a default modern GNOME install. For macOS the reason is simple and deliberate: it's much easier for artists to make beautiful icons as bitmaps. They can use Photoshop and not just vector editors. Given that screen resolutions increase at a somewhat slow and predictable pace it means they can just redraw icons at higher resolutions from time to time to keep up with their hardware changes. They like to change art styles anyway.
- asddubs 5y agoWell, they don't have it in such a way that things are arbitrarily scaleable (although things are slowly moving in that direction). If you look at the demo video you can see the entire GUI scale right up and down in real time
- swiftcoder 5y ago> Features that only work if you have really tight integration ... Programs updating file name when you rename from the file manager ... Even systems like MacOS are going to struggle MacOS has actually had this one in the bag for a couple of decades now (likely due to their really tight integration).
- CRConrad 5y agoDoesn't even Windows do that? Rename a file in File Explorer, and the app that has it open pops up a dialogue saying "File So-and-so has been renamed.", or some such. But maybe that's because the app has to do the work of keeping track of it (though probably via hooks into the OS / Explorer), so it's not fully automatic? Can't recall if all apps do it, think I've only noticed it in a few.
- dzonga 5y agowindows back then, used to do that. I think XP / 7 days.
- nine_k 5y agoFile watching API is a thing on most OSes. It's up to the app to actually use it and offer a nice UI flow around it.
- marcellus23 5y ago> It's up to the app to actually use it and offer a nice UI flow around it. No, the OS can provide frameworks that handle it by default, so app devs don’t have to worry. macOS does this.
- pjmlp 5y agoAn example of 1) were the Windows Sets that were planned for Windows 10 and eventually dropped due to integration issues with legacy Win32 apps
- addicted 5y agoI think the point of the tabbed windows isn’t so much window tabbing, as the idea that the window belongs to the user and not the app. The user manages windows and not apps. Currently, this is being leveraged in tabbed apps, and in the ability to open a window, resize it, etc and then decide which app should show itself in that tab of that window. But the paradigm change itself could potentially lead to new workflows, etc if creative app developers and designers really start working woth it.
- BeFlatXIII 5y ago> Programs updating file name when you rename from the file manager, or the file manager showing when files are open... might be possible to graft on to other systems, but it'd be a right pain. Even systems like MacOS are going to struggle - the whole OS is under one company that could do cross-functional stuff like that, but any time it touches applications you need external developers to support it and that may or may not work out. I thought Mac OS apps could and did do just that. Perhaps it's an inconsistent behaviour that depends on the developer implementing it rather than something that comes for free by using Swift UI or Cocoa.