[Haskell-cafe] The Yampa Arcade: source code available?

Peter Verswyvelen bf3 at telenet.be
Tue Nov 20 06:46:59 EST 2007

Thanks for the feedback. Unfortunatly the Space Invaders game uses HGL, 
which is not supported on Windows anymore. Is it supported on Linux?

Frag does compile and run on Windows using GHC 6.6.1, so that might be a 
better starting point.

What is the current consensus regarding (A)FRP? Is it a dead end? Are 
approaches like Modelica <http://en.wikipedia.org/wiki/Modelica> better 
suited for the job?

 From the point of view of a veteran assembly/C++ game hacker like 
myself, it is funny to see that the same problems popup when doing 
"reactive programming" in a pure language like Haskell or an imperative 
language like C++... Recursive dependencies are problematic, be it with 
signals in FRP or with objects in C++. In videogames using an imperative 
language, this is often solved by just adding a global "single frame" 
delay between what is read and what is written. Ugly, but works in many 
cases. Or a third object is introduced that breaks the recursive 
dependency between the two problematic objects. If I'm correct, when 
switching from FRP to AFRP signals (type Signal a = Time -> a) are no 
first class values anymore, only signal functions (type SF a b = Signal 
a -> Signal b) are first class. Furthermore the handling of recursive 
dependencies/feedback is done solely in a loop arrow.

I must say it is frustratring. I finally got to understand FRP from the 
SOE book, only to find out that it is not really the way to go ;-) Now 
I'm trying to grasp AFRP. It is incredibly interesting stuff, but for a 
not-so-abstract-thinking-average programmer like me, it is not an 
obvious task. Maybe *using* AFRP is easier than understanding the inner 

Maybe it would be a good idea for the community if someone (maybe me, if 
I find the time ;-) to write a very very simple game using AFRP and GHC 
6.8.1? Even simpler than the Space Invaders game (which does not work 
anymore anyway), but which does show dynamic collections and switching? 
Maybe like Andrew Coppin mentioned, a very simple Tetris clone? Of 
course, this is not legal, Tetris is copyrighted, but maybe for tutorial 
purposes it can be allowed :)

Don Stewart wrote:
> sk:
>> On 19.11.2007, at 19:54, Peter Verswyvelen wrote:
>>> I can find the paper, but is the source code for that Space  
>>> Invaders alike game also available somewhere?
>> it's included here: http://haskell.org/yampa/afrp-0.4-src.tgz
>> btw, does anybody know what's the current state of affairs with yampa/ 
>> afrp? is the framework still developed further?
> Can we get this uploaded to hackage? 
> -- Don
> _______________________________________________
> 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/20071120/2631fb0f/attachment-0001.htm

More information about the Haskell-Cafe mailing list