[Haskell-cafe] GUI-Woes

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Tue Mar 14 05:35:02 EST 2006

On Tue, 2006-03-14 at 09:45 +0300, Dmitry V'yal wrote:
> Christophe Poucet wrote:
> > I have to concur with Duncan.
> > 
> > I started using Gtk2Hs for a small project and literally within a couple
> > hours I had a good understanding upon which to build a nice gui as well as
> > the gui itself.  I haven't tried out wxhaskell, but trying gtk2hs and it's
> > cairo bindings, I fell in love with the simplicity.
> > 
> > Cheers
> > 
> I like gtk2hs too. I used it to make gui for my several toy projects. My
> experience was mostly positive, but I had some troubles:
> 	First of all, it's just a binding to GTK+, so if you don't have an expirience
> with it (as in my case), you have to learn both GTK+ and gtk2hs simultaneously.

Yeah, we know we're rather lacking in Haskell-oriented tutorials. It's
something we hope to have done for our upcoming 1.0 release.

> 	Secondly, I'm absolutely not satisfied with a size of produced binaries. I
> hope, I just made something wrong, but I got a 3 megabyte behemot after
> compiling and stripping my 300-line program. I compiled it with ghc-6.4.1 with
> "ghc --make Main.hs". objdump -T shows a myriad of symbols with gtk_ prefix and
> I have a hard time guessing what most of them are doing where :)

You didn't do anything wrong. By default that's what happens with large
libs built with ghc.

However, the current development version (and so the next release
version) of Gtk2Hs has support for ghc's "split objects" feature. With
this, a simple Gtk2Hs Hello world program is only 30% larger than a
trivial Haskell hello world program (main = putStr "Hello World!").


More information about the Haskell-Cafe mailing list