Friday, September 05, 2008

The Elephant

I'll make this a short one.

I was just having a conversation with a friend, a Rubyist whose opinion I respect, who clued me in that he really hates when JRuby users use Java libraries with little or no Ruby syntactic sugar. He hates that there's a better chance every day that Java-related technologies will enter his world. That he's going to have to fix someone's Java-like Ruby. He lamented the lack of decent wrapper libraries that hide "the Java insanity", that are just bare-metal shims over the Java classes they call. He expressed his frustration that JRuby being successful will mean he's going to have to deal with Java. He doesn't want to *ever* have to do that.

And he said it's our fault.

I've heard variations of this from other key Rubyists too. There's a lot of hate and angst in the Ruby community. Many of them are Java escapees, who long ago decided they couldn't tolerate Java as a language or were fed up dealing with some of the many failed libraries and development patterns it has spawned. Some of them are C escapees who've never quite been able to let go of C, be it for performance reasons or because of specific libraries they need. Some of them have been Rubyists longer than anything else (or maybe just longer than anyone else), and see themselves as the purists, the elite, the Ivory Tower, keepers of all that's good in the Ruby world and judge, jury, and executioner for all that's bad. In the end, however, there's one thing these folks share in common.

They think JRuby is a terrible idea.

Of course it's not everyone. I think the general Ruby populace still looks at JRuby as an interesting project...for Java developers. Or maybe just as a gateway to bring people into the community. A growing minority of folks, however, have managed to move beyond prejudices against Java to make new tools, applications, and libraries using JRuby that might not otherwise have been possible. And some folks are simply ecstatic about JRuby's potential.

Why is JRuby such a polarizing issue?

I don't see this in the Python community, for example, which might surprise some Rubyists. Pythonistas seem to have positively embraced both IronPython and Jython. There's no side-chatter at the conferences about the evils of anything with a J in it. There's no mocking slides, no jokes at Jython or IronPython developers' expense. No "Python elite" cliques actively working to shut Jython or IronPython out, or to discourage others from considering them. The community as a whole--Guido included--seems to be genuinely thankful for implementation diversity. Even if one of them does have a J in it.

What's different about these two communities? Why?

I work on JRuby. For the past 3-4 years, it has been my passion. There's been pain and there's been triumph: compatibility hassles; performance numbers steadily increasing; rewriting subsystems I swore I'd never touch like IO and Java integration. Over the past two years, I've put in four years' worth of work, writing compilers, rewriting JRuby's runtime, rewriting whole subsystems, speaking at conferences, staying up late nights (frequently ALL night) helping users on the JRuby IRC channel or mailing lists, and hacking, hacking, hacking almost all day, every day. For what? Because I want to infect the JRuby community with a new and more virulent strain of Java? Because I don't know any better?

I work on JRuby because I love Ruby and I honestly believe JRuby is one of the best things ever to happen to Ruby. JRuby takes a decade of Java dogma and turns it on its head. JRuby isn't about Java, it's about taking the best of the Java platform and using it to improve Ruby. It's about me and others working relentlessly, writing Java so you don't have to. It's about giving Ruby access to one of the best VMs around, to one of the largest collections of libraries in the world, to a pool of talented engineers who've written this stuff a dozen times over. Sure there's crap in the Java world. Sure the Java elite took power in the late 90s and started to jam a bunch of nonsense down our throats. Sure the language has aged a bit. That's all peripheral. JRuby makes it possible to filter out and take advantage of the good parts of the Java world without writing a single line of Java.

Tell me that's not a good idea.

I sympathize with my friend...I really do. I've not only seen a lot of really bad Ruby code come out of JRubyists, I've created some of it. Writing good code is hard in any language, but writing Ruby code that meets the Ivory Tower's standards is like trying to decipher J2EE specifications. If I have to listen to some speaker meditate on what "beautiful code" means one more time I think I'm going to kill someone. Yes, beauty is important. I have my idea of beautiful code and you have yours, and there may be a nexus where the two meet. But tearing into people who are trying to learn Ruby, trying to move away from Java, doing the best they can to meet the Ivory Tower's standards of "beauty"...well that's just mean. And it doesn't have to be that way. "Beauty" doesn't have to be Ruby's "Enterprise".

