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 PAA28566; Fri, 27 Aug 2004 15:58:43 +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 PAA27480 for ; Fri, 27 Aug 2004 15:58:42 +0200 (MET DST) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i7RDwdVp003373 for ; Fri, 27 Aug 2004 15:58:41 +0200 Received: from [192.168.1.200] (ppp212-216.lns2.syd3.internode.on.net [203.122.212.216]) by smtp3.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id i7RDwTHY041733; Fri, 27 Aug 2004 23:28:30 +0930 (CST) Subject: Re: [Caml-list] Alternative Bytecodes for OCaml From: skaller Reply-To: skaller@users.sourceforge.net To: John Goerzen Cc: Nicolas Cannasse , Michal Moskal , caml-list In-Reply-To: <200408270809.28272.jgoerzen@complete.org> References: <200408250926.28629.jgoerzen@complete.org> <20040826214223.GA25370@roke.freak> <004f01c48c19$9950d8e0$0100a8c0@warp> <200408270809.28272.jgoerzen@complete.org> Content-Type: text/plain Message-Id: <1093615108.15255.1294.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 27 Aug 2004 23:58:28 +1000 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 412F3E10.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 sourceforge:01 2004:99 model:01 python:01 achieves:01 level':01 slower:01 verbose:01 python:01 snippets:01 figuring:01 dynlink:01 ocamlc:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, 2004-08-27 at 23:09, John Goerzen wrote: > 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. So the bottom line is you have to have a high performance system for those places where you need the performance. You simply need something BOTH high level and also fast, and Ocaml provides both, at the expense of breaking the object model used by C. Python is high level but not fast or C compatible. In fact C++ is fast, high level, and C compatible, and is really the ONLY language that actually achieves the goal -- however it is ugly enough to seriously challenge the 'high level' attribute :) Felix actually tries to get both, and without losing interoperability -- a high level language which generates fast C compatible code. The cost is expected to be -- not as fast or high level as Ocaml -- higher level than C but slower, more verbose than Python but faster. The *worst* compromise is Java -- it isn't C compatible, isn't fast, and isn't high level. Its called throwing out the baby with the bath water. > 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 > 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. Yeah, there is -- see the Dynlink module in the manual which is fairly well documented. But your program must be bytecode to use it, and of course you have to ocamlc the configuration file -- Python does this automatically, in Ocaml you'd have to do it manually, but it's no big deal. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net ------------------- 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