Linked by Thom Holwerda on Sun 22nd Apr 2007 20:06 UTC, submitted by ryan
Window Managers Xmonad was announced today on the haskell-cafe mailing list. It supports multiple monitors through xinerama. The unique part of this window manager is that it is written in Haskell in under 500 lines. Haskell is a purely functional programming language with very strong static typing to ensure correctness.
Order by: Score:
looks like...
by grzechu on Sun 22nd Apr 2007 20:58 UTC
grzechu
Member since:
2007-03-23

it looks like good old larswm...

Reply Score: 3

yay!
by jonte on Sun 22nd Apr 2007 21:08 UTC
jonte
Member since:
2005-07-06

hooray for haskell! it's not often you see software written in this wonderful language. ;)

Reply Score: 5

Crazy...
by B. Janssen on Sun 22nd Apr 2007 21:38 UTC
B. Janssen
Member since:
2006-10-11

I was thinking about writing a WM in Haskell only a few days ago... but I doubt I could do such a good job. The code is very clean and I'm glad to see that one of the authors is doing the Summer of Code project for the X11-Haskell bindings. Very promising.

Reply Score: 3

Interesting Project
by porcel on Sun 22nd Apr 2007 21:38 UTC
porcel
Member since:
2006-01-28

Very interesting and very impressive. Yet this will be of use to a very small subset of users as most window management operations have been standardized by now and most users would be at a loss without the usual minimize, mazimize and close buttons.

Reply Score: 4

RE: Interesting Project
by Rugmonster on Mon 23rd Apr 2007 02:31 UTC in reply to "Interesting Project"
Rugmonster Member since:
2005-11-18

I think user adoption rate is a little far from the author's motivation. It seems that he had something in mind for himself and if others have a use for it too, then score. Otherwise, I doubt he cares if he ever shows up as a blip against the various other WMs out there.

Lucky for him Microsoft dropped the "Monad" codename for their new shell already or he could have been ceased and desisted into another name.

Edited 2007-04-23 02:33

Reply Score: 5

RE[2]: Interesting Project
by bogomipz on Mon 23rd Apr 2007 13:20 UTC in reply to "RE: Interesting Project"
bogomipz Member since:
2005-07-11

Lucky for him Microsoft dropped the "Monad" codename for their new shell already or he could have been ceased and desisted into another name.

Even with "monad" being a language concept from Haskel, and the wm's code containing a monad named X, and thus naturally referred to as "the X monad", leading to the name Xmonad being pulled directly from its own source code?

Yeah, I already know the answer - "This is Microsoft we're talking about."

Reply Score: 2

RE: Interesting Project
by FunkyELF on Mon 23rd Apr 2007 04:52 UTC in reply to "Interesting Project"
FunkyELF Member since:
2006-07-26

Have you heard of <a href="http://en.wikipedia.org/wiki/Stumpwm">Stumpwm

Reply Score: 1

RE: Interesting Project
by Doc Pain on Mon 23rd Apr 2007 22:05 UTC in reply to "Interesting Project"
Doc Pain Member since:
2006-10-08

"[...] most users would be at a loss without the usual minimize, mazimize and close buttons."

At least, some window managers don't follow this concept. Excuse me for just mentioning this: I'm using WindowMaker for more than five years now. It does not have any minimize or maximize buttons, and I never found I needed or missed them. I've even turned off the close button for some applications (since I closed one accidently). Instead, roll up or blind out, next to focus follows mouse, focus on window in background, set window back (instead of just setting it to front) are the functions that are important to me. And NB, that's my very individual opinion without any claim that others should share it.

As always in the UNIX and Linux world: Choose the tool that does fit your needs best. :-)

To come back to the article: Haskell is an interesting language and it offers some opportunities for educational use. I'm surprised to see such a useful tool written in this language, really impressing, because I never found Haskell programs in the "real world"...

Reply Score: 2

Now this is OS News
by bservies on Sun 22nd Apr 2007 22:22 UTC
bservies
Member since:
2006-05-27

