2 ms·
cli programs are not interoperable. Binary streams are not an interface, it's the lack of one. I can't goddamn pipe the CPU temperature into my display manager'
by kaba0 3y ago
cli programs are not interoperable. Binary streams are not an interface, it's the lack of one. I can't goddamn pipe the CPU temperature into my display manager's status bar without 3 different tools unmaintainable, easy-to-break invocations, that will break from something as innocuous as changing the locale. It's as much of an interface as randomly reading into the memory of another process.
- jampekka 3y agoThat you can do it with 3 different tools means that they are interoperable. That you can do this without hacking into some huge codebase or waiting someone to implement this specific feature. /sys/class/thermal/thermal_zone0/temp gives you the temperature in ASCII. It's about as simple and interoperable as an interface gets. I like that I can check it in terminal with cat /sys/class/thermal/thermal_zone0/temp when needed. I really like that I can check a remote computer's CPU temperature by doing ssh some.remote.host -C cat /sys/class/thermal/thermal_zone0/temp. If you have the commands to show that in your status bar, you can easily extend a local one to a remote one. You prefer to wait for remotehosttemperaturetostatusbarctl to appear in the AppStore? Or write and debug thousand lines of dbus juggling in C? I do agree that cli programs should be more interoperable in general. E.g. have more structured inputs and outputs akin to JSON or something, conform better to e.g. the GNU command line parameter spec and read stdin and write stdout and log to stderr by default.