From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 08034BDC5 for ; Tue, 23 Aug 2005 00:51:34 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j7MMpXdx018849 for ; Tue, 23 Aug 2005 00:51:33 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA04669 for ; Tue, 23 Aug 2005 00:51:33 +0200 (MET DST) Received: from smtp7.wanadoo.fr (smtp7.wanadoo.fr [193.252.22.24]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j7MMpWGA018844 for ; Tue, 23 Aug 2005 00:51:33 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf0701.wanadoo.fr (SMTP Server) with ESMTP id BAB2E70000A1 for ; Tue, 23 Aug 2005 00:51:32 +0200 (CEST) Received: from morgana (ARennes-257-1-3-199.w81-250.abo.wanadoo.fr [81.250.162.199]) by mwinf0701.wanadoo.fr (SMTP Server) with ESMTP id 8D5F8700009F for ; Tue, 23 Aug 2005 00:51:32 +0200 (CEST) X-ME-UUID: 20050822225132579.8D5F8700009F@mwinf0701.wanadoo.fr Received: from david by morgana with local (Exim 4.50) id 1E7L8k-0002d1-Mg for caml-list@inria.fr; Tue, 23 Aug 2005 00:51:38 +0200 To: caml-list@inria.fr Subject: [announce] ocamlscript 1.0 From: David MENTRE Organization: none Date: Tue, 23 Aug 2005 00:51:38 +0200 Message-ID: <87zmr9poud.fsf@linux-france.org> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at nez-perce with ID 430A56F5.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 430A56F4.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 cmxa:01 argv:01 argv:01 recompiled:01 1.0:98 --end:98 tar:01 unix:01 unix:01 int:01 native:02 native:02 string:03 sys:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Hello, I've just released ocamlscript 1.0. ocamlscript is the very very small implementation of a simple idea: write shell-like scripts on a Unix system but in OCaml and optimized for speed. For example, you can have a file with following content: --start execute-n-times-- #!./ocamlscript unix.cmxa let times = int_of_string (Sys.argv.(1)) let program = Sys.argv.(2) let _ = for i = 1 to times do ignore(Unix.system program) done; exit 0 --end execute-n-times-- And execute this script as: ./execute-n-times 10 'echo Hello world!' When this script is executed ("./execute-n-times"), the first time it is compiled into native code ("./execute-n-times.opt") and then executed. At second execution, the native code is executed immediately. Of course, if the original script is modified, the native code version is automatically recompiled. A nice project (and from where the original idea of ocamlscript comes from) would be to do a Linux distribution where all usual shell scripts are replaced by ocamlscript scripts. I probably won't do it. ;) Source: http://www.linux-france.org/~dmentre/code/ocamlscript-1.0.tar.gz License: Public Domain Have fun! ;) d. -- pub 1024D/A3AD7A2A 2004-10-03 David MENTRE 5996 CC46 4612 9CA4 3562 D7AC 6C67 9E96 A3AD 7A2A