FRP GUI - reactive-banana + threepenny-gui = awesome

Just two weeks ago, I made the first public release of threepenny-gui, a cheap and simple library to satisfy your immediate GUI needs in Haskell. It uses the web browser as a display and is very easy to install.

Of course, it was clear that if I release a GUI library, then this would soon be followed by a binding to my functional reactive programming library reactive-banana. And indeed: Today, I am pleased to announce the release of reactive-banana-threepenny together with a new snapshot release v0.2 of threepenny-gui.

Reactive-banana-threepenny

The reactive-banana-threepenny library provides a small amount of glue code that makes it easy to bind to the GUI library. It is similar to and supersedes my previous bindings to wxHaskell.

In addition, it provides a lot of examples, which are now very easy to install via hackage. While the threepenny-gui libary is still in early development, I have implemented just enough functionality to make all examples run. In particular, here’s a screenshot from the Asteroids game:

That’s right, this thing is displayed in the web browser, but it’s written completely in Haskell and uses FRP. It works and it’s easy to install. Isn’t that awesome?


While the new library makes it possible to implement cheap GUIs with FRP in Haskell today, the FRP code is still fairly separate from the GUI code. This can be a good thing because it allows us to switch GUI frameworks easily, but it can also be a bad thing because it involves a small but noticeable amount of boilerplate code. My goal is to make GUI programming easy, so I will hopefully find ways to make the integration much tighter.

Advertisment

Howdy, cowboy, it’s advertisment time! If you like the reactive-banana project, you can support me with a small donation: Flattr this!. If you link your github account to your Flattr account, you can simply star a project on github in order to flattr it.

Comments

Some HTML formatting is allowed.