[Haskell-cafe] "Graphical Haskell"

peterv bf3 at telenet.be
Fri Jun 22 11:38:18 EDT 2007

Wow thanks for all the info! This certainly can get me started.

And yet I have some more questions (sorry!):

- Unfortunately this project won't be open source; if my first tests are
successful, I will try to convince my employer (who wants to develop such a
graphical language) to use Haskell for building a prototype instead of
C#/F#/Java. Can Haskell be used for creating commercial projects? When the
product is released, it *will* be downloadable for free, but the source code
won't be (most likely). 

- If my employer agrees on Haskell, and when our first round of investment
is completed, we will be looking for a couple of good Haskell developers.
What would be the best place to look for good Haskell developers? This
mailing list? Ideally development will have to take place in
Antwerp/Belgium, although we might work with remotely located freelancers.
We prefer agile development (SCRUM, and maybe we will be doing extreme
programming, to be decided) with a small group of capable people. To get an
idea of what my employer is doing, visit http://www.nazooka.com. My
colleagues and I wrote most of the software for doing this back in the
1990s, and of course the real work is done by 3D graphics artists.

- Regarding GUIs, does a real FP-style GUI exist instead of those wrappers
around OO GUIs? I did some searches but besides some research papers about
FranTk and wxFruit I only found wrappers such as Gtk2Hs and wxHaskell that
use a lot of monadic IO. It's very hard for an old school OO style
programmer like myself to switch my mind into lazy functional programming
(although I think I've seen the light yesterday when digging deep into the
FRP of the SOE book, LOL ;-).
- Functional reactive programming like looks cool (I only looked at the SOE
book, must still look at Yampa), but somehow I feel this is still an active
area of research. What is the latest work on FRP (for GUIs / games /
animation / simulations...)? What are the major open issues? 

- Regarding performance (for real-time simulations, not GUIs), I think the
garbage collector will get really stressed using FRP because of all those
infinite lazy streams; my gut feeling says a generational garbage collector
like Microsoft's .NET could help here (but the gut is often wrong, see
http://www.youtube.com/watch?v=RF3m3f9iMRc for an laugh ;). Regarding the
GC, is http://hackage.haskell.org/trac/ghc/wiki/GarbageCollectorNotes still

Okay, that's enough for now. More is less...

- Peter

-----Original Message-----
From: haskell-cafe-bounces at haskell.org
[mailto:haskell-cafe-bounces at haskell.org] On Behalf Of Claus Reinke
Sent: Friday, June 22, 2007 14:02
To: haskell-cafe at haskell.org
Subject: Re: [Haskell-cafe] "Graphical Haskell"

> Since nobody gave an answer on this topic, I guess it is insane to do it
> Haskell (at least for a newbie)? :)

not necessarily; we're all waiting for your first release?-)

> I would like to create a program that allows you to create such flow
> and then let GHC generate the code and do type inference. 

spun off from dazzle, which you've found, there's also blobs:

> Now, instead of generating Haskell code (which I could do first, would be
> easier to debug), I would like to directly create an AST, and use an
> API to communicate with GHC. 

one thing to consider: things get a little more tricky when the generated
haskell and dynamically loaded code is meant to do graphics (such as 
updating the original diagram with the state of the simulation). in
check that the gui framework actually works via that more circuituous route 
(similar problems to running in ghci instead of ghc).
> I already found out that GHC indeed has such an API, but how possible is
> this idea? Has this been done before? 

the ghc api is meant to support this kind of endeavours, and it isn't frozen
yet, either: the ghc team is happy to receive feedback about things that
or things that could work better.

before the ghc api, before blobs (after dazzle, though;), i did an embedding
of haskell-coloured petri nets in haskell, with a very simplistic graphical
net editor on top of wxhaskell, which generated haskell code for the net,
then called ghci to type-check and run the resulting code with a copy of
the original net graphics to update during simulation (poor man's


it worked, but some things were annoying: 

- no high-level support for writing graph editors in wxhaskell;
    blobs aims to fix that

- awkward meta-programming and runtime reflection;
    ghc api should help a lot (but i can't see anything wrong with
    letting it work on generated source code first; optimization can
    come latter)

- wxhaskell encourages low-level dependencies, at least when
    you're writing your first wxhaskell programs, because it can
    be rather difficult just to find the function you need, you're
    tempted to use it right there, just to see if it works, and leave
    cleaning up for later, which never comes; 

    gui frameworks are worse than the io monad; try to abstract 
    and limit your uses of gui lib features to as few modules as 
    possible; nicer code, easier to switch to different framework

- abi incompatibility!!^*L"$W&%*^"%*! 

    sorry,-) but that has become the deal breaker for me; it is
    bad enough that there are two major haskell gui libs out
    there, as it means that your clients may have the wrong one
    or none at all, and need to install the one you need; but,
    worse than that, whenever there's a new ghc release, 
    everybody needs to rebuild their gui libs, and if you
    have the latest ghc release and a recent ghc head installed,
    you even need separate copies of the gui lib, etc, etc. 

    so you use a nice high-level language to get a lot done
    in very little very portable code, but instead of distributing
    a few pages of haskell, with build as simple as ghc --make,
    you have to worry about rather huge gui lib installations,
    and you have to worry anew for each ghc release..

btw, i am thinking about reviving my hcpn project, to make 
use of the ghc api, but i'd like to get rid of the binary gui lib 
dependency first. my current take on this is "gui lib? no, 
thanks, i'm just  browsing", if you know what i mean?-)


Haskell-Cafe mailing list
Haskell-Cafe at haskell.org

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.9.1/857 - Release Date: 20/06/2007

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.9.1/857 - Release Date: 20/06/2007

More information about the Haskell-Cafe mailing list