Oh, I see. They trying to be smart and say "cross-platform" because now it runs on more Linux distros. That's not smart, that's faulty marketing. And AFAIK it already was running on 90% of Linux and also on MacOS.
No, it's accurate marketing. Asking for htop to be available on windows is kinda silly if you recall that htop is "top++" and depends on having a unix filesystem.
It doesn't do that. Before the multiplatform changes it did depend on having procfs (linux's I assume since BSDs had a non-identical procfs yet weren't supported), aside from the OSX fork which ripped out all the /proc access and replaced them with OSX API calls. What it does depend on is ncurses.
"Until it supports MY specific OS, it's not cross-platform, wah wah wah!" In this way, there is no cross-platform program at all, because there's always something that's not supported. How is Windows a measuring-stick of compatibility for UNIXlike tools? (And why would this ever be useful on Windows, which has completely different way of managing processes?)
I very much doubt that Windows is the "most used OS" where console applications are considered. That's just like saying "why do you call this airplane engine cross-platform when you can't even use it on a car? I don't care that it fits most airplanes, there are far more cars!" Different purposes.
Comments (153) 37 threads
Show all comments
Showing thread 37 of 37
Oh, I see. They trying to be smart and say "cross-platform" because now it runs on more Linux distros. That's not smart, that's faulty marketing. And AFAIK it already was running on 90% of Linux and also on MacOS.
"Cross-platform" is a contextual term.
It doesn't do that. Before the multiplatform changes it did depend on having procfs (linux's I assume since BSDs had a non-identical procfs yet weren't supported), aside from the OSX fork which ripped out all the /proc access and replaced them with OSX API calls.
What it does depend on is ncurses.
It still uses procfs for Linux (since that's there by default), but not for the other ports. Consider Platform_getLoadAverage for instance:
* linux uses /proc/loadavg[0]
* freebsd and openbsd use sysctl({CTL_VM, VM_LOADAVG})[1][2]
* OSX uses getloadavg(3)[3]
[0] https://github.com/hishamhm/htop/blob/master/linux/Platform....
[1] https://github.com/hishamhm/htop/blob/master/freebsd/Platfor...
[2] https://github.com/hishamhm/htop/blob/master/openbsd/Platfor...
[3] https://github.com/hishamhm/htop/blob/master/darwin/Platform...