Personal tools

Yampa

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(complete rewrite)
(Switches)
(28 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Yampa is a domain-specific embedded language for the programming of hybrid (discrete and continious) systems using the concepts of [[Functional Reactive Programming]] (FRP). Yampa is structured using [[Arrow]]s, which greatly reduce the chance of introducing space- and time-leaks into reactive, time-varying systems.
+
Yampa is a domain-specific embedded language for the programming of hybrid (discrete and continuous time) systems using the concepts of [[Functional Reactive Programming]] (FRP). Yampa is structured using [[Arrow]]s, which greatly reduce the chance of introducing space- and time-leaks into reactive, time-varying systems.
   
Yampa was originally developed by the [http://haskell.cs.yale.edu/ Yale Haskell Group].
+
Yampa was originally developed by the [http://haskell.cs.yale.edu/ Yale Haskell Group] based on the original idea of [http://www.conal.net Conal Elliott's] [[Fran]].
   
'''[http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Yampa Download Yampa]'''
+
Hackage: {{HackagePackage|id=Yampa}}
   
 
== Introduction ==
 
== Introduction ==
Line 24: Line 24:
 
** [http://lambdor.net/?p=117 Dataflow diagram of Yampa reactimate]
 
** [http://lambdor.net/?p=117 Dataflow diagram of Yampa reactimate]
 
** [http://lambdor.net/?p=113 Activity diagram of Yampa reactimate]
 
** [http://lambdor.net/?p=113 Activity diagram of Yampa reactimate]
  +
* [https://github.com/shaleny/lazyfoo shaleny LazyFoo SDL examples] translated to Haskell/Yampa (lecture 16-)
  +
* References: [https://frvr.svn.sourceforge.net/svnroot/frvr/AFRP/trunk/src/foo.ps ps], [http://lambdor.net/wp-content/uploads/2010/12/AFRP-Reference.pdf pdf]
 
* Videos
 
* Videos
 
** [http://vimeo.com/6632457 Safe Functional Reactive Programming through Dependent Types]
 
** [http://vimeo.com/6632457 Safe Functional Reactive Programming through Dependent Types]
 
** [http://vimeo.com/6652662 Causal Commutative Arrows and Their Optimization]
 
** [http://vimeo.com/6652662 Causal Commutative Arrows and Their Optimization]
  +
** [http://www.youtube.com/watch?v=xtmo6Bmfahc Euterpea: From signals to symphonies]
  +
  +
== Primitive signal functions ==
  +
  +
[[Image:Yampa signal functions.png|768px]]
  +
  +
(download original [[:Image:Yampa signal functions.svg‎]])
   
 
== Switches ==
 
== Switches ==
   
* [[Yampa/switch]]
+
* [[Yampa/switch|switch]]
* [[Yampa/rSwitch]]
+
* [[Yampa/rSwitch|rSwitch]]
* [[Yampa/pSwitchB]]
+
* [[Yampa/kSwitch|kSwitch]]
* [[Yampa/pSwitch]]
+
* [[Yampa/pSwitchB|pSwitchB]]
* [[Yampa/rpSwitchB]]
+
* [[Yampa/pSwitch|pSwitch]]
* [[Yampa/rpSwitch]]
+
* [[Yampa/rpSwitchB|rpSwitchB]]
  +
* [[Yampa/rpSwitch|rpSwitch]]
  +
  +
Each switch comes in two different flavors:
  +
# ''immediate'': switch to the new behaviour immediately and also calculate the return value based on the new behaviour.
  +
# ''delayed'': return the value based on the old behaviour, but use the new behaviour afterwards. To use delayed switch prefix the switching functions with the letter 'd', f.e. 'drpSwitchB'.
  +
  +
== Reactimation ==
  +
  +
* [[Yampa/reactimate|reactimate]]
  +
* [[Yampa/game_engine|Game engine]]
   
 
== External Links ==
 
== External Links ==
Line 41: Line 50:
 
* [http://mailman.cs.yale.edu/mailman/listinfo/yampa-users Yampa-Users mailing list] - Yampa-related comments, questions, discussions, and announcements. You can also send bug reports to [mailto:yampa-bugs@cs.yale.edu yampa-bugs@cs.yale.edu].
 
* [http://mailman.cs.yale.edu/mailman/listinfo/yampa-users Yampa-Users mailing list] - Yampa-related comments, questions, discussions, and announcements. You can also send bug reports to [mailto:yampa-bugs@cs.yale.edu yampa-bugs@cs.yale.edu].
 
* [http://www.cs.nott.ac.uk/~ggg/ George Giorgidze] created YampaSynth, a modular music synthesizer written in Haskell and using Yampa.
 
* [http://www.cs.nott.ac.uk/~ggg/ George Giorgidze] created YampaSynth, a modular music synthesizer written in Haskell and using Yampa.
  +
* [http://www.cs.yale.edu/homes/hl293] - Hai (Paul) Liu papers and slides
 
* [http://lambdor.net Blog about Yampa] - introduction tutorials and diagrams
 
* [http://lambdor.net Blog about Yampa] - introduction tutorials and diagrams
 
* [http://blog.edwardamsden.com/2011/03/demonstrating-time-leak-in-arrowized.html Demonstrating a Time Leak in Arrowized FRP]
 
* [http://blog.edwardamsden.com/2011/03/demonstrating-time-leak-in-arrowized.html Demonstrating a Time Leak in Arrowized FRP]
  +
** [http://mailman.cs.yale.edu/pipermail/yampa-users/2011-April/000409.html answer]
   
 
== Known users ==
 
== Known users ==
  +
  +
[https://www.google.com/search?hl=en&q=yampa%20site%3Ahackage.haskell.org%2Fpackage&aqi=g10 search Hackage]
 
 
* [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/YampaSynth YampaSynth] - is a software synthesizer implemented in Haskell using Yampa. It contains a framework of sound generating and sound shaping modules (e.g. oscillator, amplifier, mixer, envelope generator, filter, etc.) and example applications.
+
* {{HackagePackage|id=YampaSynth}} - is a software synthesizer implemented in Haskell using Yampa. It contains a framework of sound generating and sound shaping modules (e.g. oscillator, amplifier, mixer, envelope generator, filter, etc.) and example applications.
* [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/SpaceInvaders Space Invaders]; a video game, demonstrating the usage of Yampa
+
* [http://www.haskell.org/haskellwiki/Frag Frag]; a simple Quake 3 clone, using a very early version of Yampa called arrowized functional reactive programming (AFRP)
  +
* {{HackagePackage|id=SpaceInvaders}}; a video game, demonstrating the usage of Yampa
  +
* {{HackagePackage|id=Cuboid}}; a small puzzle game
  +
* {{HackagePackage|id=Haskelloids}}; asteroids clone
 
* [http://haskell.cs.yale.edu/?page_id=376 Nettle] - Programming Network Routers
 
* [http://haskell.cs.yale.edu/?page_id=376 Nettle] - Programming Network Routers
 
* [http://haskell.cs.yale.edu/?page_id=103 Euterpea] - computer music development (also uses [[CCA]])
 
* [http://haskell.cs.yale.edu/?page_id=103 Euterpea] - computer music development (also uses [[CCA]])
  +
* {{HackagePackage|id=YFrob}}; robot simulation
  +
  +
[https://github.com/search?q=yampa&repo=&langOverride=&start_value=1&type=Everything&language=Haskell search Github]
  +
  +
* [https://github.com/harleyttd/hamball Hamball]
  +
* [https://github.com/werk/YampaShooter YampaShooter]
   
 
== Known forks ==
 
== Known forks ==
   
  +
* [https://github.com/ony/Yampa-core Yampa-core]
  +
** [http://mailman.cs.yale.edu/pipermail/yampa-users/2012-May/ related discussion]
 
* [https://github.com/eamsden/Animas Animas]
 
* [https://github.com/eamsden/Animas Animas]
 
** code cleanup
 
** code cleanup
Line 63: Line 84:
 
[[Category:FRP]]
 
[[Category:FRP]]
 
[[Category:Arrow]]
 
[[Category:Arrow]]
  +
[[Category:Music]]
  +
[[Category:Robotics]]

Revision as of 20:49, 7 October 2012

Yampa is a domain-specific embedded language for the programming of hybrid (discrete and continuous time) systems using the concepts of Functional Reactive Programming (FRP). Yampa is structured using Arrows, which greatly reduce the chance of introducing space- and time-leaks into reactive, time-varying systems.

Yampa was originally developed by the Yale Haskell Group based on the original idea of Conal Elliott's Fran.

Hackage: Yampa

Contents

1 Introduction

2 Primitive signal functions

Yampa signal functions.png

(download original Image:Yampa signal functions.svg‎)

3 Switches

Each switch comes in two different flavors:

  1. immediate: switch to the new behaviour immediately and also calculate the return value based on the new behaviour.
  2. delayed: return the value based on the old behaviour, but use the new behaviour afterwards. To use delayed switch prefix the switching functions with the letter 'd', f.e. 'drpSwitchB'.

4 Reactimation

5 External Links

6 Known users

search Hackage

  • YampaSynth - is a software synthesizer implemented in Haskell using Yampa. It contains a framework of sound generating and sound shaping modules (e.g. oscillator, amplifier, mixer, envelope generator, filter, etc.) and example applications.
  • Frag; a simple Quake 3 clone, using a very early version of Yampa called arrowized functional reactive programming (AFRP)
  • SpaceInvaders; a video game, demonstrating the usage of Yampa
  • Cuboid; a small puzzle game
  • Haskelloids; asteroids clone
  • Nettle - Programming Network Routers
  • Euterpea - computer music development (also uses CCA)
  • YFrob; robot simulation

search Github

7 Known forks