3 ms·
I wish that the OS and shell had better insight on how to run programs without need for specific library parsing libraries. I'd love to see programs communicat
by dietr1ch 3y ago
I wish that the OS and shell had better insight on how to run programs without need for specific library parsing libraries.
I'd love to see programs communicate through a typed JSON/proto format that shed enough details to make this more independent, and get useful shell command structuring/completion or full blown GUIs from simply introspecting the expected input and output types.
Today it seems that the best you can get is still made out of carefully placed straws as programs need to export completion files to many shells, there's vastly different styles for flags across programs and parsing libraries, and obviously, there's no GUIs around.
- SOLAR_FIELDS 3y agoKind of like some generic gRPC interchange/CLI API with native OS support? Something like that could be neat. I conjecture the main problem with gRPC is that a lot of developers (myself included) find dealing with it a bit unwieldy compared to more native (by native I mean in-language) solutions.
- Too 3y agoIf you look into IPC primitives in each OS you can find goodies that do expose structured metadata about what interfaces are available and how they can be called. D-Bus, sd-bus, COM, Binder, to name a few. It’s just that the tooling around it isn’t as easily exposed and they aren’t tailored for on-demand launch via command line. If the shell treated such as a more first class citizen, good results may come out. Another big problem is portability, if you designed your app with sdbus, it’s not going to work on a non systemd distro, even less on Windows. What’s needed is a standardized abstraction layer on top.
- Cloudef 3y agoNow you have a thing called powershell. Though as more serious answer plan9 was probably the only OS that really tried this.
- jay-barronville 3y agoIs there anything good Plan 9 hasn’t tried? I feel like every time I hear about a good OS idea, someone brings up Plan 9. Haha.
- jeroenhd 3y ago> I'd love to see programs communicate through a typed JSON/proto format that shed enough details to make this more independent, and get useful shell command structuring/completion or full blown GUIs from simply introspecting the expected input and output types. You should try PowerShell. It's basically Microsoft's .NET ecosystem molded into an interactive command line. I'm not entirely sure if PoweShell can make full use of the static types that build up its core, but its ability to exchange objects in the command line is almost unmatched. On Linux you can use `jc` (https://github.com/kellyjonbrazil/jc https://github.com/kellyjonbrazil/jc) combined with `jq` (https://jqlang.github.io/jq/ https://jqlang.github.io/jq/) to glue together command lines, but that's still two extra steps you need to deal with compared to PS's built-in capabilities.
- dietr1ch 3y agoI don't have a windows machine and I don't plan on having one. I didn't know of `jc`, but it seems that using nushell (https://github.com/nushell/nushell https://github.com/nushell/nushell) gets you a better experience.
- jeroenhd 3y agoPowerShell is available on macOS and Linux as well (source on Github: https://github.com/PowerShell/PowerShell https://github.com/PowerShell/PowerShell). It may not be as well-integrated with things like system services management, but the language still works well. You can still use all the command line tools you're used to on Linux, of course. nushell does look interesting, though the lack of a .deb repository does put it pretty low on my to-do list.