←back to thread

412 points conanxin | 1 comments | | HN request time: 0s | source
Show context
pavlov ◴[] No.41085505[source]
The CLI has a massive blind spot in today’s operating systems: it knows nothing useful about events.

Yet events are the primary way anything happens on a computer, whether it’s a user system or a server.

replies(6): >>41085537 #>>41085570 #>>41086080 #>>41087545 #>>41088178 #>>41090695 #
skydhash ◴[] No.41086080[source]
In unix world, everything is a file, so you can poll the file waiting for something to happen. And there’s the whole signal thing and dbus exists.
replies(1): >>41086216 #
pavlov ◴[] No.41086216[source]
Yeah, these are the event paradigms that I meant by “nothing useful.”

Files are not a good abstraction for events. Signals are broken in many ways. And DBus is both extremely clunky to use and non-portable.

There isn’t a built-in event paradigm similar to how streams and pipes are an integral part of the Unix-style CLI.

replies(1): >>41086460 #
1. dandanua ◴[] No.41086460[source]
> Files are not a good abstraction for events

Why is that? On the low level everything is a state of electronic cells. Files address those cells in a suitable fashion. Modern programming abstractions such as async/await are very simple, but fail miserably if you need something really complex and efficient.