Follow

@thor i'm a bit short on time, thus terse.

> even if less elegant in some ways, one benefit of doing it that way is separation. failures don’t propagate easily across processes. that’s one of the reasons people have been pushing microkernels for so long.

the *nix way is curse and blessing. if everything would output tab and newline seperated data it would be fine. reality is that every program has a variation on this which makes parsing output hell at times. E.g. i bet most uses lf ffmpeg don't parse stderr and just check the exit code. the improved error handling is what you get for closer coupling, e.g. using a library.

i think erlang is pretty interesting in this regard, and quite what you describe with the message passing between programs.

@bonifartius @thor the main issue with that is how the entire ecosystem is made for passing strings around. Strings are the lowest common denominator - they can contain any value or data structure, badly. I think Microsoft tried to improve on that by adding basic type handling in PowerShell, but it went nowhere because Microsoft and closed, windows-only software.

It would be nice if the shell community would get together and revisit the idea, as the possibility of passing binary data with generic type annotations would make shell plumbing both more efficient and less of a pain in the ass. On the other hand the sheer scale of such an undertaking in a way that would make everyone happy, and the inertia cost of changing one of the most widely adapted standards in the world makes it unlikely.

@Amikke @thor powershell is open sourced afaik (except windows parts). there is a rather good paper about the ideas that went into it.

i think that strings are still the best solution we have for shells. i can solve problems today, using the same tools invented _decades_ ago. if this will be the case for other ideas is questionable, even if they might be more elegant. for shell usage flexibility reigns.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.