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=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id E7BF5BC0C for ; Wed, 27 Dec 2006 20:20:29 +0100 (CET) Received: from blizzard.cs.caltech.edu (blizzard.cs.caltech.edu [131.215.44.2]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id kBRJKTU8027968 for ; Wed, 27 Dec 2006 20:20:29 +0100 Received: from localhost (flood.cs.caltech.edu [131.215.44.31]) by blizzard.cs.caltech.edu (Postfix) with ESMTP id AA4032A32A1; Wed, 27 Dec 2006 11:20:28 -0800 (PST) Received: from snowstorm.cs.caltech.edu ([131.215.44.21]) by localhost (flood.cs.caltech.edu [131.215.44.31]) (amavisd-new, port 10024) with ESMTP id 11210-10; Wed, 27 Dec 2006 11:20:28 -0800 (PST) Received: from [192.168.3.10] (cpe-75-82-142-242.socal.res.rr.com [75.82.142.242]) by snowstorm.cs.caltech.edu (Postfix) with ESMTP id 61AC0262FC6; Wed, 27 Dec 2006 11:20:28 -0800 (PST) Message-ID: <4592C77B.70600@metaprl.org> Date: Wed, 27 Dec 2006 11:20:27 -0800 From: Aleksey Nogin Reply-To: Aleksey Nogin , OCaml Mailing List , omake@metaprl.org Organization: MetaPRL/Mojave Research Group User-Agent: Thunderbird 1.5.0.9 (X11/20061215) MIME-Version: 1.0 To: Richard Jones , OCaml Mailing List , omake@metaprl.org Subject: Re: [Caml-list] Scripting in ocaml References: <6dbd4d000612201941wcd4b09anc503a13889576512@mail.gmail.com> <45915860.6030806@metaprl.org> <17af13780612261536x5f5f0d93sb1eb6ecef1b22598@mail.gmail.com> <4592BA91.8050508@metaprl.org> <20061227183927.GA7591@furbychan.cocan.org> In-Reply-To: <20061227183927.GA7591@furbychan.cocan.org> X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 4592C77D.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 syntax:01 osh:01 syntax:01 ocaml:01 ocamllex:01 osh:01 bindings:01 ocamllex:01 ocamlyacc:01 translated:01 wrote:01 parsed:01 typing:01 caml-list:01 On 27.12.2006 10:39, Richard Jones wrote: > This is the syntax, right? > > http://omake.metaprl.org/omake-shell.html#chapter:shell > > It looks remarkably shell-like. The above link only covers the "proper shell" parts of the OMake/osh language (i.e. parts related to calling external commands). Some features of the general language are outlined in http://omake.metaprl.org/omake-language.html#chapter:language > For those (like me) too lazy to > download the source, can you give us an idea of how this is > implemented? Is it an alternate syntax for OCaml or an interpreter > written using ocamllex, etc.? > The OMake/osh language is fairly different from OCaml. The language was designed specifically to work nicely in build specifications and shell scriplets, which is a quite different set of constraints than the ones OCaml is designed for. The result is a functional language with dynamic typing and dynamic scoping. OMake is implemented in OCaml (with a bit of C - fam/gamin/kqueue/inotify bindings, Windows-specific code, etc). It can be characterized as an interpreter (although before a file is executed, there is a small compilation-like translation step) implemented using ocamllex, ocamlyacc, etc. The parsed+translated version of each file is cached to avoid the penalty of having to do it on every run. Aleksey