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.3 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 9AD7EBB84 for ; Mon, 27 Oct 2008 15:15:03 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlYDAPRmBUnAXQIngWdsb2JhbACUAAEBFiKtF4NP X-IronPort-AV: E=Sophos;i="4.33,492,1220220000"; d="scan'208";a="30801204" Received: from concorde.inria.fr ([192.93.2.39]) by mail4-smtp-sop.national.inria.fr with ESMTP; 27 Oct 2008 15:15:02 +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 m9REF1dO003047 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 27 Oct 2008 15:15:02 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvEAADBnBUlQW+UCe2dsb2JhbACUAAEBFiIErReDTw X-IronPort-AV: E=Sophos;i="4.33,492,1220220000"; d="scan'208";a="18562846" 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:15:02 +0100 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KuSnS-0007uD-Vj for caml-list@inria.fr; Mon, 27 Oct 2008 14:10:18 +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:10:18 +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:10:18 +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:10:55 +0100 Message-ID: <4905CBEF.1080708@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 4905CCE5.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 mikkel:01 rgensen:01 orthogonal:01 ocaml:01 toplevel:01 orthogonal:01 toplevel:01 git:98 git:98 sourceforge:01 wrote:01 wrote:01 functions:01 define:02 Mikkel Fahnøe Jørgensen wrote: > Great!, but bummer, I wrote one too last night.... > > http://git.dvide.com/pub/ocaml-shell-utils/tree/ > http://git.dvide.com/pub/ocaml-shell-utils/plain/README.txt > > Also looked at FileUtils and ShCaml, but wanted something light. > > Anyway - it seems orthogonal to mine. > > I don't do any pipeline processing, I just make it easy to cp, mv, > etc. using ocaml toplevel scripts as an alternative to install > scripts. I just had a visit to your project, and yes, I agree they are mostly orthogonal. Camlish only concentrates on the interaction, redirection, composition and coordination of _external_ commands, pushing/pulling the input/output as OCaml values. It doesn't, and probably won't, define functions as common shell commands by itself, which, I believe, are better left to other libraries. As a compensation, camlish allows one to execute shell commands directly from toplevel, if (s)he doesn't care about the interaction with OCaml world. So instead of writing # !! cmd "ls -l";; which is plain OCaml function calling outside command "ls", one can simply write # ls -l ;; which is a shell command, not a function named "ls". I myself am interested in using OCaml toplevel as a shell environment. Still, it's very nice to see others confronting similar problems and trying to solve them in different approaches. -- Zheng