hn-classics/_stories/2009/8342830.md

2.5 KiB
Raw Permalink Blame History

created_at title url author points story_text comment_text num_comments story_id story_title story_url parent_id created_at_i _tags objectID year
2014-09-19T22:29:56.000Z Push-pull Functional Reactive Programming (2009) http://conal.net/papers/push-pull-frp/ tosh 54 1 1411165796
story
author_tosh
story_8342830
8342830 2009

Source

Push-pull functional reactive programming

Haskell Symposium 2009

Conal Elliott

Abstract

Functional reactive programming (FRP) has simple and powerful semantics, but has resisted efficient implementation. In particular, most past implementations have used demand-driven sampling, which accommodates FRPs continuous time semantics and fits well with the nature of functional programming. Consequently, values are wastefully recomputed even when inputs dont change, and reaction latency can be as high as the sampling period.

This paper presents a way to implement FRP that combines data- and demand-driven evaluation, in which values are recomputed only when necessary, and reactions are nearly instantaneous. The implementation is rooted in a new simple formulation of FRP and its semantics and so is easy to understand and reason about.

On the road to a new implementation, well meet some old friends (monoids, functors, applicative functors, monads, morphisms, and improving values) and make some new friends (functional future values, reactive normal form, and concurrent “unambiguous choice”).

Paper (292K PDF)

See also:

Note: This paper supercedes the technical report _Simply efficient functional reactivity_.

BibTex

@InProceedings {Elliott2009-push-pull-frp,
  author    = {Conal Elliott},
  title     = {Push-pull functional reactive programming},
  booktitle = {Haskell Symposium},
  url       = {http://conal.net/papers/push-pull-frp},
  year      = 2009
}

Errata

Ill list errors and corrections are listed here as they are reported.

simple hit counter