Questions tagged [frp]

Functional reactive programming is programming paradigm for reactive programming

441 questions
19
votes
1 answer

How to implement Haskell's FRP Behavior type in Javascript?

I'd like to understand the original meaning of functional reactive programming in Haskell and how it differs from the actual application of FRP in Javascript. Unfortunately, I have only a superficial understanding of Haskell and have to stick with…
user6445533
19
votes
0 answers

Why does folding Events and Behaviors use so much memory?

I am currently exploring the possibility to use basic containers to give FRP networks more structure and by that to create more sophisticated event networks easier. Note: I use ordrea but had the same problem with reactive-banana too, so I guess…
fho
  • 6,578
  • 19
  • 63
19
votes
2 answers

What is the connection between Iteratees and FRP?

It seems to me that there is a strong connection between the two ideas. My guess is that FRP could be implemented in terms of Iteratees if there would be a way to express arbitrary graphs with Iteratees. But afaik they only support chain-like…
fho
  • 6,578
  • 19
  • 63
18
votes
2 answers

FRP on a game engine. Is it worth it?

Today, I've read about FRP (functional reactive programming). However, I don't know how much this fits in the engine itself. After reading Gerold Meisinger's article, my question is, if it's worth it to use FRP instead of a component-based…
frarees
  • 2,034
  • 3
  • 17
  • 22
18
votes
2 answers

RxSwift merge different kind of Observables

How should I merge 2 different types of Observables in RxSwift? For example: var a: Observable var b: Observable Observable.of(a,b).merge() is not possible because of type parameter difference.
Swift Hipster
  • 1,484
  • 2
  • 12
  • 24
18
votes
2 answers

Is ReactiveX considered reactive programming?

From ReactiveX introduction page: It is sometimes called “functional reactive programming” but this is a misnomer. ReactiveX may be functional, and it may be reactive, but “functional reactive programming” is a different animal. One main point of…
TrungDQ
  • 6,286
  • 3
  • 31
  • 54
18
votes
4 answers

What is the correct way of initializing an elm application

The documentation for Elm's Random module states: A good way to get an unexpected seed is to use the current time. http://package.elm-lang.org/packages/elm-lang/core/1.1.0/Random I don't see however a good example of how to perform such…
zefciu
  • 1,829
  • 2
  • 15
  • 37
17
votes
2 answers

Where to apply Behavior (and other types) in FRP

I'm working on a program using reactive-banana, and I'm wondering how to structure my types with the basic FRP building blocks. For instance, here's a simplified example from my real program: say my system is composed primarily of widgets — in my…
ehird
  • 39,804
  • 3
  • 173
  • 180
17
votes
1 answer

Am I using reactive-banana right?

Here's an example Haskell FRP program using the reactive-banana library. I'm only just starting to feel my way with Haskell, and especially haven't quite got my head around what FRP means. I'd really appreciate some critique of the code below {-#…
Ben Ford
  • 2,087
  • 19
  • 26
17
votes
1 answer

RxJS Promise Composition (passing data)

I'm brand new to Rx and am finding it difficult to find documentation on composing promises such that data from the first promise is passed into the second and so on. Here's three very basic promises, the calculations on the data aren't important,…
low_ghost
  • 538
  • 1
  • 5
  • 13
17
votes
3 answers

Why does FRP consider time as a factor for values?

Behaviors are ubiquitously defined as “time-varying value”s1. Why? time being the dependency/parameter for varying values is very uncommon. My intuition for FRP would be to have behaviors as event-varying values instead; it is much more common, much…
MasterMastic
  • 19,099
  • 11
  • 59
  • 86
17
votes
4 answers

How to handle the two signals depending on each other?

I read Deprecating the Observer Pattern with Scala.React and found reactive programming very interesting. But there is a point I can't figure out: the author described the signals as the nodes in a DAG(Directed acyclic graph). Then what if you have…
Lai Yu-Hsuan
  • 25,828
  • 23
  • 91
  • 156
16
votes
1 answer

reactive-banana: Firing event that contain the most up to date value of a Behavior

Suppose I have an event trigger which I want to do two things when fired. First, I want it to update the value of some behavior. Second, if other conditions are met, I want it to fire another event send_off with the updated value of the behavior. …
16
votes
1 answer

Is the 'Signal' representation of Functional Reactive Programming correct?

I have been researching FRP and found a bunch of different implementations. One model I have seen is one I will refer to as the 'Signal' representation. This essential combines Events and Behaviours into one entity. Firstly, a Signal is an object…
16
votes
2 answers

What is the status of Functional Reactive Programming in Python?

I've found this paper ("Practical Functional Reactive Programming") , the authors (as far as I understand) try to create an FRP library in Python in the spirit of Yampa. I've also found these interesting slides featuring SPJ! The slides seem…
jhegedus
  • 18,516
  • 11
  • 84
  • 147
1
2
3
29 30