Live data from Hacker News

Projects That Are Making Fast Ruby a Reality

sitepoint.com

11–20 of 49 posts

Re: Projects That Are Making Fast Ruby a Reality

#12

OK folks, help me out here. I'm not trying to troll, this is a genuine question. In the not-so-distant-past, one of the reasons why a good number of developers/projects announced they were moving away from Ruby and using other languages/compilers was due to Ruby's slow performance—and not just that Ruby was slow, but that Ruby was slow due to the actual nature of the language. In other words, Ruby was destined to alw…

I remember this blog post about how optimizing method calls becomes much harder with refinements (from MRI Ruby 2.1):

http://blog.headius.com/2012/11/refining-ruby.html

It looks like JRuby has refinements now but maybe not great support for them (based on just some quick Googling):

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

So I'm curious if anything tested in the article has refinements support.

Personally I'm still skeptical of refinements, but I guess JRuby will have to support them or more and more gems will start to break.

Re: Projects That Are Making Fast Ruby a Reality

#13

OK folks, help me out here. I'm not trying to troll, this is a genuine question. In the not-so-distant-past, one of the reasons why a good number of developers/projects announced they were moving away from Ruby and using other languages/compilers was due to Ruby's slow performance—and not just that Ruby was slow, but that Ruby was slow due to the actual nature of the language. In other words, Ruby was destined to alw…

I think the short answer is making a dynamic language really fast is really hard. You can do it, but historically you've needed to be Sun or Google to pull it off. Sun made java fast. Google made javascript pretty fast.

So ruby either needed to piggy back on someone else's work (jvm or whatever) or get some next-level-smart vm developers. Even then, people have written about how ruby presents some serious challenges.

Re: Projects That Are Making Fast Ruby a Reality

#14
post #7
post #4

OMR is really cool, I spun up the docker image and my project ran on it out of the box. That said, JRuby has been great for us, and we're really excited about Truffle+Graal (which won't run Rails yet but seems close). Chris Seaton is super smart and a really nice guy. Apparently Truffle+Graal should be able to run R soon https://twitter.com/ChrisGSeaton/status/697515513858158592

OMR Team member here: Glad to hear you had a good experience with our tech preview! We really appreciated the feedback you provided, and would definitely be willing to take more.

You're welcome. I love the project, and I'll be watching github closely as you move towards open source. I'll try to run some gems I like that use c extensions soon.

Re: Projects That Are Making Fast Ruby a Reality

#15
post #6
post #5

Earlier quoted context omitted.

Thanks, very interesting. I didn't know about this being able to run R inside JVM. What will happen with all existing packages that have C or C++ dependencies? Perhaps it would be doable with a bridge? Having R tightly embedded in the JVM would be amazing.

In some cases they could perhaps do the same thing that's done with Ruby: interpret the C-extensions. It's not as crazy as it may seem and JRuby benefits hugely from it: http://chrisseaton.com/rubytruffle/cext/

I'm pretty sure they aim to interpret the c, but I don't want to speak for Chris.

Re: Projects That Are Making Fast Ruby a Reality

#16
Ruby+Truffle+Graal support was removed from rbenv (ruby-build, actually) on Jan. 1st.

Apparently, "the new builds are click-through licensed" and will be based off "Oracle's JDK rather than Open JDK."

I can't wait for Oracle to die.

commit: https://github.com/rbenv/ruby-build/commit/ca0e1474fcf3e2025...

pull request: https://github.com/rbenv/ruby-build/pull/864

Re: Projects That Are Making Fast Ruby a Reality

#17

OK folks, help me out here. I'm not trying to troll, this is a genuine question. In the not-so-distant-past, one of the reasons why a good number of developers/projects announced they were moving away from Ruby and using other languages/compilers was due to Ruby's slow performance—and not just that Ruby was slow, but that Ruby was slow due to the actual nature of the language. In other words, Ruby was destined to alw…

I think the short answer is making a dynamic language really fast is really hard. You can do it, but historically you've needed to be Sun or Google to pull it off. Sun made java fast. Google made javascript pretty fast. So ruby either needed to piggy back on someone else's work (jvm or whatever) or get some next-level-smart vm developers. Even then, people have written about how ruby presents some serious challenges.

Why is Java a dynamic language? Isn't Java statically typed?

Re: Projects That Are Making Fast Ruby a Reality

#18

OK folks, help me out here. I'm not trying to troll, this is a genuine question. In the not-so-distant-past, one of the reasons why a good number of developers/projects announced they were moving away from Ruby and using other languages/compilers was due to Ruby's slow performance—and not just that Ruby was slow, but that Ruby was slow due to the actual nature of the language. In other words, Ruby was destined to alw…

I think the short answer is making a dynamic language really fast is really hard. You can do it, but historically you've needed to be Sun or Google to pull it off. Sun made java fast. Google made javascript pretty fast. So ruby either needed to piggy back on someone else's work (jvm or whatever) or get some next-level-smart vm developers. Even then, people have written about how ruby presents some serious challenges.

> Sun made java fast.

Arguably one of the most prevalent Java platforms these days, Android, doesn't JIT... it compiles AoT. Java is actually a great example of languages with static type systems being easier to optimize, whereas the JVM is the new hotness for everything dynamic.

Re: Projects That Are Making Fast Ruby a Reality

#19

Earlier quoted context omitted.

I think the short answer is making a dynamic language really fast is really hard. You can do it, but historically you've needed to be Sun or Google to pull it off. Sun made java fast. Google made javascript pretty fast. So ruby either needed to piggy back on someone else's work (jvm or whatever) or get some next-level-smart vm developers. Even then, people have written about how ruby presents some serious challenges.

Why is Java a dynamic language? Isn't Java statically typed?

Static vs dynamic is actually kind of a blurry line: https://en.wikipedia.org/wiki/Strong_and_weak_typing

Re: Projects That Are Making Fast Ruby a Reality

#20

Earlier quoted context omitted.

I think the short answer is making a dynamic language really fast is really hard. You can do it, but historically you've needed to be Sun or Google to pull it off. Sun made java fast. Google made javascript pretty fast. So ruby either needed to piggy back on someone else's work (jvm or whatever) or get some next-level-smart vm developers. Even then, people have written about how ruby presents some serious challenges.

Why is Java a dynamic language? Isn't Java statically typed?

you can do metaprogramming - invent new methods or class on the run
Post reply on HN