Wednesday, November 15, 2006

Jython: Alive and Well (and looking for love)

I thought I'd make a diversion from my usual JRuby activities this weekend and ping the Jython dev list. I'd been lurking for a month or two, seeing almost no activity other than the occasional email, bug report, or request for help. There were perhaps 5 emails in the last month. Not good.

So I reached out to see if anyone was actually listening and to offer whatever support I can provide. As it turns out, there's still a dev team and a user community on the lists, though development has slowed almost to a standstill. There hasn't been a release in years, and Jython is currently about 2x slower than current CPython, while only supporting Python 2.1 semantics in the widely-available release.

But there's a light. The existing team and users are very much interested in getting Jython going again, and from my examination of the code it shouldn't be too difficult for new devs to get involved. Jython also has a pretty good story for compilation to Java bytecode--better than JRuby currently--so it has a strong base to start from.

So here's my request to folks reading this post: If you're a Python fan and a Java developer, now's your time to show devotion to both communities. The Jython guys could use some help, and the project could certainly use some new blood. It doesn't matter to me if you're not a Ruby fan, or heck, if Jython ends up reaching CPython 2.5 compatibility before we get a JRuby 1.0 release out. I'd just really like the JVM Python story to have a happy ending...and I think Jython's long slumber needs to come to an end.

Jython is available on SourceForge, and the existing dev team are friendly, enthusiastic folks. Post this entry to your blogs, send it to your friends, print up flyers and hand them out at your local Python or Java User Group meetings. Jython needs some love, and now is the age of dynlangs for the JVM. Stop by and lend them a hand...I have.

16 comments:

Patrick Wright said...

Nice of you to raise the issue--I was actually going to blog today (probably will) that I wish there were some way the various semi/active JVM language developers would start working with each other to share libraries, ideas, strategies, etc. I imagine that many of you end up rewriting pretty similar tricks for certain common situations, f.e. as regards dynamic dispatch. Seems to me there's a lot to be gained all around from all of you learning from each other and not reinventing the wheel (or, if you do, rolling it along). This is especially true since there are now so many languages on the JVM. I realize there's pride of authorship, and wouldn't want to discount that--and I'm not proposing an UR-language or anything like that; more like a common ground to facilitate building new languages in this environment. Good blog, by the way, keep up with the technical memos, they're fun to read.

Anand said...

I tried to look at the codebase. but i found that the code is very complicated and gaveup. I use jython a lot and i would love to see jython in sync with c python.

Jason Huggins said...

I wholeheartedly agree that it's time to bring Jython back to the front-burners. It would help, though, if Sun, Google, IBM or some other "white knight" corporate backer could put some dollars into it, too. I've been doing a bit of IronPython coding at work, and the seriousness with which Microsoft is supporting Python on the CLR is very nice to see. I would love to see the same kind of official corporate support for Jython.

codecraig said...

yea I also use, Java, Python and Jython. However, the lack of updates/support for Jython has led me to start looking into Jepp. I haven't switched to it completely, but so far so good. Nice thing about Jepp is that it uses whatever python you have installed so it is as up to date with Python as it can be (from what I can tell).

like why doesn't Jython have base64 urlsafe methods? just copy and past them in from the python source and your good to go...not sure why they were left out.

Andrey said...

How the process of contribution looks like from internal point of view? I'm asking this because I posted a couple of fixes/diff for existing problems in Jython at sf.net bugtracker and actually got no response from anybody. Later I tried to look at the bugs, and at least a couple of them are fixed and I found comments, that my fixes was okay.

So, does it make sense for anybody to be involved in process or Jython team feels comfortable with < brain > resources? :)

Ian Bicking said...

The inverse of Jepp is Jpype: http://jpype.sourceforge.net/ (just throwing that out there if people are interested in such things)

Bruce said...

Thanks for bringing this up, Charles. I think the future of the JVM is Java modules being called with dynamic languages, and I'd like to see both JRuby and Jython available for this.

