From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 47219BC2F for ; Tue, 30 Nov 2004 04:02:56 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iAU32t0X023236 for ; Tue, 30 Nov 2004 04:02:55 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id EAA20811 for ; Tue, 30 Nov 2004 04:02:55 +0100 (MET) Received: from smtp-relay.dca.net (smtp-relay.dca.net [216.158.48.66]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iAU32sOC031978 for ; Tue, 30 Nov 2004 04:02:54 +0100 Received: from viper.oldcity.dca.net (viper.oldcity.dca.net [216.158.38.4]) by smtp-relay.dca.net (Postfix) with ESMTP id BF6C3314C27 for ; Mon, 29 Nov 2004 22:05:42 -0500 (EST) Received: from dsl-207-245-69-66.cust.oldcity.dca.net (dsl-207-245-69-66.cust.oldcity.dca.net [207.245.69.66]) by viper.oldcity.dca.net (8.11.6/8.11.6) with ESMTP id iAU32r328598 for ; Mon, 29 Nov 2004 22:02:53 -0500 Received: from dsl-207-245-69-66.cust.oldcity.dca.net (localhost [127.0.0.1]) by dsl-207-245-69-66.cust.oldcity.dca.net (Postfix) with ESMTP id E6EE7311E9A for ; Mon, 29 Nov 2004 22:02:52 -0500 (EST) Cc: caml-list@inria.fr Reply-To: bcpierce@cis.upenn.edu Subject: Re: Functional Reactive Programming in OCaml? In-reply-to: Your message of Sun, 28 Nov 2004 19:44:10 -0500. <4854.1101689050@dsl-207-245-69-66.cust.oldcity.dca.net> Date: Mon, 29 Nov 2004 22:02:52 -0500 Message-ID: <13110.1101783772@dsl-207-245-69-66.cust.oldcity.dca.net> From: Benjamin Pierce X-Miltered: at nez-perce with ID 41ABE2DF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 41ABE2DE.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 bcpierce:01 ocaml:01 pointers:01 haskell:01 conal:01 hudak:01 abstraction:01 booleans:01 api:01 haskell:01 pointers:01 trivial:01 haskell's:01 monads:01 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: 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 > -----------------------------------------------------------------------------