From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 8A45FBBAF for ; Tue, 10 Mar 2009 17:28:14 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.38,336,1233529200"; d="sig'?scan'208";a="24127465" Received: from charm.inrialpes.fr ([194.199.25.104]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA; 10 Mar 2009 17:28:14 +0100 Message-Id: From: Alan Schmitt To: caml-list@inria.fr Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-75-697254315" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: options to write a cross-platform interacting program in OCaml Date: Tue, 10 Mar 2009 17:28:11 +0100 X-Pgp-Agent: GPGMail 1.2.0 (v56) X-Mailer: Apple Mail (2.930.3) X-Spam: no; 0.00; schmitt:01 schmitt:01 ocaml:01 modular:01 ctrl-c:01 threads:01 wrote:01 unix:01 rewrite:01 alan:02 alan:02 simplest:02 interaction:02 external:03 suggestion:03 X-Attachments: type="application/pgp-signature" name="PGP.sig" name="PGP.sig" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-75-697254315 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hello, I am looking at what options there are to rewrite camlgrenouille, a small client for www.grenouille.com 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? Thanks for any suggestion, Alan --Apple-Mail-75-697254315 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (Darwin) iEYEARECAAYFAkm2lR0ACgkQNIAqM4hFUWi8qwCgiofGx05Xf/PnBamnxXVXhNHh 3iQAn1d3hFO0ON8XiPW2CIcLYFknnCcb =lEB2 -----END PGP SIGNATURE----- --Apple-Mail-75-697254315--