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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 3D5F6BB9B for ; Sun, 18 Sep 2005 04:59:42 +0200 (CEST) Received: from pih-relay06.plus.net (pih-relay06.plus.net [212.159.14.133]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j8I2xfJJ028102 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Sun, 18 Sep 2005 04:59:42 +0200 Received: from [80.229.56.224] (helo=chetara) by pih-relay06.plus.net with esmtp (Exim) id 1EGpP0-0005t0-Jw for caml-list@yquem.inria.fr; Sun, 18 Sep 2005 03:59:38 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] lisp to ocaml Date: Sun, 18 Sep 2005 03:56:11 +0100 User-Agent: KMail/1.7.2 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509180356.11694.jon@ffconsultancy.com> X-Miltered: at concorde with ID 432CD81D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 ocaml:01 parentheses:01 unboxing:01 staged:01 walid:01 taha:01 metaocaml:01 frog:98 wrote:01 lisp:01 lisp:01 caml:02 checking:02 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 On Sunday 18 September 2005 02:08, Jonathan Roewen wrote: > Does anyone know of a tool that can convert lisp to ocaml (or > something other ML dialect)? I've tried googling and couldn't find > anything. Just all the parentheses gets a bit confusing for a first > look at lisp ;-) You could do a "straightforward" conversion by starting with a simple Lisp interpreter written in OCaml and partially specialising it over the Lisp program. However, if you find Lisp's brackets confusing then you're likely to find the enormous amount of boxing, unboxing and dynamic type checking that would result even more confusing. You could probably get rid of much of that but it would greatly complicate the translator. Interestingly, I just proposed writing a staged Scheme interpreter to Walid Taha, as a possible MetaOCaml example. If one existed then you could just look at the OCaml code that it generated. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists