Re: [Haskell-cafe] Unambiguous choice implementation

2012-06-27 Thread Heinrich Apfelmus
Bartosz Milewski wrote: I see. So your current implementation is not push, is it? Reactive-banana includes two implementations: a pull-based model implementation that specifies the semantics and a push-based implementation for actual work. So, yes, reactive-banana is push-based. Note that

Re: [Haskell-cafe] Unambiguous choice implementation

2012-06-26 Thread Heinrich Apfelmus
Bartosz Milewski wrote: Thanks, Heinrich. I looked at the examples and at the references you provided. I understand the semantic model, so I guess I'm mostly trying to understand the implementation. Ok. As I mentioned, if you just want to use the library there is no need to understand the

Re: [Haskell-cafe] Unambiguous choice implementation

2012-06-26 Thread Bartosz Milewski
I see. So you're current implementation is not push, is it? The original pull implementation in Fran also used Maybe events, but that was considered inefficient. How is Reactive Banana better then Fran then? --Bartosz On Tue, Jun 26, 2012 at 1:40 AM, Heinrich Apfelmus apfel...@quantentunnel.de

Re: [Haskell-cafe] Unambiguous choice implementation

2012-06-25 Thread Heinrich Apfelmus
Bartosz Milewski wrote: I'm trying to understand Reactive Banana, but there isn't much documentation to go about. I haven't written any beginner documentation yet because the API is still in flux. The homepage http://www.haskell.org/haskellwiki/Reactive-banana and Stackoverflow

Re: [Haskell-cafe] Unambiguous choice implementation

2012-06-25 Thread Bartosz Milewski
Thanks, Heinrich. I looked at the examples and at the references you provided. I understand the semantic model, so I guess I'm mostly trying to understand the implementation. Conal's paper was mostly about refining data structures in order to provide better implementation. It's all beautiful up to

Re: [Haskell-cafe] Unambiguous choice implementation

2012-06-24 Thread Heinrich Apfelmus
Bartosz Milewski wrote: I'm reading Conal Elliot's paper, Push-Pull FRP. At some point he needs an unambiguous choice operator, essentially to implement select: a future that waits for one of its future arguments to fire. His implementation of unamb creates two threads racing on a shared MVar.

Re: [Haskell-cafe] Unambiguous choice implementation

2012-06-24 Thread Bartosz Milewski
I'm trying to understand Reactive Banana, but there isn't much documentation to go about. How is RB positioned vis a vis Elliott (and then there is the earlier Elliot and Hudak, and the later Elliot with the push implementation and type classes). Do you have a toy applet that demonstrates the

[Haskell-cafe] Unambiguous choice implementation

2012-06-23 Thread Bartosz Milewski
I'm reading Conal Elliot's paper, Push-Pull FRP. At some point he needs an unambiguous choice operator, essentially to implement select: a future that waits for one of its future arguments to fire. His implementation of unamb creates two threads racing on a shared MVar. By his own admission, this