Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
options to write a cross-platform interacting program in OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-03-10 (17:19)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] options to write a cross-platform interacting program in OCaml
On Tue, Mar 10, 2009 at 05:28:11PM +0100, Alan Schmitt wrote:
> I am looking at what options there are to rewrite camlgrenouille, a  
> small client for that I wrote a while ago, to make  
> it more modular (to allow an external UI to the core program) and  
> cross-platform (Unix and Windows).
> In a nutshell, this program periodically runs some tests. Right now  
> its interaction with the outside is fairly limited: the only thing one  
> can do is ask it to quit (by doing a ctrl-c which is caught so as to  
> clean up before actually quitting). I would like to be able to send it  
> more complex commands, which would be driven by a UI separate from the  
> program.
> The simplest approach seems to be using a socket and a select call  
> (with a timeout corresponding to the delay until the next test), but I  
> was wondering if there were other options based on threads. For  
> instance, could I use lwt under Windows?

For such a simple model I'm pretty certain that using select is going
to be the easiest way.

For the cross-platform bit, don't forget to take a look at the Fedora-
MinGW project.


Richard Jones
Red Hat