I thought I heard that the road block happened when Python 2.3(?) changed some of the fundamentals about objects (resulting in, for example, the ability to inherit from builtin types like list and dict). This apparently caused some kind of issue with the implementation on the JVM, that made it difficult, and that's why the stall. That's what I heard, anyway.

Ian Bicking said...

My impression of the stall is that the project hasn't had a real leader in a long time. Both Jason Huggins and Samuel Petroni seemed more interested in the technology -- which is valid and fine and this is open source so you can't blame them for how they give their work away, but successful projects require a lot of grunt work and project management. Jython has lacked that sort of champion for a long time.

Charles Oliver Nutter said...

patrick wright: I'm sure there's a ton we can share, and indeed a ton we *must* share to make inter-language operability as seamless as possible.

anand: keep at it! I didn't know a thing about language implementation when I started on JRuby, but look at how far we've come!

jason huggins: I know, that would be really huge. But the way that Tom and I got hired was by showing real commitment, real devotion to making the project go. Folks won't get hired to be passionate...they have to be passionate first.

codecraig: Sounds like a great suggestion for the Jython list :) If you have suggestions for modules they might be able to incorporate immediately, it would be good to tell them. If you'd like to help them make such modules work, well, that's even better :)

andrey: If you have patches that were ignored (or more likely, just missed), you should let them know. Things are really waking up on the Jython lists now, so it's the right time to jump back in.

ian bicking: Yes, having some real leadership would be a big help. I'm hoping that someone will rise from the ranks if things look like they're getting going again. It's important to have strong leadership to push things in the right direction.

bruce: there's apparently a 2.3 branch already in SVN, so hopefully that means that 2.3 issues are under consideration. I don't think there's anything we *can't* make work, but it may take some elbow grease to get there.

Patrick said...

Charles--I'm not talking just about inter-interoperability, I'm talking about what language designers for the JVM can learn from each other to avoid re-creating the wheel for each independent language. While I'm sure there is much that is unique about Ruby and JRuby, there's got to be a lot about parse/interpret/compile, data structures, ASTs, caching, method lookup, etc. that can be shared. I would find it a shame if there weren't some way to build on each other's successes rather because this knowledge wasn't shared, and worst of all, if that happened within an open-source community. Surely some of the problems you are facing in implementing JRuby have already been solved (or analogous ones have), wouldn't it be great to find out how? Maybe shared libraries could be built up to make language development for the JVM easier and more robust. It requires communication, reach-out, and real interest in what others are doing and have done. Hope you can all work together to make the sum greater than the whole of the parts. Best regards, Patrick

cowmix said...

I'm another Jython/CPython fan wishing Jython would get more love too..

I remember seeing a something a few months ago where the company ActiveGrid was going to update Jython to make it the scripting standard for their product. Does anyone know if they have engaged the Jython community to start that process?

Peter said...

Back when we at ActiveGrid first started working on helping to fix up Jython someone from Sun reached out and said that they would help out as well but then we never heard anything again. I agree that until there is a big corporate sponsor folks are just going to fix what they need to fix for their own projects, which is unfortunate. Anyways we have been pleased with Jython just wish that the performance was better and that it had more of the Python libraries implemented. Peter

Charles Oliver Nutter said...

patrick: You're right, there are many techniques and strategies for dynlangs on the JVM that could be shared across projects. Jython does many things we don't, specifically generating bytecode and optimizing a few aspects of Python. And we may be able to use similar techniques in JRuby or pull certain portions out into reusable libraries. I'm already talking with the Jython guys about various pieces I think JRuby could use.

StephenFerg said...

For those who might be interested: the wiki entry on tools for scripting Java in Python is
http://wiki.python.org/moin/JavaScripting

cowmix said...

Good lord.. Jython is listed as 'inactive'..

Depressing.

Demetrios said...

Maybe you could post about PHP on JVM too. The Java implementation of PHP from Caucho (Quercus) is even faster than the original implementation (I suppose this is not the case with Python and Ruby :) ) :
http://www.caucho.com/resin-3.1/doc/quercus.xtp

D.