Version française
Home     About     Download     Resources     Contact us    
Browse thread
Functional Reactive Programming in OCaml?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: james woodyatt <jhw@w...>
Subject: Re: [Caml-list] Functional Reactive Programming in OCaml?
On 28 Nov 2004, at 16:44, Benjamin Pierce wrote:
>
> I'm sure that, like me, many of you have experienced language-envy 
> when you've seen the very cool libraries for Functional Reactive 
> Programming (Fran, Frob, Yampa, etc.) that have been implemented in 
> the Haskell world.
>
> Has anybody tried to do something similar in OCaml?  At first sight, 
> it does not seem trivial: the implementations of FRP that I've seen 
> make good use of many of Haskell's special features -- laziness, type 
> classes and qualified types, monads, etc...
>
> Thanks for any pointers,

Hello, Dr. Pierce.  Yes, I've tried this.  Reactive programming is a 
hobby of mine.  I haven't tried building a functional GUI toolkit, 
since I'm mostly interested in network application services.  But you 
might try checking out the Iom module in my OCaml Network Application 
Environment project on SourceForge.

	<http://sf.net/projects/ocnae/>

Basically, I ported Chapter 30 of Magnus Carlsson's and Thomas 
Hallgren's joint Ph.D. thesis to OCaml, then generalized it and rewrote 
it to take advantage of OCaml's mutable data structures inside the 
scheduler.

	<http://www.cs.chalmers.se/~hallgren/Thesis>

Be advised: the most current release of Cf_gadget has a serious stack 
leak in the scheduler, causing some trivial reactors explode on the 
stack.  A fix-- involving yet another complete rewrite of the 
scheduler-- is already in CVS, and a new release will be coming soon.


-- 
j h woodyatt <jhw@wetware.com>
markets are only free to the people who own them.