JRuby doesn't mean Java any more than MRI means C, Ironruby means C#, or Rubinius means C++ and LLVM. JRuby, like the other implementations, is a tool, an enabler, an alternative. JRuby does many things extremely well and others poorly, just like the other implementations. It's bringing new people into Ruby, and for that we should be thankful. It's pushing the boundaries of what you can do with Ruby, and for that we should be thankful. It's not about Java...it's about learning from the successes and mistakes of the past and using that knowlege to push Ruby forward.

So what do we do about JRuby users that start writing Java code in Ruby? We teach them. We help them. We don't slap a scarlet J on their chest and run them out of town. What do we do about shim layers over Java libraries? We build a layer on top of that shim that better exercises Ruby's potential, or we help build a new wrapper to replace the old. That's what Nick Sieger did with Warbler. That's what the Happy Campers are doing with Monkeybars and Jeremy Ashkenas did with Ruby-Processing. More and more people are recognizing that JRuby isn't a threat, doesn't represent the old world, doesn't mean Java...it means empowerment, it means standing on the shoulders of giants, and never having to leave Ruby.

I guess what it really comes down to is this:

The next time someone tries to cut down JRuby, tries to convince you it's a bad idea, to avoid it, to stay away from the evils of Java; the next time someone tears into a library author who hasn't learned the best way to utilize Ruby; the next time someone complains about a library that doesn't lend itself to reimplementation on the C-based implementations, doesn't hide the fact that it's wrapping Java code; the next time someone tries to convince you that JRuby is going to hurt the Ruby community...you tell them to remember this:

JRuby is not going away. More people try JRuby every day. As long as Rubyists who know "the way", who have learned how to create beautiful APIs and DSLs, who serve as the stars, the leaders of the Ruby community, setting standards for others to follow...as long as those people try to marginalize JRuby, treat it like a pariah, or convince others to do the same...

...it will only get worse.

59 comments:

Anonymous said...

Keep on the good work with jRuby! Don't allow anyone to let you down, you're doing an invaluable job for the ruby community. Ruby really needs a stable, fast and reliable implementation, and jRuby is the only one that comes into my mind considering these characteristics. I have a message, a proposal for those who rant about having not-so-rubyist quality jruby codes: make them better! Invent nice wrappers. If you have time to rant about code quality all the time, you should have the time to write better codes to replace them.

Anonymous said...

Well said.

Too much 'Deathstar services' koolaid was passed round a few years back, by some who should have known better.


I'd much rather write extensions in Java than C.

Anonymous said...

Speaking as somewhat of an outsider, the answer seems simple: With Python, there's one implementation, called "python," that defines the language. All the others, like stackless, jython, and ironpython, are clearly secondary. There's no power struggle because everyone agrees who leads.

JRuby is trying to push Ruby away from this model. What used to be "ruby" is now "MRI," and the JRuby implementors have pushed to redefine the language to avoid "hard things" (ObjectSpace, full continuations). If the eventual goal is to have many coequal implementations, then as each evolves there will inevitably be a power struggle. JRuby, as the implementation with the most (or at least loudest) corporate backing, catches the most flack from people in the ruby, er... "MRI" camp.

Charles Oliver Nutter said...

Anonymous: We're not trying to push anything anywhere; and in fact JRuby has remained slavishly adherent to even the most peculiar quirks and bugs in Ruby/CRuby/MRI.

It is with apologies that we inform people that we are unable to implement features like continuations and ObjectSpace in an efficient way, but our omission of continuations and default disabling of ObjectSpace have apparently not resulted in a single bug report.

We did not start calling Ruby/CRuby/MRI by the MRI moniker; that came long before JRuby (or at least before I was involved in the project).

JRuby actually has less corporate backing than either Rubinius or IronRuby, who each have more than our two full-time people on their projects. And I certainly don't think Sun's been the loudest in comparison to Engine Yard, the backers of Rubinius.

Ultimately, I hate politics. I'm trying to make the best Ruby implementation I can, and it's a major pain in the ass when people dismiss the work I and others have put in simply because it's in the general vicinity of a technology they dislike. I just hope that eventually people will come around to JRuby being a member of the Ruby family the way Jython is accepted in the Python world. I envy them that.

Anders said...

Great post.

And very true. A lot of rubyist looks at JRuby as a toy or something that is only usable in java integration scenario. The fact that Ruby (and, yes, Rails) can actually learn something from the years of experience put down into java libraries and the JVM is important.

jemmyw said...

I don't think its exactly the elite view... imagine a visual basic developer being asked to work on a project where a significant library is written in C (not that I'm likening rubyists to VBers). It's a departure from what you want to work on.

In the situation where its ruby and java, say your java library is internal. You might now need to bring in a java programmer to help - and they might view things in the same way, that they don't want to work with this ruby language. They want to do things the Java way.

Essentially the current rails/ruby talent probably doesn't want to touch mixed ruby/java projects, so new talent will have to come into that space.

Anonymous said...

Never mind the naysayers. You are doing tremendous work and should be proud of your accomplishments.

Jruby has been a boon to the ruby community if for no other reason than to spur the development of alternative runtimes.

Keep up the good work. There are many people you never hear from who are grateful for your efforts.

Don't listen to the naysayers.

Anonymous said...

Maybe I should wear JRuby T-shirt in public (as I did in Japan) to show my interest and sympathy for JRuby.

Anonymous said...

I've been in the Java camp for a LONG time. I've had a toe in the Ruby world since Rails came out in 2004 and am just now jumping in with both feet.

JRuby is the enabling technology that let me go "all in" without fear. It enables accepted usage in "enterprisey" situations with easy integration with legacy Java code if need be. And that's an awesome thing.

It has been a turnoff for four years listening to constant Java bashing by a lot of the Rails guys. I mean, I understand a lot of their beefs, but why bother? And a lot of their bashing is not about the Java language and even the Java platform itself, but the ecosystem and some frameworks (for example the "xml situps" complaint). Yes, when something is as popular as Java you are going to have lots of less-than-optimal developers using it designing ugly stuff sometimes. Ob-la-di.

I don't like beets. I just don't eat them. No need to be vocal about it, why offend Dwight Schrute? :-)

Charles, thanks for everything you do and keep up the awesome work.

Giancarlo Bellido said...

Ruby and JRuby can coexist. You are doing an amazing job for the ruby community and I bet you have also gained a lot from this project professionally.

Having many interpreters helps the adoption and development of the language. I have seen many rubynious people pointing and fixing up bugs in the ruby-core mailing lists.

Of course many people wont be using JRuby because of a Java-phobia that is common around us; but also lots of people find this project useful and interesting.

As long as there is a consensus in the standard and all implementations adhere to the base ruby (YARV or MRI) i think everything will be ok.

Unknown said...

You mentioned the lack of this hate in the Python community. I, myself, came to Ruby from Python. I chose it because of the consistency and relative increase in beauty in the language.

Maybe Python people don't mind Java because they've already accustomed themselves to a less-than-beautiful language.

Ruby people have something pretty cool going -- a very elegant language -- and don't want to see that change?

Anonymous said...

There's a name for such people: tossers.

Some people want the moon on a stick and when you give it to them they still grumble. Ignore them.

Anonymous said...

It disappoints me to hear that you're taking this kind of flak for your work. Disappoints, but does not surprise. There are always folks who respond to change this way. And JRuby represents change. Flak like this means you're on the right track.

I dream of the day when the number of Ruby / Rails job postings comes close to, even surpasses, those for C#/.NET and J2EE. In my not-at-all humble opinion which derives from 20 years in the biz, JRuby represents the single best hope that Ruby, and by extension Rails, will become an accepted, perhaps even preferred, platform in Fortune 50 IT shops. And that's what has to happen for my dream to come true.

The single biggest obstacle to that dream is the IT Operations groups. Don't misunderstand me. They're not the "bad guys." They're the over-worked and under-appreciated guys who simply don't have and can't get the resources required to support another platform. Much less one with an architecture as different from their current one(s) as Rails / Mongrel clusters / Haproxy /etc. represents.

The work you're doing will make it possible for developers to work in a language they love without imposing new burdens on the Ops guys. To Ops, a JRuby / Rails app will look just like any other app running in a JVM. No change for them == many new opportunities for us.

I applaud you and the JRuby team. And I hope my applause and that from the rest of the folks out here who 'get it' will drown out the noise from those that don't.

Best regards,
Bill

Tim said...

Speaking of Matz and the T-shirt... but then, a couple of days before that, I saw him wearing a Python T-shirt, snicker.

