[Haskell] Haskell Xlib bindings

Rob Hoelz hoelz at wisc.edu
Tue Feb 13 14:24:00 EST 2007


Simon Marlow <simonmarhaskell at gmail.com> wrote:

> Sven Panne wrote:
> > On Tuesday 13 February 2007 14:15, Simon Marlow wrote:
> >> This all seems reasonable if the goal is to provide an XCB layer in
> >> Haskell. But I have to ask the question: why?  The only user of
> >> the X11 lib is HGL, and that's been ported to GtkHs now (ISTR), so
> >> who are the clients for an XCB layer? [...]
> > 
> > The conclusion of the above reasoning would be "rm -rf
> > libraries/X11", but I wouldn't go that far... ;-) And similar
> > arguments could be made for Win32. Anyway, I think there are a few
> > reasons why something like XHB could make sense:
> > 
> >    * Fewer dependencies (no Xlib needed)
> > 
> >    * Automatic generation of almost all parts, leading to a very
> > consistent API
> > 
> >    * Availability of dozens of protocol extensions for X11 for
> > free, the X11 package has only the bare bones X11
> > 
> >    * The possibility to use XHB in a multi-threaded setting (Xlib
> > has only very arcane support for this, so everything is basically
> > single-threaded)
> > 
> >    * Although Xlib will definitely stay with us for a long, long
> > time, it seems to be a bit "deprecated".
> > 
> >    * The current X11 package needs a serious code review to fix the
> > types.
> 
> I think you misinterpreted me slightly: I didn't mean to ask "why XCB
> when we have an Xlib binding?", I'm asking "why do we need either?".
> Who is going to use it?  Is someone planning to write a widget set in
> Haskell?
> 

I think having an Xlib module is important; there's low-level stuff you
might need to do in Xlib that isn't practical to do using GTK/Qt.  Or
you might want to build a light-weight application. Etc, etc.

> Win32 is different: it is a layer used by the vast majority of
> Windows apps, because it encompasses not just the GUI but also the
> core OS services.  X11, in contrast, is used by hardly any apps.  I
> couldn't find anything in HackageDB that depends on it, apart from
> HGL.
> 
> > Apart from that, there are a few personal interests:
> > 
> >    * Improve my rusty XSLT skills
> > 
> >    * Test the available XML tools in/for Haskell
> > 
> >    * Get some ideas for a better networking package. BTW: What is
> > the status of this? Is anybody already working on this? The current
> > package has no clean layering, lacks most modern networking
> > features, does a few things "behind the back" (which is often not
> > what one wants), etc. Although I do not have enough time to push
> > this actively, I would be very interested in joining such a "Let's
> > build a better network package" task force...
> 
> Definitely with you there.  Revamping network would be tremendously
> useful.
> 
> Cheers,
> 	Simon
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries


-- 
-Rob Hoelz


More information about the Libraries mailing list