Skip to content


Dataflow diagram of Yampa reactimate

download diagram (.svg), fonts (cmr10.ttf, cmtt10.ttf)

For me as a Haskell beginner the biggest problem in understanding Yampa reactimate was how the objects are actually passed around and transformed as all the signatures are very, very… very generic. This diagram shows an example scenario staring Pacman (the player), a cherry (enemy trigger) and a ghost (the enemy).

  1. Starting at the upper left corner.
  2. Collect input events in init (which are empty here) and pass them through process, core all the way down to route and killAndSpawn.
  3. core is called with an initial empty object state (which is fed-back in recursively!*) and an initial list of object signal functions. It is very important to separate the logic of the objects (signal functions) and the output they produce (state).
  4. route gets the empty state and no input events, effectively keeping the object collection the same. Note that killAndSpawn doesn’t switch in this step. The object states are passed to output where they are rendered.
  5. In the next step (t=1), still having the same core (core=A), the user produces an input event which is routed to all objects and makes the Pacman move to the cherry. route only checks for collision events in the previous state, thus no collision events are recognized in this step.
  6. In t=2, still having the same core (core=A), route detects a collision between Pacman and the cherry and produces collision events, which are only routed to the objects in charge. This causes killAndSpawn to kill the cherry, spawn the ghost and therefore generate a switching event, which results in the creation of a new core in process.

*) I didn’t really know how to illustrate the recursion of core.

Tagged with , .


13 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. snk_kid says

    Nice diagram, you know I wonder why there is no visual programming language based of off arrows that would generate Haskell code.

  2. Gerold Meisinger says

    Actually http://imve.informatik.uni-hamburg.de/files/71-Blom-Diss-online.pdf mentions are program they developed. Have a look here: http://imve.informatik.uni-hamburg.de/projects/VisualAFRP

  3. snk_kid says

    @Gerold Meisinger thanks for the link, is there a place to download the tool? I’m going to put this link up on reddit.com/r/haskell/ where i’ve been linking your blog a couple of times ;)

  4. Gerold Meisinger says

    http://www.csse.uwa.edu.au/~joel/vfpe/

    > where i’ve been linking your blog a couple of times

    which gave me a boost of 250 visits :)
    thank you!

  5. snk_kid says

    The link looks like a different tool from the one on the VisualAFRP page unfortunately.

  6. Gerold Meisinger says

    hmm, the Blom paper mentions “Kelso, VFPE, Visual Functional Programming Environment”. i don’t know if there is a more recent version of VFPE available (haven’t used it yet).

    Blom is active on the Yampa mailing list, like here: http://mailman.cs.yale.edu/pipermail/yampa-users/2010-June/000336.html . maybe you want to ask him.

  7. Gerold Meisinger says

    I just corrected some errors in the diagram

  8. Gerold Meisinger says

    The actual program is called VPE and is described in the german master thesis” Visuelle Entwicklungsumgebung zur Erzeugung von Haskell AFRP Code” by Piotr Szal. I didn’t find any public version unfortunately.

  9. אני אוהב את זה says

    Undeniably believe that which you stated. Your favourite reason appeared to be at the
    net the easiest thing to be aware of. I say to you, I certainly get irked while other folks consider worries that they just
    don’t know about. You controlled to hit the nail upon the highest and
    also outlined out the whole thing with no need side-effects , folks could take a
    signal. Will probably be again to get more.
    Thank you

  10. מפתח לרכב בחולון says

    Quality posts is the secret to attract the users to go to see the web page, that’s what this web site is providing.

  11. punch tv network says

    Intense ѕcenmes and sounds atract them.

  12. professional photographers los angeles says

    A motivating discussion is worth comment. I think that you need to
    publish more on this subject, it may not be a taboo matter but generally people don’t talk about these topics.
    To the next! Many thanks!!

Continuing the Discussion

  1. Yampa/SDL program stub | Lambdor Devblog linked to this post on 2010-07-11

    [...] To get an overview of Yampa reactimate have a look at the diagrams of my 2 recent posts Activity diagram of Yampa reactimate and Dataflow diagram of Yampa reactimate. [...]



Some HTML is OK

or, reply to this post via trackback.