Robert said...

Having the option to use JRuby has made it easier to choose Ruby / Rails as our standard in-house language and framework. It's creating Ruby jobs that might not otherwise have been there. Surely Rubyists have to consider that "beautiful".

Anonymous said...

jemmyw: But the current Ruby/Rails talent pool seems to have no problem using shim wrappers over C libraries such as RMagick. Would those same people jump on ImageVoodo considering it's tremendously easier to get going (no compilation, actually works cross platform, etc.)? I think many people are totally fine with one set of problems and are unwilling to look at another environment with a better tradeoff, simply because of that J and the fear of being "uncool". Yeah, there's a definite clique'y "gotta be cool" vibe still in the Rails/Rubinius/(to a lesser degree Merb) community that is hurting Rails' reputation now, far more than it is helping.

Ivan said...

The fault really falls with the Ruby community unfortunately. The post-Rails people are subjective, highly emotional, opinionated, and all those other things that DHH praises as virtues; it's clear your friend has been infected. Whatever happened to best tool for the job?

I'm sure you're doing great work Charles, so keep it up; don't let the bastards drag ya down!

Anonymous said...

All of us at GitHub are rooting for you guys. The more Rubyists, the merrier.

Anonymous said...

I agree that the main values of Ruby runtimes like JRuby are what they provide access to. JRuby allows seamless access to the myriad Java libraries and many, many companies depend on these libraries. I think JRuby is critical for those companies.

I feel that the other runtimes also have very interesting appeal for the same reasons. IronRuby provides access to CLR libraries on the server OR (more interestingly to me) access to the DOM and Silverlight vector/animation engine in the browser.

MacRuby provides seamless access to the Objective-C frameworks of OS X in a highly performant way. If you want to make use of Ruby to use Cocoa, Core Animation, Core Image, Core Audio, etc you can do that incredibly well with MacRuby.

Rubinius provides something uniquely different and thats Ruby "all the way down" (mostly). I think that's awesome as a Rubyist.

I won't leave out Ruby 1.8.x and 1.9.x MRI which, of course, provide access to the platform of the operating system through C in a very nice and powerful way and one that has served the Ruby community for a dozen years.

At the end of the day Ruby is how Ruby behaves on MRI and I think that all the implementors of the runtimes are working overtime to get as close as possible to that. Sometimes there are differences, that happens, but this stuff is really hard and my hat is off to any and ALL folks that are working to implement a Ruby runtime.

Anonymous said...

Hey Charles,

I wouldn't think about such a comment too much. There are smart people in the world that have their moments being a troll. It sounds like his anger isn't towards Java, but those developers that believe all languages are created equal. Recently I have been studying ActionScript 3, but my main focus isn't on the syntax, but what the language brings to the table and how things should be done. Much like any technology, you need to understand the strengths and weaknesses before you apply them.
Try to educate your buddy on the key differences of the languages. I'm sure if he's a smart fellow who respects your opinion, he'll leave learning something new from your conversation. Java isn't a perfect language, but the VM is amazing!

Keep up the great work and good job on making the JVM a platform!

Richard L. Burton III

Anonymous said...

I've seen a number of complaints about Ruby elitism and disrespect within the community that I haven't seen in other language communities--to the extent that I've seen several major contributors complain about it. This is not the occasional bad apple sort of thing, because you don't spend time in this field, and on the internet, without coming across more than a few and becoming somewhat hardened to it. I think it is worthwhile to ask yourselves what you are doing as a community to create and protect that community. And that includes not leaving the elitists uncontested in driving major contributors out of the Ruby community.

Raphaël Valyi said...

yeah, invokedynamic to those naysayers...

Anonymous said...

