From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 17072BB83 for ; Thu, 8 Jun 2006 08:42:19 +0200 (CEST) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.194]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k586gIYl006268 for ; Thu, 8 Jun 2006 08:42:18 +0200 Received: by nz-out-0102.google.com with SMTP id l8so335614nzf for ; Wed, 07 Jun 2006 23:42:17 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=eP1zBpQcw+1A7tMouMG6oKzXYWiuC0HbeM9+cUdfpPSjJSQipO+fQ06YEMyQSulEBiqzuAj0eh7+Klch+Ei9IECpbF/3RuUymzit3NcG6N5AFL4Yf9jAMcrXCmGczzKFDdkad8MoMFUjWebjUrPdDAn+scUGXM/SMmbzQopXuHw= Received: by 10.36.139.20 with SMTP id m20mr1915869nzd; Wed, 07 Jun 2006 23:42:17 -0700 (PDT) Received: by 10.36.134.8 with HTTP; Wed, 7 Jun 2006 23:42:17 -0700 (PDT) Message-ID: <3d13dcfc0606072342p80e1f28w8bb874eb85b35930@mail.gmail.com> Date: Thu, 8 Jun 2006 08:42:17 +0200 From: "David MENTRE" Reply-To: To: caml-list@yquem.inria.fr Subject: [ANN] ocamlscript 1.99 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-j-chkmail-Score: MSGID : 4487C6CA.000 on nez-perce : j-chkmail score : X : 0/20 1 X-Miltered: at nez-perce with ID 4487C6CA.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; pre-release:01 compilation:01 ocamlopt:01 command-line:01 tar:01 makefiles:01 ocaml:01 recompiled:01 ocaml:01 compilation:01 compiler:01 compiler:01 ocamlopt:01 camlp:01 cmx:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=RCVD_BY_IP,REPLY_TO_EMPTY autolearn=disabled version=3.0.3 [ On behalf of Martin Jambon which has some issues with caml-list@. ] Dear caml-list, We are pleased to announce a pre-release of the future ocamlscript 2. Ocamlscript allows to write single-file programs that include their own compilation options and run fast thanks to ocamlopt. Ocamlscript is simply a command-line tool which takes a single input file, compiles it and runs it. 1) Key concepts: - one source file contains everything (no more tar.gz or makefiles); - programs run fast (unlike scripts using the "ocaml" command); - programs are recompiled when needed (based on last modification dates). 2) Novelties A script is now composed of two parts: - a short header which is written in OCaml and that is used to set compilation options (packages to use, compiler options, a special preprocessing, or even a completely different compiler to use instead of ocamlopt); - the program itself. By default, the program is compiled with ocamlopt and camlp4o as preprocessor, but this can be changed. This new version is not 100% compatible with the last release of ocamlscript (1.1). It only concerns specific cases, i.e. scripts that requi= re exactly one cmx or cmxa file with no other option. 3) A complete example Real example: a CGI script which uses the PCRE-OCaml, Ocamlnet (cgi package) and Micmatch_pcre libraries. The syntax extension provided by Micmatch_pcre is automatically loaded. PCRE-OCaml (pcre package) is automatically loaded as a dependency of Ocamlnet and Micmatch_pcre. So the script simply needs to start like this: #!/usr/bin/env ocamlscript Ocaml.packs :=3D ["micmatch_pcre"; "cgi"] -- ... The full source code is there: http://martin.jambon.free.fr/examples/domains.ml.html The resulting CGI executable is running as: http://wikiomics.org/cgi-bin/cgi/domains 4) Development status This is the pre-release 1.99.0 of the future ocamlscript 2. It is provided without a true documentation, and some aspects of the interface co= uld change until the 2.0 release. User input will be greatly appreciated (see wiki below). 5) Distribution OCamlscript was written by David Mentr=E9 (original version) and Martin Jambon (latest features). It is distributed under the terms of the Boost software license. Source code: http://martin.jambon.free.fr/ocaml.html#ocamlscript Wiki page for comments, questions and more: http://ocaml.pbwiki.com/Ocamlscript Have fun! The ocamlscript developers. -- Martin Jambon, PhD http://martin.jambon.free.fr