Saturday, February 17, 2007

Serial XRuby Interview: Episode I

One of the least known alternative Ruby implementations is the XRuby project. The programmers behind the project have been doing some great work, and deserve more visibility. I thought it would be fun to do a serial interview with them to help get XRuby in front of a bigger audience.

Would you please introduce yourselves and XRuby?

dreamhead: My name is Ye Zheng, but you can call me dreamhead. I became a programmer for my interest. In my career, I've experienced server application development and image recognition research. Now I'm applying myself to data parallel on multi-core platform.

I joined XRuby team in Sep. 2006. I'm the first member besides Xue Yong Zhi. At that time, I just translated some chapters of Ruby Hacking Guide from English into Chinese. I got some knowledge of Ruby implementation from RHG. Xue Yong Zhi called for contribution to XRuby. I decided to join the team, because I have Java experience and Ruby is my latest favorite programming language, but the most important is that I had a great opportunity to construct a compiler. I have the strong interest in the programming language implementation all the time.

At first, I wrote some builtin code. After studying the runtime of XRuby and C Ruby, I developed a new runtime which will be merged in XRuby 0.2.0. XRuby is a good team. Every member is kind and every attempt is encouraged.

Besides programming, I like reading. There's a lot of books in my room. I also like writing. I've written down some understanding of Ruby implementation on my blog which is in Chinese.

Yu: My name is Yu, I've already graduated, and am a software engineer in Shanghai. I joined this team in Nov. 2006. I implemented a rough "javasupport" component, some built-in types and their functions.

When I'm not programming, I like to play squash (you may call that racket ball), watch movies, and cook.

As to XRuby, it's so great a project. Xue Yong contributes most code, and Ye Zheng implements the new run time. They are all excellent developers. It's my honor to work with them together.

Xue: I am a software engineer and live and work in Maryland. I started XRuby because (at that time — almost two years ago) there was no ruby compiler available, and I feel like it is an interesting idea to write a ruby compiler for JVM/CLR.

XRuby is a ruby compiler that compiles ruby scripts to java bytecode, so that a ruby program can run directly on top of JVM. The output of the compilation is a jar file, which you can launch like a regular java application.

Actually I had a quite ambitious goal when the project started, I thought after finishing the compiler for java, I would create one for .NET, then a pure ruby implementation & that is why it is named 'X'Ruby. Right now it is definitely not happening as the compiler for java has taken all my spare time, meanwhile projects like Ruby.NET and rubinius have emerged to be the lead in these fields.

For quite a long time the code just sat on my computer and I progressed slowly due to the lack of time after busy day job. In September, 2006 I uploaded the repository to google code and posted an announcement to some maillists and online forums.

Most of the messages got little attention but one posted on a Chinese ruby forums received good response, that's how Ye Zheng, Yu Su, Jie Li found the project and joined. The extra hands give great lift, and finally we put together the first public release this year.

dreamhead: Besides Xue Yong Zhi's XRuby description, XRuby gives us a opportunity to let Java and Ruby work together. This means that we can combine development efficiency(Ruby) and abundant resources(Java).

The rubinius team has mentioned using your parser for their project. How much interaction do you have with the other non-standard Ruby implementors?

Xue:I encourage other people to use/hack/break our parser. It is in very good shape and is much easier to maintain (thank to the power of ANTLR). And I will be very happy to help if they need. Btw, The v3 version of ANTLR may have a ruby backend that generates ruby code.

I have chatted with Charles Oliver Nutter several times and he kindly updated me on Sun's effort to support dynamic language on JVM. And I was amazed by his great effort to turn Jruby from a near death project to a vital community.

dreamhead: We've contributed our front end to rubygrammer project. I hope it is helpful.

Given XRuby's ability to compile Ruby down to Java bytecodes, this episode's sponsor is Beyond Java. Please support these serial interviews by buying book now and then.

If you enjoyed this, you might also enjoy Nick Sieger's Serial JRuby Interview:

  • Episode 1, in which Charles, Thomas, and Ola talk about their plans for JRuby.
  • Episode 2, in which Charles, Thomas, and Ola talk about cooperation with the rubinius team and YARV.
  • Episode 3, in which Charles, Thomas, and Ola talk about cooperation with the rubinius team Rails and (more about) YARV.
  • Episode 4, in which Charles, Thomas, Ola, and Tor Norbye talk about JRuby and NetBeans.
  • Episode 5, in which Charles, Thomas, and Ola talk about groovy.

James Gray has also started a serial interview. He's talking with Matz and Koichi. His first episode introduces them and discusses the recent merger of the VM formerly known as YARV and Ruby 1.9.

You might also enjoy my new Serial Parrot/Cardinal Interview with Kevin Tew or the original serial interview with the rubinius team.

No comments: