I got fed up of my SysAdmin "solutions", which always started life in
the shell, running commands, being forced into Perl/Python because I
needed to use an even slightly complex data structure or interface
with some library or data format and then be stuck with some less
elegant means of orchestrating commands.
So I've implemented Idio, a programming language (think: Scheme-ish)
which adds a couple of tricks:
1. user-defined infix operators for the reader to re-arrange the
incoming form: | is an obvious candidate for a shell, arithmetic
operators for a programming language
2. unbound variables evaluate to themselves, symbols, and if you try
to invoke a symbol then we break out of programming language mode
and hunt down the PATH for such a named command
It works tolerably well. Not all shell syntax can be carried over and
you can't be both a programming language and a shell all the time so,
on a few occasions the programming language wins out.
I'm not interesting in interactive sessions (though Idio should work
-- I use rlwrap for comfort), there are many far better interactive
shells. Idio is for scripting.
I also don't like ignoring errors so Idio will (overly)
enthusiastically quit if external commands fail -- there are
mitigations. Interactive sessions are more lenient by default.
It's also new and will (overly) enthusiastically quit of its own
accord if you type something I haven't anticipated. Please take that
into consideration.
New also means it's missing lots of things that might be obvious but I
haven't needed yet.
I got fed up of my SysAdmin "solutions", which always started life in the shell, running commands, being forced into Perl/Python because I needed to use an even slightly complex data structure or interface with some library or data format and then be stuck with some less elegant means of orchestrating commands.
So I've implemented Idio, a programming language (think: Scheme-ish) which adds a couple of tricks:
1. user-defined infix operators for the reader to re-arrange the incoming form: | is an obvious candidate for a shell, arithmetic operators for a programming language
2. unbound variables evaluate to themselves, symbols, and if you try to invoke a symbol then we break out of programming language mode and hunt down the PATH for such a named command
It works tolerably well. Not all shell syntax can be carried over and you can't be both a programming language and a shell all the time so, on a few occasions the programming language wins out.
I'm not interesting in interactive sessions (though Idio should work -- I use rlwrap for comfort), there are many far better interactive shells. Idio is for scripting.
I also don't like ignoring errors so Idio will (overly) enthusiastically quit if external commands fail -- there are mitigations. Interactive sessions are more lenient by default.
It's also new and will (overly) enthusiastically quit of its own accord if you type something I haven't anticipated. Please take that into consideration.
New also means it's missing lots of things that might be obvious but I haven't needed yet.
Let me know what you think.