Very interesting. I'm bored with C-like languages and the scripting language of the day. While I have a preference for data flow languages (I miss Prograph), Haskell looks cool.

Reply Score: 3

500 lines
by Andre4s on Mon 23rd Apr 2007 06:32 UTC
Andre4s
Member since:
2006-02-10

I't does not look very advanced but below 500 lines is still impresive.

Reply Score: 1

dwm
by jessta on Mon 23rd Apr 2007 08:09 UTC
jessta
Member since:
2005-08-17

It looks good.
I use dwm, it's C cousin as my current WM.
It's really nice.

Reply Score: 2

axilmar
Member since:
2006-03-20

Abundance of IO, just like in every other Haskell program. What's the point of pure functional programming, if I have to use IO at every other line?

Reply Score: 1

Morin Member since:
2005-12-31

> Abundance of IO, just like in every other Haskell program. What's the
> point of pure functional programming, if I have to use IO at every other
> line?

There is no real justification for that. The IO monad just models imperative programming in a purely functional way. There is no advantage over other imperative languages that way, except that you can easily combine imperative and functional programming without a lot of trouble. My guess is that we will see progamming languages in the future that support both functional and imperative programming and make programming in both, as well as combinations, simple (Lisp is not what I mean here because it doesn't separate the two different concepts at all).

My experience is that a greal deal of a program can be done without IO. "every other line" is a bit of an exaggeration. I haven't looked at the code of Xmonad, but for a simple window manager I expect a lot of X communication code to be present, which of course uses IO a lot. You can expect the percentage of IO-using code to drop as soon as the data models of a program grow more complex (that is, if you go and re-build something like GNOME/KDE in Haskell).

Reply Score: 2

rayiner Member since:
2005-07-06

Call me a dissenter, but I think if you need something like monads to abstract something simple that every program has to do (mutation), then your language model is conceptually flawed. In elegant theories, basic concepts fall out of the fundamental logic. They don't have to be wrapped up in order to be compatible with it.

But hey, I think LOOP is neat, clearly I have no taste...

Reply Score: 3

Morin Member since:
2005-12-31

> Call me a dissenter, but I think if you need something like monads to
> abstract something simple that every program has to do (mutation),
> then your language model is conceptually flawed. In elegant theories,
> basic concepts fall out of the fundamental logic. They don't have to be
> wrapped up in order to be compatible with it.

I have to agree with you here. As much as monads are based on a solid theory, they are still a workaround to get mutation and side-effects into Haskell. A nice one, but still a workaround.

In the end, you have to estimate how much the monad handling will clutter your code for a given project, and then decide whether Haskell is your language of choice.

Reply Score: 2

renox Member since:
2005-07-06

>My guess is that we will see progamming languages in the future that support both functional and imperative programming and make programming in both, as well as combinations, simple.

Such language exist since a long time: Ocaml allows both style, and it's quite fast too.
While I don't like much Ocaml's syntax, its clone F# (on .Net) has a nice syntax.

Unfortunately while Ocaml has been around for quite some time, it didn't gather a lot of momentum..

There's Scala too which provide an interesting mix of OO and functional style, with a nice syntax (on top of the JVM so it has access to Java code).
I don't know if Scala's gathering developers mindshare or not..

Reply Score: 2

rayiner Member since:
2005-07-06

What necessary separation do you see missing in Lisp? Are you referring to the fact that that imperative constructs aren't clearly demarcated in Lisp programs?

I don't disagree with your point, I'm just curious about the reasoning behind it.

Reply Score: 2

Morin Member since:
2005-12-31

> What necessary separation do you see missing in Lisp? Are you
> referring to the fact that that imperative constructs aren't clearly
> demarcated in Lisp programs?

Yes, exactly. Lisp isn't really *missing* anything in that regard, but you have to force yourself to keep the functional and imperative parts recognizable.

Reply Score: 2

Cool Ion clone in Haskell
by openwookie on Mon 23rd Apr 2007 14:28 UTC
openwookie
Member since:
2006-04-25

This WM reminds me of Ion.
Cool that it's written in Haskell though.

Reply Score: 1