Charles,
Where are some classic examples of wrapping Java classes with JRuby classes? The samples provide a few limited examples (minijava's arraylist.rb, swing.rb). TIA!

Anonymous said...

Never mind the hataz! This looks like an inverted form of the snobbery that used to be more frequently doled out by enthusiasts of compiled languages in respect to interpreted languages. In each case, people who aren't entirely comfortable working in another paradigm are hiding feelings of inferiority behind contemptuous bravado. I love JRuby too, in part because it offers a pragmatic resolution to such pointless language warring.

The best practices and fine points of style for interfacing between idiomatic Ruby and idiomatic Java will evolve over time.

Thanks for your work, Charles. You're helping to move the state of the art forward.

Anonymous said...

@Charles:

(This is the first "anonymous")

Thanks for the polite and detailed response. I'm surprised about JRuby having less corporate backing. I see very little buzz from implementers/users of IronRuby, and less from the Engine Yard people (perhaps because I never do web development; I sometimes use Ruby as a scripting language for scientific apps, and occasionally hook it into C libraries).

I believe you're operating in good faith, but I don't see how things don't get politically ugly down the road. Ruby lacks a formal spec, and since it is still evolving, I think it's pointless or even harmful to try to make one. Languages either evolve quickly with a single primary implementation (Haskell/GHC, Perl, Python/CPython), or they evolve glacially (C, C++) with a formal standard and many more-or-less conforming ones. Making an ANSI/ISO Ruby spec would IMHO kill the language, but with no single master implementation, each will be pulled in a different direction by implementation-specific factors. I can only see this leading to diverging languages, but only one can call itself "ruby."

AFAICT you have put serious pain into faithfully reimplementing Ruby ("slavishly adhering to quirks," as you call it...), and that deserves respect from (C)Ruby people. But eventually it will be a huge win for you to change X to Y for better JVM integration, and for IronRuby to change X to Z for the CLR, and for (C)Ruby people to leave things as they are. And at that point things get ugly if everyone wants to call their language "Ruby."

Maybe it can work peacefully. Maybe Ruby, Ruby.NET, Rubinius, and (C)Ruby can all call themselves "Ruby" in the same way that many different dialects are called "English," and speakers of one can usually understand speakers of the others. This would be an interesting situation, but I'm not sure how long it could last.

Alex said...

Hi Charles,

On the Internet there's always a silent majority and a vocal minority.

I just wanted to say that I think you're doing a great job, and that I use JRuby in my projects.

Keep up the good work.

Anonymous said...

Charles,

I'm a Java guy from way back. Ran a national arm of your current employer in the field last century. Bill Joy used to pop in for pep talks. Right now I'm up to my eyes in PHP, which oddly I can live with in its OO form. But when it comes to scripting, Ruby is god. But I never run MRI, I just keep a copy of JRuby HEAD local and run with it. Even in Scite it's JRuby.

JRuby is a remarkable project.

Last year I was doing Java mobile phone stuff. We had JRuby all over the shop. It even seeped in to other projects.

JRuby is just behind Linux in terms of most important OSS projects, imo. And when push comes to shove, I could live without Linux.

Don't underestimate what you guys (inc. matz) have achieved.

khelll said...

well man, honestly when i talk to friends about great open source projects, i mention jruby, and when i talk about brilliant minds, i mention the ppl behind jruby... go on man thanks for u and ur team....

Anonymous said...

Imagine the kind of flak Ruby itself took for many years before becoming relatively mainstream. (As if it ever comes to a stop, the criticisms.)

Thanks to Sun and to heroes such as the JRuby team, good things have been happening. By perfecting JRuby with each new release, JRuby becomes more appealing as well. Even though neither Ruby nor JRuby are perfect and never will be, they can always be perfected. Where once something blew in a terrible way, it suddenly became reliable and understandable in a new release. Where once JRuby took a lot of time to load up, it has started loading faster.

In some ways, JRuby is greater than Ruby, but doesn't quite measure up to Ruby in other ways. JRuby increases the universe of what Ruby can do.

In the same way that Ruby was once used in production systems despite being a very unknown technology, JRuby too has been making headways into the hands of end-users.

Not everything are roses though. Just like many Ruby users can't stand C, many JRuby users can't stand Java. That is to say, many users aren't interested in hacking core Ruby or JRuby, which puts more strain on the core developers who have to cope with more than their fair share. Python and Jython folks also have C and Java to haunt them. :-)

Giles Bowkett said...

I'm with you on this.

I was just tweeting yesterday about the JRuby XML parser that may be better than any XML parser running in regular Ruby.

I told people at eRubycon and MountainWest to play with Nodebox, and use its Python scripting abilities, because it's powerful and useful.

An ecosystem full of Ruby implementers is going to have better Ruby implementations than an ecosystem with only a few. Even if you were totally closed-minded regarding other languages, JRuby counts as a win for our community.

But the really weird thing is closed-mindedness to other languages happening in this community at all. This is a community organized around a language which owes its existence to open-mindedness regarding languages. Ruby's got pieces inside it of every language out there.

I think the "Not Invented Here" syndrome's unfortunate, but fighting it is much less useful in the long run than simply ignoring it. Every person who closes their mind to something also limits their competitive and creative opportunities with it, and there's a hell of a lot you can use Java for (and Python too).

Programmers often turn out to be more religious than scientific when it comes to their languages, frameworks, and tools. Persuading somebody who makes their choices irrationally to come around to the rational approach is a tough, uphill slog. Out-competing somebody who irrationally avoids a winning strategy is easy as pie. Choose the easy road.

Unknown said...

There are really two issues here. First is the hostility of some poorly-behaved members of the Ruby community towards JRuby. (If I had to guess, I would say they probably came to Ruby post-Rails, and probably aren't all that experienced, by that's just pure speculation.)

To those people, I say, "don't let the door hit your ass on the way out." We don't need 'em, and shouldn't tolerate blind ignorance towards truly useful, productive projects like JRuby.

The other issue, though, is that of the Java/Ruby hybridization that can happens in some situations. While I can understand the pragmatics that lead to such code ending up in production, it's also a sign that there may be leakage of low-level implementation details into the business logic.

I would look equally askance at, say, Rails controllers which used RubyInline to do a bunch of FFI calls. Glue code like that, especially when it exposes system details that aren't important to a particular application, should be in their own library, with a clean, idiomatic API. (Hell, how else are you going to provide compatible JRuby and MRI adapters?)

Forcing someone to jump between Ruby and Java semantics mid-method is jarring, and may be a sign that you're missing an obvious place for a little abstraction.

Regardless, I hope you guys keep plugging away at JRuby for a long time. One of these days, it may even convince me to come back a little closer to the Java world. (I cut my teeth doing J2EE webapps, but have stayed pretty far away from Java-land for the last five years or so.)

djwhitt said...

Hehe, maybe you should drop the J when people aren't looking and just tell everyone you have a new Ruby implementation available that runs Rails, has native threading and is faster than MRI ;)

Anonymous said...

Code beauty lies in the mind of the beholder.

Anonymous said...

JRuby is really a fine effort, Charles. You and your collaborators should be proud of your work. However, the fundamental issue underlying your blog post is that your in between two sides of a generation gap, and its shifting towards Ruby. JRuby is to Ruby as Frank Sinatra's disco album was disco. Its too easy to see as the old fuddy-duddies trying to keep up with the cool kids, and as we all know, there's nothing the cool kids more than *NOT* pissing off their parents. People will use your stuff, but they won't shout from the treetops about it. Rubinius and MagLev will always seem cooler. You've just got to learn to deal with it and move on. You've proven your mettle; don't let this bog you down anymore.

Anonymous said...

Perhaps all the Ruby snobs would be interested to hear of my experiences. Not with Java, JRuby and Ruby but a similar situation with C#, IronPython and Python.

I'm a C# developer and decided to learn Python. I'd just dabbled around the edges when I heard of IronPython. Great - best of both worlds! Use some of the libraries I'd developed in C# (eg for connecting to SQL Server databases painlessly) but also get to play in Python.

However, I was worried about exactly the issue that seems to drive the pure Rubyists up the wall - would I end up coding C# and .NET using Python syntax? Would I end up using the familiar built-in .NET libraries and never learn the Python equivalents?

Here's the interesting bit: As I got deeper into IronPython, I found myself actually spending more time in CPython ("pure" Python) and less time in IronPython. I'd be trying to do something in IronPython and discover some standard Python function hadn't been coded in IronPython. To get my code to work I'd end up running it in CPython.

This started to happen so often that I found myself spending almost all my time in CPython and very little in IronPython.

So, to my surprise, I've found IronPython has lead me to CPython, rather than keeping me firmly locked in the .NET embrace.

Anonymous said...

I think this also may be related to a this "I hate Java" attitude that seem to be cool to some ;-) What is interesting is that there's not the same thing toward the .NET platform, and I really don't know why. There's this same attitude from a part of the Linux world. Of course it has absolutely no ground !!!

