* Re: [Caml-list] Functional Reactive Programming in OCaml?
@ 2004-11-30 6:36 Gregoire Hamon
2004-11-30 14:14 ` Benjamin Pierce
0 siblings, 1 reply; 3+ messages in thread
From: Gregoire Hamon @ 2004-11-30 6:36 UTC (permalink / raw)
To: caml-list
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Functional Reactive Programming in OCaml?
2004-11-30 6:36 [Caml-list] Functional Reactive Programming in OCaml? Gregoire Hamon
@ 2004-11-30 14:14 ` Benjamin Pierce
0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Pierce @ 2004-11-30 14:14 UTC (permalink / raw)
To: Gregoire Hamon; +Cc: caml-list
> 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).
> ...
> You can write Fran-like code quite easily (I had some examples which I
> can try to find if you're interested).
Yes, I would be interested if you can dig them up. I'm surprised, though --
I had the impression from the homepage that Lucid-Synchrone was a clocked
language and could not deal with continuous time.
- 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
-----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] Functional Reactive Programming in OCaml?
2004-11-29 0:44 Benjamin Pierce
@ 2004-11-29 18:02 ` james woodyatt
0 siblings, 0 replies; 3+ messages in thread
From: james woodyatt @ 2004-11-29 18:02 UTC (permalink / raw)
To: bcpierce; +Cc: Caml List
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-11-30 14:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-30 6:36 [Caml-list] Functional Reactive Programming in OCaml? Gregoire Hamon
2004-11-30 14:14 ` Benjamin Pierce
-- strict thread matches above, loose matches on Subject: below --
2004-11-29 0:44 Benjamin Pierce
2004-11-29 18:02 ` [Caml-list] " james woodyatt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).