euphoria: Dynamic network FRP with events and continuous values
Euphoria is FRP with practicality.
FRP is a good way to model computations which need run for an extended period of time, react to incoming events, and continually produce output. Simulations, games, and GUIs are all good candidates for FRP.
In Euphoria, networks (dataflow graphs) are dynamic. Networks are first-class values which can be passed around inside of other networks, and they can be connected together at any time. This flexibility allows complicated, real-world problems to be modeled with FRP.
Though Euphoria is flexible and high-level, it makes some concessions for performance and the underlying implementation.
Euphoria works in discrete steps. You will construct the body of your program as an FRP network. To get results, you must perform an IO action to step the network. After stepping, your network will have produced some result, such as a string, which you can print to the screen. A network can also produce IO actions as an output. Step the network as many times as necessary to continue running your program.
A simulation, game, or GUI will probably loop while stepping until the user terminates the program.
Euphoria is mostly concerned with three types: Signal, Event, and Discrete.
Signal represents a continuous value that changes with each step of the network. Discrete is like Signal, but it is possible to determine if its value has not changed, and avoid unnecessary computation. As long as a Signal or Discrete exists, it will contain a value. Event represents something that exists for only one moment in time, such as a packet received over a socket, or a mouse click.
Signals and Discretes are instances of Monad and Applicative. Events are instances of Monoid.
SignalGen is the outer monad, where networks are constructed. SignalGen is an instance of Monad and Applicative. SignalGens inside of Signals, Discretes, or Events can be used to attach new networks to the existing network on the fly.
Signals, Discretes and Events may contain other Signals, Discretes or Events. Euphoria encourages the use of dynamic network construction using these higher-order FRP types, and they can be attached or detached from the network with ease. Euphoria relies on garbage collection and weak pointers to prune the network when parts of it are no longer needed.
Euphoria is built on top of the Elerea library by Patai Gergely.
Modules
[Index]
- FRP
- Euphoria
- FRP.Euphoria.Abbrev
- FRP.Euphoria.Collection
- EnumCollection
- FRP.Euphoria.Event
- HashCollection
- Internal
- FRP.Euphoria.Signal
- FRP.Euphoria.Update
- Euphoria
Downloads
- euphoria-0.8.0.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.6.0.1, 0.8.0.0 |
---|---|
Dependencies | base (>=4.7 && <4.10), containers (>=0.5.5), deepseq, elerea (>=2.7 && <2.10), enummapset-th (>=0.6), hashable (>=1.2), HUnit, transformers (>=0.4.1), unordered-containers (>=0.2.5) [details] |
License | LicenseRef-PublicDomain |
Author | Takano Akio, Andrew Richards, Liyang HU |
Maintainer | aljee@hyper.cx <Takano Akio> |
Category | FRP |
Home page | http://github.com/tsurucapital/euphoria |
Source repo | head: git clone git://github.com/tsurucapital/euphoria.git |
Uploaded | by MitsutoshiAoe at 2016-08-02T05:48:33Z |
Distributions | |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Downloads | 1894 total (5 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Last success reported on 2016-08-02 [all 1 reports] |