[Nix-dev] Use Haskell for Shell Scripting

Ertugrul Söylemez ertesx at gmx.de
Tue Feb 10 00:18:59 CET 2015


>> Thanks!  However, I'd better not switch to a WM that I wouldn't enjoy
>> configuring.  Also I think that I've bent xmonad pretty much to its
>> limits and hit the abstraction wall.  Nowadays my configuration is a
>> whole cabalised package that I install via Nix.  If you're
>> interested, it's online [1].
>
> If you hit an abstraction wall, maybe you would actually enjoy doing
> what you originally wanted with access to lower-level abstraction.

For xmonad StackSet is the lowest level.  Using something different
amounts to writing a new window manager, a generalisation of xmonad.


> Well, StumpWM allows arbitrary splits, very useful for Lazarus, Gimp,
> etc.

Oh, this is not about splits.  Xmonad allows that, too, via layouts.
This is about the core data structure holding the current window
configuration (the associations between windows and workspaces, and
between workspaces and screens).  It is a core piece of the window
manager and cannot be modified by an addon.  Haskell allows to abstract
over this data structure easily, i.e. quantify over what is currently
"StackSet".  The problem is: Xmonad does not do that.  There is no
inherent technical difficulty in doing it, it just doesn't do it.

The equivalent in C++ would be to use templates instead of concrete
functions, but there is no good translation for type classes.  You
really want type classes for this kind of thing.


> Maybe you should try Ratpoison and give it commands from a Haskell
> decision-making piece of code? Ratpoison also has arbitrary splits, it
> is simpler than StumpWM and can do way less. Driving StumpWM
> externally shoud also be easy, although with larger overhead.

Generalising the xmonad source code would probably work better for me,
because it allows me to stay in Haskell land and use types the way I'm
used to.  Also I don't believe that a WM written in C can have what I'm
looking for at all (abstracting over the core data structure).  It would
have to be implemented by horrible pointer magic, and I don't want to
touch that, even if it were there.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150210/87ccee2b/attachment-0001.bin 


More information about the nix-dev mailing list