From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA05991; Sun, 2 May 2004 19:00:01 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA05844; Sun, 2 May 2004 19:00:00 +0200 (MET DST) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i42GxxSH003547; Sun, 2 May 2004 18:59:59 +0200 X-Sasl-enc: 6wZmknyEfEIf2qAAXQcMAA 1083517196 Received: from [192.168.1.100] (unknown [218.81.128.77]) by mail.messagingengine.com (Postfix) with ESMTP id 5173DADFA4D; Sun, 2 May 2004 12:59:53 -0400 (EDT) Date: Mon, 3 May 2004 00:59:41 +0800 (HKT) From: Martin Jambon X-X-Sender: martin@localhost To: caml-announce@inria.fr Cc: caml-list@inria.fr Subject: [Caml-list] Camlmix 1.0 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at concorde with ID 4095290F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; command-line:01 foo:01 foo:01 hacks:01 ocaml:01 ocaml:01 caml:01 command:98 preprocess:02 preprocessor:02 syntax:02 eof:02 eof:02 unix:02 jambon:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Announcement: Camlmix 1.0 (first release) http://martin.jambon.free.fr/camlmix Camlmix is a command-line tool for preprocessing any kind of file using Objective Caml as an embedded language for inline expansion. It has 3 major properties: - easy: no obscure syntax, no complex library - flexible: lets you use full featured OCaml - universal: is not specialized in handling any specific file format Short example: File foo.tpl: ## # load "unix.cma" # use "my_utils.ml" let my_name () = print_string "Camlmix" ## [...] This text has been generated by ## my_name () ##. [...] EOF Command: camlmix foo.tpl -o foo.txt Result file foo.txt: [...] This text has been generated by Camlmix. [...] EOF I use Camlmix for my few static web pages. It is not supposed to replace any already existing tool, but just provide an OCaml centric general-purpose preprocessor. It can of course be used to preprocess OCaml programs themselves, but I would not recommend this. It allows to create easily a primitive template system for OCaml and probably many other kinds of dirty hacks (see the example on the web page). Once again, it's here: http://martin.jambon.free.fr/camlmix Have fun! -- Martin Jambon ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners