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=2.4 required=5.0 tests=AWL,DNS_FROM_SECURITYSAGE, SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 8C531BB84 for ; Mon, 27 Oct 2008 15:35:22 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlYDABBuBUnAXQIngWdsb2JhbACUAAEBFiKtOYNP X-IronPort-AV: E=Sophos;i="4.33,492,1220220000"; d="scan'208";a="30802313" Received: from concorde.inria.fr ([192.93.2.39]) by mail4-smtp-sop.national.inria.fr with ESMTP; 27 Oct 2008 15:35:22 +0100 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m9REZLpO003677 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 27 Oct 2008 15:35:21 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvEAAHluBUlQW+UCe2dsb2JhbACUAAEBFiIErTyDTw X-IronPort-AV: E=Sophos;i="4.33,492,1220220000"; d="scan'208";a="18563893" Received: from main.gmane.org (HELO ciao.gmane.org) ([80.91.229.2]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 27 Oct 2008 15:35:21 +0100 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KuTBY-0000Yi-Mx for caml-list@inria.fr; Mon, 27 Oct 2008 14:35:12 +0000 Received: from ivr94-8-88-162-26-239.fbx.proxad.net ([88.162.26.239]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Oct 2008 14:35:12 +0000 Received: from zheng_li by ivr94-8-88-162-26-239.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Oct 2008 14:35:12 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Zheng Li Subject: Re: [ANN] camlish: a simple module for shell scripting in OCaml Date: Mon, 27 Oct 2008 15:35:51 +0100 Message-ID: <4905D1C7.7090102@users.sourceforge.net> References: <490535D8.8020500@users.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ivr94-8-88-162-26-239.fbx.proxad.net User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) In-Reply-To: Sender: news X-Miltered: at concorde with ID 4905D1A9.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 mikkel:01 rgensen:01 ocaml:01 synchronous:01 synchronous:01 async:01 combinators:01 combinator:01 burdens:98 sourceforge:01 wrote:01 syntactic:01 functions:01 implemented:02 Mikkel Fahnøe Jørgensen wrote: >> * The interaction between external commands and OCaml values are >> implemented asynchronously inside (but with a synchronous >> interface). So it won't get stuck unnecessarily when dealing with >> large chunk of input/output. > > Would it be possible to combine this with the LWT thread library? > http://www.ocsigen.org/lwt I'm not clear what kind of "combine" you had in mind. * If you meant to use them together, I think that's fine. They are both user level libraries, Lwt has an asynchronous interface, camlish has a synchronous one, so you can just use camlish API as common functions application everywhere. * If you meant to implement the inside asynchronous mechanics of camlish on top of Lwt, I did thought of that. Actually, I have another library called Async does similar thing as Lwt. It's possible, but not necessary. Besides, the CPS-based approach always brings some syntactic burdens, which I prefer to avoid. So finally, the inside implementation of camlish is asynchronous, while we only expose the synchronous interface to the outside world. * Maybe you were though about parallel execution? Pipeline is parallel already, plus there are two parallel combinators have been planed (opposite to "&&&", the sequential combinator). I haven't seen this kind of stuff in other shells, but I think that's reasonable. HTH. -- Zheng