Bruce Eckel said...

One thing no one seems to have mentioned here is the fact that, by running on the JVM, JRuby can often be used more easily than Ruby. That is, if a company has vetted the JVM, they are often OK with other ways of running on top of the JVM. So using a JVM-hosted language is often an easier way to get Ruby/Python/etc. into your company.

Bob Aman said...

Here's the thing. My feelings are similar to that of the person you were talking too.

I think you may have misunderstood some of the motivations though.

Consider this scenario: Some fresh new Rubyist from the Java camp starts using JRuby, correctly realizes that it's a great piece of technology, and it quickly becomes his/her preferred means of building, say, enterprise software. I'll go out on a limb here and say this scenario isn't all that unlikely.

Now lets also say that this newly minted Rubyist isn't all that familiar with the Ruby coding style. They naturally use the Java libraries they're used to through JRuby, because hey, the Java side of things has a lot to choose from. They don't recognize that the coding style is foreign, because it's not really foreign to them. But now they decide they'd like to contribute to the Ruby community at large.

Suddenly you have pure Ruby libraries written in a Java style. Believe me, it happens way too often.

Now, to be fair, this scenario doesn't necessarily mean the well is being poisoned. But the potential is there. Badly designed Ruby libraries written in the Ruby style (like ActiveSupport) are already hard enough to avoid because of library dependencies.

