> Idio is a programming language for orchestrating commands like a shell. It is asking the question, can we write better shell scripts by integrating shell-like constructions into a programming language?
I think the answer is "no" :-).I suspect it would be "better" to have shell programs read parameters in a popular semi-structured format like JSON. Orchestrating commands would then be about creating a tiny bit (or a lot... ehem... say, ffmpeg anyone? :-p) of JSON in any way one likes.
Then we could do something like: `system("ffmpeg", someJsonParams)`
Perhaps we could prototype something like this on top of busybox [1]:
* Make it so all parameters to all commands can be provided with a JSON blob.
* The output would be JSON itself too, so we won't have to do silly things to parse it.
* Things like progress and debug output could go to stderr so we can still have percent progress bars and other nice things like that.
* When piping output in some shell, we could use msgpack or some other JSON encoding to avoid having to lex and parse all the time.
* If a program doesn't provide these features, it could be wrapped by some "launcher" program that would do the cmd-line-to-JSON and output-to-JSON transforms.
* A shell could always try to do some pretty-printing as last step in some generic way, thus a human would not have to read JSON output all day long :-).
Augeas does something like this but for config files, kind of a related concept I think: "It parses configuration files in their native formats and transforms them into a tree. Configuration changes are made by manipulating this tree and saving it back into native config files." [2]. one could think of input parameters as an additional config file, or a file coming from std in. For augeas, everything is a tree though, in its own defined format.