From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 20F3FBC2F for ; Tue, 30 Nov 2004 07:36:14 +0100 (CET) Received: from anubis.medic.chalmers.se (anubis.medic.chalmers.se [129.16.30.218]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iAU6aDjp024138 for ; Tue, 30 Nov 2004 07:36:13 +0100 Received: from mail.medic.chalmers.se (localhost [127.0.0.1]) by anubis.medic.chalmers.se (Postfix) with ESMTP id 4AF72DB2D for ; Tue, 30 Nov 2004 07:36:13 +0100 (CET) Received: from 68.228.59.153 (SquirrelMail authenticated user hamon); by mail.medic.chalmers.se with HTTP; Tue, 30 Nov 2004 07:36:13 +0100 (CET) Message-ID: <38754.68.228.59.153.1101796573.squirrel@68.228.59.153> Date: Tue, 30 Nov 2004 07:36:13 +0100 (CET) Subject: Re: [Caml-list] Functional Reactive Programming in OCaml? From: "Gregoire Hamon" To: caml-list@yquem.inria.fr User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Miltered: at concorde with ID 41AC14DD.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 gregoire:01 haskell:01 ocaml:01 trivial:01 haskell's:01 monads:01 pointers:01 synchrone:01 syntax:01 ocaml's:01 compiler:01 statically:01 compiler: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: > 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, you can look at Lucid Synchrone (http://www-spi.lip6.fr/lucid-synchrone/), a functional language dedicated to reactive programming. The syntax is OCaml's and the compiler produces OCaml code (combining both languages is easy). While being stream based, reactivity, which is ensured statically, allows the compiler to produce purely sequential (strict) code. You can write Fran-like code quite easily (I had some examples which I can try to find if you're interested). Gregoire.