Code Monkey home page Code Monkey logo

elerea's Introduction

Introduction

Elerea (Eventless reactivity) is a tiny discrete time functional reactive programming (FRP) system without the notion of event-based switching and sampling, but with first-class signals (time-varying values). Reactivity is provided through various higher-order constructs that also allow the user to work with arbitrary time-varying structures containing live signals. Signals have precise and simple denotational semantics.

Stateful signals can be safely generated at any time through a monadic interface, while stateless combinators can be used in a purely applicative style. Elerea signals can be defined recursively, and external input is trivial to attach. The library comes in three major variants:

  • Simple: signals are plain discrete streams isomorphic to functions over natural numbers;
  • Param: adds a globally accessible input signal for convenience;
  • Clocked: adds the ability to freeze whole subnetworks at will.

This is a minimal library that defines only some basic primitives, and you are advised to install elerea-examples as well to get an idea how to build non-trivial systems with it. The examples are separated in order to minimise the dependencies of the core library. The dow package contains a full game built on top of the simple variant.

The basic idea of the implementation is described in the WFLP 2010 paper Efficient and Compositional Higher-Order Streams.

Related projects

  • Dungeons of Wor: a simple old-school arcade game programmed with Elerea to serve as a non-trivial example for using the library.
  • Euphoria: a complex reactive framework built around Elerea.
  • Helm: a game engine that uses Elerea for describing interactions and behaviours.
  • LambdaCube 3D: a purely functional GPU pipeline description language, whose showcases mostly rely on Elerea.

elerea's People

Contributors

cobbpg avatar takano-akio avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.