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 986C3BC2F for ; Mon, 29 Nov 2004 19:03:55 +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 iATI3tED032209 for ; Mon, 29 Nov 2004 19:03:55 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA04648 for ; Mon, 29 Nov 2004 19:03:54 +0100 (MET) Received: from wetware.com ([199.108.16.1]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iATI3212032137 for ; Mon, 29 Nov 2004 19:03:54 +0100 Received: from [208.177.152.17] (helo=[10.0.1.6]) by wetware.com with esmtp (Exim 4.20) id 1CYprV-0005e1-R6; Mon, 29 Nov 2004 10:02:58 -0800 In-Reply-To: <4854.1101689050@dsl-207-245-69-66.cust.oldcity.dca.net> References: <4854.1101689050@dsl-207-245-69-66.cust.oldcity.dca.net> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit Cc: Caml List From: james woodyatt Subject: Re: [Caml-list] Functional Reactive Programming in OCaml? Date: Mon, 29 Nov 2004 10:02:59 -0800 To: bcpierce@cis.upenn.edu X-Mailer: Apple Mail (2.619) X-Miltered: at nez-perce with ID 41AB648B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41AB6456.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; woodyatt:01 jhw:01 wetware:01 caml-list:01 ocaml:01 wrote:01 haskell:01 ocaml:01 trivial:01 haskell's:01 monads:01 pointers:01 sourceforge:01 rewrote:01 ocaml's: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: 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. 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. 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 markets are only free to the people who own them.