talk shop about language implementation strategies, pain points on the JVM, and what we can do to build a common set of libraries, frameworks, and patterns to ease and improve the Java platform's support for many languages.This is a very exciting time to be involved in language development on top of the JVM. There have already been posts from the worlds of JRuby, Groovy, Jython, and even a JVM Lisp
-
Charles Nutter has announced a new Google Group to (in his words):
dialectimplementation called ABCL. If you are interested, please sign up. -
Careful readers of the last post will have noted that my NailGun run did *not* perform better than the native Python run. It looks like the results vary. I ran the test once while doing other things (and noticed that ng/Jython did better), and then ran the tests as a group so that I could paste them in unchanged. I didn't notice that Python had moved ahead. Anyway, you'll just have to trust me or try it yourself to find that ng + jython can outperform Python in this fairly silly test. I say the test is silly, since a "print 'hello'" is almost entirely dominated by startup time and so shows the most improvement. In any case NailGun looks like it should help with those little Jython scripts that I use for testing, and will help me get to an interactive session faster.0
Add a comment
-
From following the JRuby development list I found NailGun which is described on the website:
NailGun is a client, protocol, and server for running Java programs from the command line without incurring the JVM startup overhead.
NailGun runs as a server that listens on port 2113 by default, and takes requests from the ng client, which is written in C. Note that no attempt has been made to make this secure (so beware). Since I use Jython from the command line fairly often for testing and for inspecting Java libraries, and the JVM startup time is an annoyance, I thought I'd give it a try. I set up a script for launching NailGun with the Jython options:
#!/bin/sh
JYTHON_HOME=/Users/frank/src/jython/2.3/dist
JYTHON_JAVA_ARGS="-classpath $JYTHON_HOME/jython.jar:$CLASSPATH"
$JAVA_HOME/bin/java -server $JYTHON_JAVA_ARGS -Dpython.home=$JYTHON_HOME \
com.martiansoftware.nailgun.NGServer
And a launcher for jython that I called ngjy:
#!/bin/sh
ng org.python.util.jython "$@"
So a simple test shows some promise:
[frank@dhcp239-29 bin]$ time jython23 -c 'print "hello"'
hello
real 0m0.961s
user 0m0.845s
sys 0m0.082s
[frank@dhcp239-29 bin]$ time ngjy -c 'print "hello"'
hello
real 0m0.179s
user 0m0.002s
sys 0m0.009s
[frank@dhcp239-29 bin]$ time python -c 'print "hello"'
hello
real 0m0.052s
user 0m0.015s
sys 0m0.034s
Very cool! Though an unfair test, it is pretty cool that Jython can be made to out-perform Python on the command line.1View comments
-
The Jython development team is proud to announce the release of Jython 2.2's second beta.
Much like the last beta:
Get it here:
Install like this:
java -jar jython_installer-2.2b2.jar
Cheers!
-Frank Wierzbicki2View comments
View comments