Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: 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: Benjamin Pierce <bcpierce@d...>
Subject: Re: Functional Reactive Programming in OCaml?
Many thanks to all those who've replied so far to my query about Functional
Reactive Programming in OCaml.  I got some very interesting pointers, but
none closely related to what I was looking for.

I should have been more precise in what I asked -- "FRP" in the Haskell
community is a term with a much more specific technical meaning than just
"reactive programming in a functional style": I was thinking of the line of
work initiated by Conal Eliott and Paul Hudak in their Fran library and
continued in systems like Frob, Fruit, and recently Yampa.  

The common idea in these systems is to introduce an abstraction of "signals"
-- roughly, functions from time to "values", where the values can be
anything from real numbers (conventional signal-processing-type signals) to
two- or three-dimensional pictures, to booleans (representing events).
What's special is that time is represented as a continuous, real-number
quantity.  They do all kinds of work behind the scenes to actually compute
with behaviors, but what shows through in the API is a very simple, elegant,
and powerful set of primitives that can be combined in straightforward ways
to achieve very complex effects.  See http://www.haskell.org/frp/ for more
info. 

So... is anybody doing THAT in OCaml?

Thanks for any (more) pointers,

   Benjamin



> 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,
> 
>     - Benjamin
> 
> -----------------------------------------------------------------------------
> BENJAMIN C. PIERCE, Professor                                               
> Dept. of Computer & Information Science     
> University of Pennsylvania                                    +1 215 898-2012
> 3330 Walnut St.                                          Fax: +1 215 898-0587
> Philadelphia, PA 19104, USA                http://www.cis.upenn.edu/~bcpierce
> -----------------------------------------------------------------------------