Live data from Hacker News

JRuby 9000 released

blog.jruby.org

31–40 of 119 posts

Re: JRuby 9000 released

#32
post #9

JRuby is a great idea. It has one pitfall which consistently stops me from using it though : poor support with newer releases of Rails, usually due to the Active Record stack not working well with the AR JDBC adapter. I know some work was being done on a JRuby version of the standard pg gem (without the need for JDBC) which would be fantastic if it was completed and working.

Define "newer" and define "poor"? The JRuby team has done a fantastic job of keeping things working. Do you have any specific problems other than vague grumblings? Anyone married to the MRI ecosystem because of dependencies on modules with no JVM equivalent may have problems, but new projects usually have no such issues.

Rails 4.2 was released 7 months ago.

When I last experimented with creating a standard Rails 4.2 app with the AR JDBC adapter and a database model a few weeks ago, it still didn't work. I haven't looked at things since then.

The workaround some people will suggest is "replace ActiveRecord with Sequel" but for existing projects a migration to a less standard Rails stack may not be viable.

I agree the JRuby team is doing a great job - however Rails is a big use case for any Ruby implementation, so my comment was not intended as a criticism, more in the line of a bug report and something it would be nice to have working now the new JRuby release is out the door.

Re: JRuby 9000 released

#33
post #27

Concurrent threads using magic regexp vars like $1 stomp all over each other, quite nasty: https://github.com/jruby/jruby/issues/3031 Stumbling over a serious race condition in the first 5 minutes of trying it with real code makes me a bit wary. All the performance in the world isn't much good if it's randomly wrong :/

One of the things I've most appreciated about the JRuby community is that bugs get fixed in a hurry. My first experience with JRuby was trying it, something not working, jumping into IRC to ask about it, and headius had it diagnosed and patched 10 minutes later. From then on I was hooked.

The other major thing I like about JRuby is that it's much easier to hack on than MRI - the Java code is extremely clean and easy to understand, and it's easy to use tools like IntelliJ's debugger to diagnose issues quickly and easily. I've contributed dozens of commits to JRuby specifically because the barrier to entry is just a lot lower than it is in MRI.

The community is really, really good, and the project is extremely hackable - it's an embodiment of the best in open source, IMO, and I'm really excited for this release in the hopes that it gets more people using it.

Re: JRuby 9000 released

#34
post #14

Damm, I so wish Jython improved like this too. I've been thinking of helping out.

jRuby is one of the biggest reasons I lean to Ruby over Python. Ruby gains a lot more from the JVM than Python (at least that's my understanding) does and that leads to much more momentum behind jRuby.

Re: JRuby 9000 released

#35
post #14

Damm, I so wish Jython improved like this too. I've been thinking of helping out.

jRuby is one of the biggest reasons I lean to Ruby over Python. Ruby gains a lot more from the JVM than Python (at least that's my understanding) does and that leads to much more momentum behind jRuby.

Like what? They both benefit from the lack of GIL (Jython maybe moreso) as well as the portability and other benefits of JVM as a platform.

Re: JRuby 9000 released

#36
post #5

is it faster than MRI?

That depends on what you mean by faster. For CPU-bound work, JRuby is almost always faster. The JVM is very good at optimizing. However, the best performance doesn't kick in until the JVM is sufficiently warmed up, which means JRuby shines mostly for long-running tasks. Warming up can take a few minutes, although some people tell me that I should warm up for half an hour (!). On the flip side, JRuby starts much more…

For things like Rails, that are going to be running all the time, does the JVM warm up time really matter?

Re: JRuby 9000 released

#37
post #32

Earlier quoted context omitted.

Define "newer" and define "poor"? The JRuby team has done a fantastic job of keeping things working. Do you have any specific problems other than vague grumblings? Anyone married to the MRI ecosystem because of dependencies on modules with no JVM equivalent may have problems, but new projects usually have no such issues.

Rails 4.2 was released 7 months ago. When I last experimented with creating a standard Rails 4.2 app with the AR JDBC adapter and a database model a few weeks ago, it still didn't work. I haven't looked at things since then. The workaround some people will suggest is "replace ActiveRecord with Sequel" but for existing projects a migration to a less standard Rails stack may not be viable. I agree the JRuby team is doi…

Yeah; but at the same time when you're building and scaling an app you run into all sorts of issues like this. JRuby is almost a platform of its own: you get the scalability and benefits of the JVM with the flexibility of Ruby. IMO it's a decision you make pretty early in the product lifecycle. If you're already on Rails, there are other solutions that give you many of the same benefits with an easier migration path (i.e. app containers like Docker).

Re: JRuby 9000 released

#38
post #27

Concurrent threads using magic regexp vars like $1 stomp all over each other, quite nasty: https://github.com/jruby/jruby/issues/3031 Stumbling over a serious race condition in the first 5 minutes of trying it with real code makes me a bit wary. All the performance in the world isn't much good if it's randomly wrong :/

Your comment has little to do with JRuby 9000, as the bug reported there was observed in JRuby 1.7.20. Yes, JRuby has bugs, like MRI, like any interpreter or compiler.

Re: JRuby 9000 released

#39
post #2

JRuby 9000 now uses native operations for much of IO and almost all of Process. This makes us the first POSIX-friendly JVM language. Did they achieved this via JNI?

This will prevent running JRuby 9000 in (today's) Google App Engine.

The project has been drifting away from App Engine support for some time now. See #2304.

https://github.com/jruby/jruby/issues/2304

Re: JRuby 9000 released

#40
post #24
post #9

JRuby is a great idea. It has one pitfall which consistently stops me from using it though : poor support with newer releases of Rails, usually due to the Active Record stack not working well with the AR JDBC adapter. I know some work was being done on a JRuby version of the standard pg gem (without the need for JDBC) which would be fantastic if it was completed and working.

As far as I'm aware, the port of pg 0.17.1 is alive and well: https://github.com/headius/jruby-pg

Is there any guidance out there about when to use activerecord-jdbc-adapter vs this gem (for postgres)?
Post reply on HN