[Haskell-cafe] Poll & plea: State of GUI & graphics libraries in Haskell

Sylvain HENRY hsyl20
Wed Oct 2 13:53:15 UTC 2013


Hi,

The best low-level foundation libraries that I know of are the 
Enlightenment Foundation Libraries (EFL) [1,2]. They are cross-platform 
: they support many backends (X11, OpenGL, framebuffer...) and are used 
on desktops and mobile devices (even to provide games on the French Free 
ISP box). It seems that they also work on exotic platforms such as 
Windows and Mac OS.

They are fully written in C, hence are easy to build and to use from 
Haskell.

Evas [3] is a stateful canvas onto which shapes and texts can be drawn. 
It supports OpenGL regions [4]. Ecore [5] is used to manage windows, 
timers, etc. especially with Ecore_Evas [6]. Edje allows you to clearly 
separate UI and the rest of the code. The same thing has been integrated 
into Qt with QML (and was present in Delphi decades ago ;)). It makes it 
easy to create animated UI, etc. Finally, Elementary is a standard 
widget toolkit based on Edje, Evas and Ecore.

The good news is that I have been working on an Haskell binding for the 
EFL [7]. The bad news is that it is not complete. Evas, Ecore and 
Ecore_Evas are partially done but need more polishing and testing. This 
simple example here [8] works well in GHCI (even better than when the 
program is compiled because I haven't yet figured out why the text is 
not displayed in this latter case...).

I do not plan to write bindings for Edje and Elementary as I would 
prefer an Haskell DSL to replace Edje and a widget toolkit on top of it 
(another project seems to provide some bindings for Elementary [9]).

If you want to use the EFL as a "working foundation", I can try to work 
a little bit more on the binding.

Cheers
Sylvain

[1] http://en.wikipedia.org/wiki/Enlightenment_Foundation_Libraries
[2] http://www.enlightenment.org/p.php?p=about&l=en
[3] http://docs.enlightenment.org/auto/evas
[4] http://docs.enlightenment.org/auto/evas/group__Evas__GL.html
[5] http://docs.enlightenment.org/auto/ecore/
[6] http://docs.enlightenment.org/auto/ecore/group__Ecore__Evas__Group.html
[7] https://github.com/hsyl20/graphics-efl
[8] https://github.com/hsyl20/graphics-efl/blob/master/examples/Simple.hs
[9] https://bitbucket.org/arrowdodger/efl-haskell

Le 27/09/2013 05:32, Conal Elliott a ?crit :
> I'm polling to see whether there are will and expertise to reboot 
> graphics and GUIs work in Haskell. I miss working on functional 
> graphics and GUIs in Haskell, as I've been blocked for several years 
> (eight?) due to the absence of low-level foundation libraries having 
> the following properties:
>
> * cross-platform,
> * easily buildable,
> * GHCi-friendly, and
> * OpenGL-compatible.
>
> The last several times I tried Gtk2hs, I was unable to compile it on 
> my Mac. Years ago when I was able to compile, the GUIs looked and 
> interacted like a Linux app, which made them awkward and upleasant to 
> use. wxHaskell (whose API and visual appearance I prefered) has for 
> years been incompatible with GHCi, in that the second time I open a 
> top-level window, the host process (GHCi) dies abruptly. Since my GUI 
> & graphics programs are often one-liners, and I tend to experiment a 
> lot, using a full compilation greatly thwarts my flow. For many years, 
> I've thought that the situation would eventually improve, since I'm 
> far from the only person who wants GUIs or graphics from Haskell.
>
> About three years ago, I built a modern replacement of my old Pan and 
> Vertigo systems (optimized high-level functional graphics in 2D and 
> 3D), generating screamingly fast GPU rendering code. I'd love to share 
> it with the community, but I'm unable to use it even myself.
>
> Two questions:
>
> * Am I mistaken about the current status? I.e., is there a solution 
> for Haskell GUI & graphics programming that satisfies the properties 
> I'm looking for (cross-platform, easily buildable, GHCi-friendly, and 
> OpenGL-compatible)?
> * Are there people willing and able to fix this situation? My own 
> contributions would be to test and to share high-level composable and 
> efficient GUI and graphics libraries on top of a working foundation.
>
> Looking forward to replies. Thanks,
>
> -- Conal
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20131002/2732812b/attachment.htm>



More information about the Haskell-Cafe mailing list