Nick Sieger: JRuby Serial Interview 2 tag:blog.nicksieger.com,2005:Typo Typo 2010-11-22T18:35:25+00:00 Nick Sieger urn:uuid:c75b1e27-0cd7-4b6d-8efd-5d201158e83c 2007-01-11T04:03:52+00:00 2010-11-22T18:35:25+00:00 JRuby Serial Interview 2 <p><em>This is part 2 in our <a href="/articles/tag/jrubyserialinterview">ongoing conversation</a> tracking the development of JRuby&#46;</em></p> <p><strong>It&#8217;s been exciting to see all the discussion between the JRuby developers and Rubinius developers, especially in #rubinius&#46; What benefits do you see coming from this kind of cooperation?</strong></p> <p><em>Charles Nutter:</em> Evan and I have been talking since this summer, actually, when he was working on early versions of Rubinius&#46; We both have gone through many of the same growing pains dealing with Ruby&#8217;s quirkier features and evaluating interpreter/VM design options&#46; I don&#8217;t know how Evan feels about it, but I was very glad to find someone else who was interested in such things&#46;</p> <p>Now that Rubinius is in the public eye and has some real momentum, there&#8217;s more sharing going on&#46; We&#8217;ve been talking about those same design options, weighing them together and coming up with new choices we can both implement&#46; Others on the Rubinius team have forwarded the idea of reusing portions of the Rubinius source in JRuby&#46;</p> <p>It&#8217;s also become apparent that we&#8217;re trying to solve very similar problems from different directions&#46; In JRuby&#8217;s case, we already have a fully&#45;functional Ruby interpreter, functional enough to run apps as complicated as Rails&#46; Our challenge is to keep JRuby running well and evolve a working interpreter toward a more future proof, performant, and maintainable design&#46; Rubinius is really just starting out, only to the point of running a small portion of the Ruby corpus, but the design is easier to follow and simpler to evolve&#46; Their challenge is to keep the design simple while expanding compatibility and improving speed&#46; JRuby is mostly Java with some Ruby code, though we&#8217;d like to make it more Ruby code in the future&#46; Rubinius is obviously mostly Ruby code with some C, but they&#8217;re interested in being able to migrate it to other underlying languages&#46; We&#8217;re both interested in a Java&#45;based Rubinius&#46;</p> <p>I think it&#8217;s been very positive for everyone involved to have this level of cooperation, and it&#8217;s helped us all understand Ruby better&#46;</p> <p><em>Ola Bini</em>: Well, the exchange with Rubinius is obviously very valuable&#46; The more people working on implementations and sharing information, the better for all the implementations, of course&#46; I also see Rubinius as something very intriguing, and it would be very interesting to see how much we could port to JRuby&#46;</p> <p><em>Thomas Enebo:</em> I have not personally been in contact with Rubinius developers (Charles has though), but I can say more generally that many implementations will necessitate some level of cooperation&#46; As we discover differences between implementations, we need dialogue to help understand why those differences exist&#46; It is possible this dialogue will end up identifying poorly&#45;identified cross&#45;platform issues or general mis&#45;features&#46;</p> <p>At an implementation level it will yield suggestions across the fence for how to do things differently&#46; A thread in ruby&#45;core a month or so ago had some exchanges on how MRI could be optimized&#46; Charles and I chimed in about some of those ideas because we had considered and implemented some of them in JRuby&#46; I think as time goes on, this exchange of ideas will increase&#46;</p> <p><strong>The biggest news in Ruby land recently is probably the announcement of a fully merged YARV&#46; What affect does this have on JRuby?</strong></p> <p><em>Thomas Enebo:</em> This seems like great news for Ruby, but I am not sure it has much affect currently on JRuby&#46; We are still focused on 1&#46;8&#46;x support&#46; It is getting easier for us to change language semantics now and when 1&#46;9/2 starts getting closer to release I feel comfortable that we can spin a Ruby 2 branch pretty quickly&#46;</p> <p>From a personal standpoint, it is great to see Ruby hit this next milestone&#46; I think the perception of progress is pretty important and merging YARV will give Ruby 2 development a nice perceptual boost&#46; Also this will mean many more people pounding on YARV, which will help run it through its paces better&#46;</p> <p><em>Ola Bini</em>: YARV is important news&#46; Very much so&#46; But at the moment the effects will not be that noticeable&#46; Right now we&#8217;re still working hard to get 1&#46;8&#45;compatibility complete&#46; But, Charles have begun work on a YARVMachine that runs some basic scripts (including the famous iterative fib bench)&#46; I&#8217;ve started looking on this the last few days, and have some ideas&#46; My first priority will probably be to implement a reader for YARV bytecode&#46; This will make it easier to test our machine, since we can compile with YARV and then run the compiled files with JRuby&#46; Alongside with that I am going to start tinkering on a new backend to Charles current compiler, so it will emit YARV bytecode instead&#46; I&#8217;m not sure exactly when this is going to happen, though, but we try to stay on top of YARV&#46;</p> <p><em>Charles Nutter:</em> The merging of YARV (no longer &#8220;yet another&#8221; Ruby VM but instead &#8220;the&#8221; Ruby VM) is a very big event for the Ruby world&#46; Koichi has worked long and hard on it, and I&#8217;m very glad to see it&#8217;s now officially part of Ruby core&#46; I had some time to talk with Koichi and Matz about implementation challenges at RubyConf 2006, and we came to agreement on a number of items, most prominently that critical= needs to go away&#46; Again, more cross&#45;project sharing&#46;</p> <p>We&#8217;re watching the newly&#45;reset 2&#46;0 design process closely, since we know it will eventually affect JRuby&#8217;s future&#46; In the interim, however, we&#8217;re trying to solve at the 1&#46;8 level many issues YARV is designed to solve in 1&#46;9 and 2&#46;0&#46; So many of the design choices made by Koichi and Matz for 1&#46;9 play directly into how we tackle those same decisions in JRuby&#46;</p> <p>I think in general the merging of YARV shows that Ruby is moving forward and evolving on all fronts&#46;</p>