[Nix-dev] Use Haskell for Shell Scripting

Michael Raskin 7c6f434c at mail.ru
Tue Feb 10 17:19:06 CET 2015


>> Data type declarations are not free in any case, I think.
>
>Compared to what?  Algebraic abstractions usually compile to exactly the
>code you would have written if you had not used abstraction.

Data type declarations have to be written. Store-everything-in-hash-
tables is slower but quicker to write as long as I can keep the entire
program structure in my head.

Also I am trying to learn to write reasonable Haskell code for a small
data-crunching script without just "writing Fortran into Haskell"; well,
many of its features are minor annoyances in that mode even if they are
useful for giving structure to a large program.

>> Well, you started talking like you were considering some limitation of
>> XMonad hard to work around.
>
>I am.  I'm using a tree-shaped set of workspaces, but I need to encode
>this tree within the names of the workspaces, which is incredibly
>awkward.

Well, I think you should be able just to write alternative UI for
workspace selection simply ignoring the old one, no?

>>> So I'm probably already doing what you're suggesting, except that it
>>> doesn't look like Unix, because there is no "pipe" involved. =)
>>
>> Well, with sockets it is easier to do decoupling, and cross-language
>> development.
>
>Decoupling seems unrelated, but the cross-language point is valid of
>course.  Also sockets can work over a network.  So yeah, it's a
>tradeoff.  For my window manager I really don't want to go through that
>complexity.  It's written in Haskell, I'd like to configure in Haskell
>and I'm not planning to offload my WM state to another machine.  So I'm
>glad I can just use xmonad as a library.

If the limitations are not a problem, of course.





More information about the nix-dev mailing list