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 RAA26867; Wed, 25 Aug 2004 17:35:53 +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 RAA26072 for ; Wed, 25 Aug 2004 17:35:52 +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 i7PFZowe017234 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=FAIL) for ; Wed, 25 Aug 2004 17:35:51 +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 ACE531C84B; Wed, 25 Aug 2004 10:35:49 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by chatterbox.elmer.internal.excelhustler.com (Postfix) with ESMTP id 819B61C3AA; Wed, 25 Aug 2004 10:35:49 -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 10791-02; Wed, 25 Aug 2004 10:35:47 -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 A67861C6D6; Wed, 25 Aug 2004 10:35:47 -0500 (CDT) Received: by wile.internal.excelhustler.com (Postfix, from userid 1000) id 9F6F33701E; Wed, 25 Aug 2004 10:35:47 -0500 (CDT) From: John Goerzen To: skaller@users.sourceforge.net Subject: Re: [Caml-list] Alternative Bytecodes for OCaml Date: Wed, 25 Aug 2004 10:35:46 -0500 User-Agent: KMail/1.7 References: <200408250926.28629.jgoerzen@complete.org> <1093446345.15255.565.camel@pelican.wigram> In-Reply-To: <1093446345.15255.565.camel@pelican.wigram> Cc: caml-list@inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200408251035.47287.jgoerzen@complete.org> X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at excelhustler.com X-Miltered: at concorde with ID 412CB1D6.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 2004:99 python:01 python:01 interfacing:01 glue:01 runtime:01 runtime:01 usr:01 glue:01 apis:01 ocaml:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wednesday 25 August 2004 10:05 am, skaller wrote: > On Thu, 2004-08-26 at 00:26, John Goerzen wrote: > > I come to OCaml from a Python background, and one of the most > > interesting bits of technology for Python is Jython[1]. > > Curious though why you'd want to... interfacing to C > I can understand. But why bother with the JVM or Java? Because you need to do *NOTHING* to get access to Java classes. The Java type system is rich/strict enough (depending on your perspective) to be usable directly from Python, with no glue whatsoever. Also because there are some interesting Java libraries that do not exist for C, or are not as easily usable. JDBC is a common one. And because Python is cross-platform, Java is, but compiled C is not. A Jython program still can "run anywhere". Example: $ jython Jython 2.1 on java1.4.1 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import java.lang.System >>> p = java.lang.System.getProperties() >>> for key in p.keySet().toArray(): ... print "%-30s: %s" % (key, java.lang.System.getProperty(key)) ... java.runtime.name : Java(TM) 2 Runtime Environment, Standard Edition python.cachedir : /home/jgoerzen/.jython-cache sun.boot.library.path : /usr/lib/j2se/1.4/jre/lib/i386 java.vm.version : Blackdown-1.4.1-beta java.vm.vendor : Blackdown Java-Linux Team java.vendor.url : http://www.blackdown.org/ path.separator : : java.vm.name : Java HotSpot(TM) Client VM etc. I wrote no glue code for this. It just worked. And that is the case with almost all Java APIs and libraries. Jython can be used, in fact, as an interactive Java environment. -- 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