The solution to the issue is pretty simple really. Don't use the offending libraries in open source projects. Use 'em to your hearts content in closed source projects, but please don't make them into dependencies. Ever.

Anonymous said...

"Badly designed Ruby libraries written in the Ruby style (like ActiveSupport) are already hard enough to avoid because of library dependencies."

So you just said it's a library implementation quality problem, not necessarily a Java problem. So basically, you're point is you're an ass?

planetmcd said...

Great Post, Great work. Thanks!

Anonymous said...

Thanks for the post, Charles, and for your work.

Anonymous said...

The reason I use jruby is I hate java's syntax as a language and love ruby for it. But however long ruby tries it can never reach the level of infrastructure which java has. Jruby gives the best of both the worlds.

I thank you for jruby and will find all ways to make jruby better.

Regards,
Sai

Anonymous said...

I couldn't agree more with you.. being a Java developer/consultor/instructor for the last 8 year, found a great language to express myself and because of JRuby I can use the best of both worlds.
Keep up the good work!

Anonymous said...

Quoting that Pistol band from UK: "Never mind the b*llocks."

Keep up the excellent work! A whole world of developers are supporting you.

Anonymous said...

Speaking as somebody who sort of hates Java as a language: Keep up the good work with jRuby. More Ruby implementations is definitely good for the community. We'll suffer a few growing pains for it, but in the long-term we'll be better off.

rob said...

Just another JRuby hacker here chiming in to say please disregard the ignorant negativity. Thanks to you and all JRuby commiters for your hard work.

JRuby has been great for me because it allows me to use Ruby in my locked-down corporate IT workplace that has never heard of Ruby and would not allow it to be installed on their servers.

I also use JRuby for scripting against a huge, poorly documented vendor Java app. Quickly knocking together scripts and trying things to get a better understanding of how that app behaves saves me lots of time and anguish.

Thanks again...

Unknown said...

just wanted to give another big thanks to all your work on jruby...had it not been for jruby i would still be stuck with about 90% of my work time doing java...now with jruby it is completely the opposite and i am using ruby for 90% of my work on a website that was originally developed in java!

its been great, i'm a much happier developer now and for me jruby is THE ruby implementation

Charles said...

I'd have to agree with the commenter above who referred to the "vocal minority". I (like many others) rarely take the time to vocalise my appreciation, so lets rectify that...

The ability to share (using DRb), a java class (or even an entire java package!) to other code running on MRI on other comptures is *incredibly* useful! If only ironruby was up to scratch, ruby would be an even more awesome glue language for integration.

Jruby stands on its own merits too for its impressive performance enhancements. A lot of my code is still stuck in MRI due to various dependencies (NArray, Rsruby, and others), but for some projects it has been a much faster platform than MRI.

Hopefully you don't loose faith in the community!

Anonymous said...

I realy don't like Java, as language, but why not use the excellent JVM? Ignore jRuby looks like a Old Java Fanboy Attitude: "I love my world, you, and your language are wrong".

