is it faster than MRI?
The real advantage comes from the fact that JRuby isn't enslaved to a GIL like MRI, so you get JVM threads out of the box. Even with the JIT, JRuby (at least 1.7) isn't appreciably faster than MRI when running a single-threaded app: http://www.isrubyfastyet.com/
JRuby 9000 released
91–100 of 119 posts
Re: JRuby 9000 released
#92Earlier quoted context omitted.
Ah, I didn't get that from your original post. So JRuby 9000 shipped with a known concurrency bug that, from the face of it, seems likely to be a problem in actual use. I agree that seems a bit worrying.
You have to ship some time. Noisy bugs get fixed...and patches are always accepted :-)
However, not all bugs are made equal and this one seems relatively likely to actually cause problems for users. Wouldn't someone running some service and handling say 10 requests/second, while using the regex global variables, run into this bug on a daily basis?
So I guess I'm just interested in how such a decision is made: what bugs get shipped and which block a release?
If this bug would reasonably cause problems in such a situation and if the policy of JRuby is to ship anyway, that seems to be a relevant piece of information to consider for someone using JRuby in production and considering whether to upgrade.
Perhaps one should always check the list of open bugs for the version of a compiler/interpreter one intends to start using, but I've never done so, haven't been bitten by a bug yet (AFAIK) and yet this one seems one that could be a problem. The main problem is of course that this may just be 'the curse of knowledge' in play.
So I guess I was being a bit dismissive towards OP, then I was sympathetic and now I'm mostly thinking about how I should handle this as someone using JRuby in production. Perhaps I should just ignore it. Perhaps I should investigate the set of concurrency tests and contribute a few. Perhaps I should be conservative and only use 'proven' JRuby versions. Perhaps I should learn to stop worrying and love the bomb :)
Re: JRuby 9000 released
#93Re: JRuby 9000 released
#94Re: JRuby 9000 released
#95So why does JRuby never got as much traction as other jvm langs like clojure, scala, groovy? I have heard good things about the ruby syntax, top that you get unparalleled powers of jvm like gc, cross platform, libs and much more!
Also, the strong anti-Java culture in the Ruby community probably didn't help (even though JRuby has nothing to do with Java, or very little).
Re: JRuby 9000 released
#96I'm very happy to see JRuby 9000 and hope we'll upgrade soon.
Re: JRuby 9000 released
#97Earlier quoted context omitted.
The same bug still exists in JRuby 9000, and was in fact the first thing I ran into when trying it. Considering threading is the main selling point, one of the commonest patterns of regexp use being completely and dangerously broken with them would have seemed like something of a showstopper.
> one of the commonest patterns of regexp use Is it really? Even fairly early in the Ruby 1.8.x era, most recommendations I saw were that the magic regexp globals (and many other magic globals) were a perlism that should generally be avoided.
Re: JRuby 9000 released
#98Earlier quoted context omitted.
You have to ship some time. Noisy bugs get fixed...and patches are always accepted :-)
Of course is can be completely reasonable to ship with a known bug, which is why my initial reaction to the OP was: why are you bringing this up here? However, not all bugs are made equal and this one seems relatively likely to actually cause problems for users. Wouldn't someone running some service and handling say 10 requests/second, while using the regex global variables, run into this bug on a daily basis? So I g…
Re: JRuby 9000 released
#99Earlier quoted context omitted.
> one of the commonest patterns of regexp use Is it really? Even fairly early in the Ruby 1.8.x era, most recommendations I saw were that the magic regexp globals (and many other magic globals) were a perlism that should generally be avoided.
Huh, I use `$1` all the time, and see it all the time. Probably because the alternative with an explicit match object ends up being relatively a lot more code and a lot harder to read, really. If avoiding `$1` has been often recommended for a while... I think it's a recommendation more often ignored than followed.
Re: JRuby 9000 released
#100JRuby 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.
This is really an unfortunte side effect of every Rails AR adapter being a one-off piece of code. In JRuby, there's not much code different between the databases, but in Rails they're all completely different. That means we basically have to emulate N different codebases just to be compatible. If they settled on a common database layer, our job would be done. Write your congressman.