Live data from Hacker News

Essence: Desktop operating system built from scratch

nakst.gitlab.io

51–60 of 299 posts

Re: Essence: Desktop operating system built from scratch

#51
post #49

Earlier quoted context omitted.

> 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.

Roughly 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 sol…

Not 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.

Re: Essence: Desktop operating system built from scratch

#52

Earlier quoted context omitted.

Its x86 only currently. I know the owner does want to add arm support but its not being worked on.

Curious, is porting complex C++ projects to arm64 just a matter of updating build/CI systems or does it actually involve changing core code and adding branches if (x64) {} ... if (arm64) {}.

All of the x86 assembly (see arch and boot/x86 dirs..) and any x86 assumptions being made elsewhere in the rest of the code is where the work is.

Re: Essence: Desktop operating system built from scratch

#53
post #2

I really think this is impressive. I also like the unique take on windowing. There's a video here: https://www.youtube.com/watch?v=aGxt-tQ5BtM Great job!

incredible work indeed. kudos to the author!

there is definitely a place for operating systems like this one in the future. the author is creating something many of us want: a system where the user is in control of their computer! fancy that! imagine not having to go retro but having total control of a modern machine.

i hope the author pulls this off.

Re: Essence: Desktop operating system built from scratch

#54
post #49

Earlier quoted context omitted.

> 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.

Roughly 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 sol…

Modern filesystems that use CoW will share data between files even without any hard links.

Re: Essence: Desktop operating system built from scratch

#55

Earlier quoted context omitted.

Its x86 only currently. I know the owner does want to add arm support but its not being worked on.

Curious, is porting complex C++ projects to arm64 just a matter of updating build/CI systems or does it actually involve changing core code and adding branches if (x64) {} ... if (arm64) {}.

Most user-space code is not difficult to port. An operating system is much more work.

Take a look at https://github.com/torvalds/linux/tree/master/arch/arm64

Re: Essence: Desktop operating system built from scratch

#56

Earlier quoted context omitted.

Its x86 only currently. I know the owner does want to add arm support but its not being worked on.

Curious, is porting complex C++ projects to arm64 just a matter of updating build/CI systems or does it actually involve changing core code and adding branches if (x64) {} ... if (arm64) {}.

For common programs it's not very difficult, usually just recompile. But if it uses assembly then you are out of luck. Also if it requires a library that uses it.

For an OS it is different, you need to reimplement many parts: bootloader, drivers, task scheduler, virtual memory...

Re: Essence: Desktop operating system built from scratch

#58
post #49

Earlier quoted context omitted.

Roughly 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 sol…

Modern filesystems that use CoW will share data between files even without any hard links.

Then you get into semantic arguments: If a directory contains 2 1GB files, does the user care that 99% of their blocks are shared, or that just an under-the-hood implementation detail, and the user wants to know that there are 2GB worth of files in there?

Re: Essence: Desktop operating system built from scratch

#60

The UI looks like early Chrome.

It sure does, which I find a weird inspiration for an desktop environment design.

Very ironic to see that along with the tagline "An operating system that respects the user".
Post reply on HN