[Nix-dev] Use Haskell for Shell Scripting
Anderson Torres
torres.anderson.85 at gmail.com
Sun Feb 1 05:12:49 CET 2015
2015-01-31 22:24 GMT-02:00 Ertugrul Söylemez <ertesx at gmx.de>:
>> What about other languages as Python, Perl etc.? I know it is against
>> our purity standards, but they are a far superior to Bash scripting.
>
> Well, that's the current state of the art. They are both used in
> Nixpkgs and some Nix-related tools. They are an improvement over Bash
> scripting, but I believe we might as well go all the way and use a
> functional language.
>
> Also the Nix model allows us to compile all our scripts easily (just
> apply a function), which might hold some benefit in terms of startup and
> switch times. There is little reason to use interpreted scripts when
> you have a fast compiler.
So, Chicken appears to be a good choice: it can be both interpreted
and compiled, very fast and with little overhead. And it can be easily
debugged - it's functional, after all!
I think Haskell is as much as overkiller - there is even a project
about it: Nix Evaluator in Haskell[1]. It is easier to use a less
ambitious and more funny language (in the Python sense of funny
programming).
What about to start a project to implement Chicken as script
supporting language for Nix? I would like to help!
1 - http://lists.science.uu.nl/pipermail/nix-dev/2014-July/013624.html
More information about the nix-dev
mailing list