jRuby it's a really relevant project with a relevant meaning.

I live in Brazil, in my city everyone loves java, jruby can be a short way to introduce ruby.

Anonymous said...

I bash Java all the time. I've likened it to a 400 pound white dude in a Suburban with JIT as his nitro tanks.

But let's be real for a minute: JRuby is the fastest implementation of Ruby, probably the best written (are we ever going to see an end to those MRI overflows?), the best supported (I submit bugs for JRuby and they get closed quickly) and it's the only one with real threads (and you guys are on my very, very short list of programmers I think are competent enough to correctly implement threads). I've even pondered switching from OpenBSD to Linux just to use JRuby for production (OpenBSD supports Java, but yeah.. not very used and probably has bugs and perf issues).

Anyways, my retort to these people:
If you don't want to use Java in JRuby, then don't use Java in JRuby. I don't plan on it. Will Java seep into Ruby in corporate environments? Probably. Got a problem with it, quit your job. I'll take your contracts and kick your ass, basically what I'm doing anyways. Ask a gynecologist if a little Java in a Ruby app is gross.. I have no idea, but I bet gynecologists have seen some pretty fucked up shit.

I'm more worried about Ruby culturally than programmatically. I like that I can go to cheap conferences full of interesting, pot smoking weirdoes with really good ideas instead of loveless toolbags contributing nothing to the scene and just in it for the cash. A lot of the other programming scenes I hang out in are also full of.. well, nerds.

Matt McKnight said...

Jruby and Warbler rock- easy for a rails guy stuck on a java project to sneak in. The incompatibilities are tiring though. Will there ever be a Ruby language spec?

Anonymous said...

Thanks to JRuby we can build a nice enterprise class product in Ruby that smoothly integrates with J2EE, IBM MQ and the advanced XML wizardry of JAXB. You guys are doing invaluable work for people that want to use Ruby in the real world. Thanks.

Anonymous said...

Seriously, I don't know what I would do without JRuby. Where I work we deal with 15+ different operating systems. But one thing common to them all is they have a JVM! and on that JVM I can run JRuby! No need for the headache of compiling Ruby on all those platforms...I just ftp the jar complete and bam I'm up and running (well, not quite as simple as that on Z/OS, but close).

We also use WebSPhere MQ where I work and I need tools to put and get messages off of queues. Bridging Ruby to use the MQ C api on all those platforms would be a drag. With JRuby I can use the java MQI; it's a total breeze. I love JRuby! Thanks for all your work.

Isaac Gouy said...

I wonder which Ruby implementations have a multicore story (let alone a many-core story)?

Anonymous said...

I don't like Java, but I like JRuby, since it makes my Ruby programs run fast, reliable and efficient in a JVM without requiring me to write Java code :-)

Anonymous said...

What can I say, Jruby is great, so keep up the good work! ^_^

Mr Aman, if you don't like certain libraries having a "Java style", then don't use them and help people who are writing alternatives. Don't try to blame JRuby for something it's not responsible for.

And for the people who are wondering, Matz is planning to make Ruby into an ISO standard over the next +-5 years. I think that's a great idea. It will increase the compatibility between different implementations of Ruby. It needn't make the development of the language slower, we can always make a new ISO standard.

Unknown said...

You guys have done a great work with JRuby.

For my work, the ability to deploy on a JEE app server is essential and by using the RoR framework for my Web apps is crucial for respecting the time schedulings.

Thank you for your efforts till now, and hope you'll enjoy improving JRuby for the future also!

Greetings
Mike Costa

Anonymous said...

Was just at a small one-day event put together by our local .Net group, and there was a fair amount of discussion of IronRuby, and dynamic languages in general,in at least a couple sessions. No snickering or comments, but I think the .Net camp is happy to have even more ways to tie yourself to the MS/.Net world, and IronRuby (and IronPython, etc.) serve those purposes nicely ;)

JTP said...

Long Live Ruby! Long Live JRuby!

I've tinkered a bit with JRuby but I haven't used it in any big way. But one of the reasons I feel comfortable writing code in Ruby in general is because JRuby EXISTS! It means that if I need to interface with or use code from the Java world (and lets be honest, it's a BIG world of code) I can. Hopefully, the community will start supporting the various implementations even more with FFI (as I plan to do). Thanks for all your work on JRuby!