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 PAA23596; Fri, 27 Aug 2004 15:09:34 +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 PAA15635 for ; Fri, 27 Aug 2004 15:09:33 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from gatekeeper.elmer.external.excelhustler.com (gatekeeper.excelhustler.com [68.99.114.105]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i7RD9VYV028733 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=FAIL) for ; Fri, 27 Aug 2004 15:09:32 +0200 Received: from chatterbox.elmer.internal.excelhustler.com (unknown [192.168.0.12]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "chatterbox.elmer.internal.excelhustler.com", Issuer "excelhustler.com" (not verified)) by gatekeeper.elmer.external.excelhustler.com (Postfix) with ESMTP id 8F515B82CA; Fri, 27 Aug 2004 08:09:30 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by chatterbox.elmer.internal.excelhustler.com (Postfix) with ESMTP id 650ACB82C9; Fri, 27 Aug 2004 08:09:30 -0500 (CDT) Received: from chatterbox.elmer.internal.excelhustler.com ([192.168.0.12]) by localhost (chatterbox [192.168.0.12]) (amavisd-new, port 10025) with ESMTP id 09239-06; Fri, 27 Aug 2004 08:09:28 -0500 (CDT) Received: from wile.internal.excelhustler.com (wile.internal.excelhustler.com [192.168.1.34]) by chatterbox.elmer.internal.excelhustler.com (Postfix) with ESMTP id 84E3AB82C7; Fri, 27 Aug 2004 08:09:28 -0500 (CDT) Received: by wile.internal.excelhustler.com (Postfix, from userid 1000) id 7F28A2904F; Fri, 27 Aug 2004 08:09:28 -0500 (CDT) From: John Goerzen To: "Nicolas Cannasse" Subject: Re: [Caml-list] Alternative Bytecodes for OCaml Date: Fri, 27 Aug 2004 08:09:27 -0500 User-Agent: KMail/1.7 Cc: "Michal Moskal" , caml-list@inria.fr References: <200408250926.28629.jgoerzen@complete.org> <20040826214223.GA25370@roke.freak> <004f01c48c19$9950d8e0$0100a8c0@warp> In-Reply-To: <004f01c48c19$9950d8e0$0100a8c0@warp> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200408270809.28272.jgoerzen@complete.org> X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at excelhustler.com X-Miltered: at concorde with ID 412F328B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 bytecodes:01 2004:99 cannasse:01 prey:99 python:01 python:01 nativecode:01 api:01 camlp:01 lacking:01 generic:01 snippets:01 selections:99 python's:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Friday 27 August 2004 04:38 am, Nicolas Cannasse wrote: > I agree with you here, the main problems OCaml and other functionnal > languages targeting CLR faces here are interoperability and > performances. No arguments here, but I would like to expand a but on the performance issue. I have every reason to believe you are right about it, but one important thing to remember is that it may not matter to many. In other words, let's not fall prey to premature optimization. In my experience, my OCaml code is three to five times faster than my Python code. Yet my Python code is still perfectly usable and I'm fine with its speed. While there are plenty of places where every last bit of performance is vital, there are also plenty of places (I dare say even more) where it's simply not an important consideration, and things like developer productivity, bug-free code, or ease of distribution really shine. [ snip ] > Ocaml is great for writing DSL, and have both very efficient bytecode > and nativecode compilers. However theses two technologies are right > now reserved to OCaml itself. If they were more "opened" (means : > documented, provide API and tools to ease code generation, ...) , it I'm not 100% certain what you're talking about here, but I'll guess and try to share my thoughts along those lines :-) There is a lot of great stuff in camlp4. It is, in my opinion, the single most powerful and unique part of OCaml. I've dabbled with it myself, but there's a lot that's lacking, too. Despite the tutorial and reference, the learning curve is quite steep due in part to the syntax and available parsers/lexers, and in part to the academic rather than how-to nature of the documents. Then there's a whole other part of OCaml that is untapped. For instance, the OCaml source includes everything necessary to write, in OCaml, the toplevel interpreter. However, the OCaml modules installed on the system don't provide enough for someone to embed an OCaml interpreter (aside from the interactive kind) or generic printer in their own code. I think part of the problem could be solved simply by installing more bits of the OCaml distribution on people's systems. As an example, my OfflineIMAP program is written in Python and uses a configuration file. Some options in the configuration file actually take snippets of Python code; for instance, those that filter selections or perform transformations on folder names. The latter actually takes a full Python function (defined with Python's "lamda" form.) I investigated doing this in OCaml, figuring that since there is a toplevel interpreter that can do this stuff, it should be possible. But there seems to be no way to do it. -- John ------------------- 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