Hi Peter,
Thanks for asking about this issue.
If I understood it correctly, it Conal's aim to provide just a single integral function that can handle both the recursive and regular cases?But, is this even possible?
This has been brought up before, but I'm not sure about the current status our consensus regarding "recursive feedback" in Reactive.In Yampa this is solved by the ArrowLoop instance, and by having two different integral functions: one with a delay and without a delay.If I understood it correctly, it Conal's aim to provide just a single integral function that can handle both the recursive and regular cases?But, is this even possible?A nice example of this is David's "boingee" example: a ball on the screen gets dragged towards the current mouse position.Mathematically, this is
vb(t) = s * ( pm(t) - pb(t) )pb(t) = pb0 + integral [0..t] vb(t)wherepb(t) is the position of the ball at time tpb0 is the initial position of the ball at time t=0,pm(t) is the position of the mouse at time ts is some arbitrary scale factorOf course this is not really realistic but it is a simple example of recursive feedback: pb(t) depends on vb(t) and vice versa.Can we make such behaviors with Reactive?
_______________________________________________
Reactive mailing list
Reactive@haskell.org
http://www.haskell.org/mailman/listinfo/reactive