<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3465041532843598205</id><updated>2024-09-13T00:59:08.916-05:00</updated><category term="xruby"/><category term="GSOC"/><title type='text'>XRuby</title><subtitle type='html'>Ruby to Java bytecode compiler</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://xruby.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default?alt=atom'/><link rel='alternate' type='text/html' href='http://xruby.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>xue.yong.zhi</name><uri>http://www.blogger.com/profile/13007279094431940132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3465041532843598205.post-2687676923678802016</id><published>2008-03-24T19:59:00.004-05:00</published><updated>2008-03-24T20:40:51.664-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GSOC"/><title type='text'>Google Summer of Code with Ruby Central</title><content type='html'>Ruby Central will once again participate the Google Summer of Code in 2008 as a mentoring organization:&lt;br /&gt;&lt;a href=&quot;http://code.google.com/soc/2008/ruby/about.html&quot;&gt;http://code.google.com/soc/2008/ruby/about.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://on-ruby.blogspot.com&quot;&gt;Pat Eyler&lt;/a&gt; has put together an &lt;a href=&quot;http://rubycentral.com/projects/gsoc-2008/ideas-for-gsoc-2008&quot;&gt; idea page&lt;/a&gt;, which is a great reference. While every organization may have different policy, Ruby Central has been happy to see students&#39; own ideas in the past, and I believe this year is not an exception. Feel free to submit your own exciting ideas so that the mentors can pick the best ones.&lt;br /&gt;&lt;br /&gt;Today is the first day for Google to accept student applications. For student who are interested in participating, my advise is to apply as early as possible: normally students who apply early has a slight advantage because mentors will have more time to read their applications. &lt;br /&gt;&lt;br /&gt;And another advise for future GSOC students is: once accepted, please make sure you are well prepared for the program. Google and mentors normally assume you to work near fulltime in the summer, but unfortunately every year we saw &#39;disappearing&#39; students during the program. If for some reasons you can not make it after being accepted, please communicate with your mentor organization early so that they can make better adjustment.</content><link rel='replies' type='application/atom+xml' href='http://xruby.blogspot.com/feeds/2687676923678802016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3465041532843598205/2687676923678802016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/2687676923678802016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/2687676923678802016'/><link rel='alternate' type='text/html' href='http://xruby.blogspot.com/2008/03/google-summer-of-code-with-ruby-central.html' title='Google Summer of Code with Ruby Central'/><author><name>xue.yong.zhi</name><uri>http://www.blogger.com/profile/13007279094431940132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3465041532843598205.post-7641455557706207970</id><published>2008-03-24T19:40:00.003-05:00</published><updated>2008-03-24T19:56:58.002-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="xruby"/><title type='text'>XRuby license changed to BSD</title><content type='html'>XRuby had been licensed under GNU General Public License v2. For people who want to create solutions based on XRuby, this means they had to adopt GPL as well, which is not always possible. So since &lt;a href=&quot;http://code.google.com/p/xruby/downloads/list&quot;&gt;0.3.3&lt;/a&gt;, we changed the license to BSD. Hopefully this will help XRuby gain more acceptance, especially from the corporate world.</content><link rel='replies' type='application/atom+xml' href='http://xruby.blogspot.com/feeds/7641455557706207970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3465041532843598205/7641455557706207970' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/7641455557706207970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/7641455557706207970'/><link rel='alternate' type='text/html' href='http://xruby.blogspot.com/2008/03/xruby-license-changed-to-bsd.html' title='XRuby license changed to BSD'/><author><name>xue.yong.zhi</name><uri>http://www.blogger.com/profile/13007279094431940132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3465041532843598205.post-2633644684714333340</id><published>2007-09-24T00:41:00.000-05:00</published><updated>2007-09-24T09:45:04.479-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="xruby"/><title type='text'>XRuby 0.3.1 released</title><content type='html'>XRuby 0.3.1 is released today and you can download the latest version here:&lt;br /&gt;&lt;a href=&quot;http://code.google.com/p/xruby/downloads/list&quot;&gt;http://code.google.com/p/xruby/downloads/list&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The major changes in this version are:&lt;br /&gt;&lt;br /&gt;1. &lt;span style=&quot;font-weight: bold;&quot;&gt;Ruby standard libraries are now pre-compiled&lt;/span&gt; and the compilation results (java bytecode) are shipped as part of the xruby.jar. This makes deployment really easy, as there is one jar file to deal with. Pre-compiled libraries means it isn&#39;t necessary to compile these code every time by the user which is helpful to performance.&lt;br /&gt;&lt;br /&gt;The size of the final jar may cause some concerns: while the number of ruby stdlib supported by the current version of XRuby is still limited, the size of the compiled stdlib has already reached 2,000 KB (the entire xruby-0.3.1.jar is over 4,000 KB). Maybe we will ship ruby stdlib in a separated jar files in the future.&lt;br /&gt;&lt;br /&gt;2. Use annotation and code generation to bind Java level method to Ruby level method. We started to make this change in 0.3.0 and finished it in 0.3.1. It helped us to get rid of lots of redundant code. For more information about this change, please read our &lt;a href=&quot;http://xruby.blogspot.com/2007/08/xruby-030-released.html&quot;&gt;last announcement&lt;/a&gt; and dreamhead&#39;s articles(&lt;a href=&quot;http://dreamhead.blogbus.com/logs/7226338.html&quot;&gt;1&lt;/a&gt;, &lt;a href=&quot;http://dreamhead.blogbus.com/logs/7502504.html&quot;&gt;2&lt;/a&gt;) on his blogs (in Chinese).&lt;br /&gt;&lt;br /&gt;Thank everyone who has contributed to this release.</content><link rel='replies' type='application/atom+xml' href='http://xruby.blogspot.com/feeds/2633644684714333340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3465041532843598205/2633644684714333340' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/2633644684714333340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/2633644684714333340'/><link rel='alternate' type='text/html' href='http://xruby.blogspot.com/2007/09/xruby-031-released.html' title='XRuby 0.3.1 released'/><author><name>zheng</name><uri>http://www.blogger.com/profile/10639281575894639395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3465041532843598205.post-3068484423108236726</id><published>2007-08-07T22:37:00.000-05:00</published><updated>2007-08-08T00:02:26.728-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="xruby"/><title type='text'>xruby 0.3.0 released</title><content type='html'>I am pleased to announce that XRuby 0.3.0 is released:&lt;br /&gt;&lt;a href=&quot;http://code.google.com/p/xruby/downloads/list&quot;&gt;http://code.google.com/p/xruby/downloads/list&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We have fixed lots of bugs and made significant improvement in the code.&lt;br /&gt;&lt;br /&gt;Changes from 0.2.1 to 0.3.0:&lt;br /&gt;1. Use annotation and code generation to bind Java level method to Ruby level method (I will talk more about this later).&lt;br /&gt;&lt;br /&gt;2. More unit tests passed. We have not eliminated all test failures in test/ruby. But as most of the failures are caused by the implementation of builtin libraries, we will be able to fixed them soon in 0.4.0.&lt;br /&gt;&lt;br /&gt;Changes from 0.2.0 to 0.2.1:&lt;br /&gt;1) Dreamhead optimized method/block calls for methods with zero/one&lt;br /&gt;arguments. It makes our performance even better.&lt;br /&gt;&lt;br /&gt;2) ZhangYu improved Java integration significantly, he also created a wiki page with lots of good examples:&lt;br /&gt;&lt;a href=&quot;http://code.google.com/p/xruby/wiki/JavaIntegration&quot;&gt;http://code.google.com/p/xruby/wiki/JavaIntegration &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3) Mechiland and I made more ruby unit tests pass.&lt;br /&gt;&lt;br /&gt;The most significant change of 0.3.0 is the using of annotation and code generation to bind Java level method to ruby level method. The idea was inspired by the discussions about Java 5 on &lt;a href=&quot;http://archive.jruby.codehaus.org/dev&quot;&gt;jruby&#39;s maillist&lt;/a&gt;, and dreamhead turned it into reality quickly.&lt;br /&gt;&lt;br /&gt;As we know, a Ruby method does a little bit more than a Java method. So if we have a method like this in Java:&lt;br /&gt;&lt;pre&gt;public class RubyString {&lt;br /&gt;   public RubyFloat to_f() {&lt;br /&gt;       ...&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;To turn it (RubyString.to_f) into a Ruby level method, we have to add a few more code to &#39;wrap&#39; into a class (extends RubyMethod) and &#39;register&#39; it (defineMethod), e.g:&lt;br /&gt;&lt;pre&gt;public class String_to_f extends RubyNoArgMethod {&lt;br /&gt;   protected RubyValue run(RubyValue receiver, RubyBlock block) {&lt;br /&gt;       return ((RubyString)receiver).to_f();&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;...&lt;br /&gt;RubyRuntime.StringClass.defineMethod(&quot;to_f&quot;, new String_to_f());&lt;br /&gt;&lt;/pre&gt;For every method, we need to write similar code and it is not fun to repeat yourself. In 0.3.0, we no longer have to do this anymore. As as long as you add annotation like this:&lt;br /&gt;&lt;pre&gt;@RubyLevelClass(name=&quot;String&quot;)&lt;br /&gt;public class RubyString {&lt;br /&gt;   @RubyLevelMethod(name=&quot;to_f&quot;)&lt;br /&gt;   public RubyFloat to_f() {&lt;br /&gt;       ...&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;XRuby will turn it into a Ruby level method automatically (using ASM to generate Java bytecode).&lt;br /&gt;&lt;br /&gt;I have not used Java 5&#39;s annotation feature before, but this looks like an very elegant solution.&lt;br /&gt;&lt;br /&gt;Thank everyone who has contributed to this release.</content><link rel='replies' type='application/atom+xml' href='http://xruby.blogspot.com/feeds/3068484423108236726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3465041532843598205/3068484423108236726' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/3068484423108236726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/3068484423108236726'/><link rel='alternate' type='text/html' href='http://xruby.blogspot.com/2007/08/xruby-030-released.html' title='xruby 0.3.0 released'/><author><name>xue.yong.zhi</name><uri>http://www.blogger.com/profile/13007279094431940132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3465041532843598205.post-3260764849108752043</id><published>2007-06-12T09:48:00.000-05:00</published><updated>2007-06-12T10:14:40.303-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="xruby"/><title type='text'>ruby -y</title><content type='html'>For people who are interested in how ruby&#39;s yacc parser works, there is an undocumented command line option(&quot;-y&quot;) that may be helpful. It will display a trace of the parser&#39;s operations. &lt;br /&gt;&lt;br /&gt;To use it, you need to clear your RUBYOPT environment variable to NOT use &quot;rubygems&quot; (this will break some ruby applications), otherwise it will make too much noise.&lt;br /&gt;&lt;br /&gt;Here is an example:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ruby -y -e &quot;a=1&quot;&lt;br /&gt;Starting parse&lt;br /&gt;Entering state 0&lt;br /&gt;Reducing stack by rule 1 (line 328), -&gt; @1&lt;br /&gt;Stack now 0&lt;br /&gt;Entering state 2&lt;br /&gt;Reading a token: Next token is token tIDENTIFIER ()&lt;br /&gt;Shifting token tIDENTIFIER, Entering state 34&lt;br /&gt;Reading a token: Next token is token &#39;=&#39; ()&lt;br /&gt;Reducing stack by rule 418 (line 2146), tIDENTIFIER -&gt; variable&lt;br /&gt;Stack now 0 2&lt;br /&gt;Entering state 90&lt;br /&gt;Next token is token &#39;=&#39; ()&lt;br /&gt;Reducing stack by rule 83 (line 827), variable -&gt; lhs&lt;br /&gt;Stack now 0 2&lt;br /&gt;Entering state 73&lt;br /&gt;Next token is token &#39;=&#39; ()&lt;br /&gt;Shifting token &#39;=&#39;, Entering state 315&lt;br /&gt;Reading a token: Next token is token tINTEGER ()&lt;br /&gt;Shifting token tINTEGER, Entering state 40&lt;br /&gt;Reducing stack by rule 414 (line 2134), tINTEGER -&gt; numeric&lt;br /&gt;Stack now 0 2 73 315&lt;br /&gt;Entering state 89&lt;br /&gt;Reducing stack by rule 376 (line 1899), numeric -&gt; literal&lt;br /&gt;Stack now 0 2 73 315&lt;br /&gt;Entering state 79&lt;br /&gt;Reducing stack by rule 267 (line 1421), literal -&gt; primary&lt;br /&gt;Stack now 0 2 73 315&lt;br /&gt;Entering state 75&lt;br /&gt;Reading a token: Next token is token &#39;\n&#39; ()&lt;br /&gt;Reducing stack by rule 217 (line 1199), primary -&gt; arg&lt;br /&gt;Stack now 0 2 73 315&lt;br /&gt;Entering state 488&lt;br /&gt;Next token is token &#39;\n&#39; ()&lt;br /&gt;Reducing stack by rule 173 (line 953), lhs &#39;=&#39; arg -&gt; arg&lt;br /&gt;Stack now 0 2&lt;br /&gt;Entering state 74&lt;br /&gt;Next token is token &#39;\n&#39; ()&lt;br /&gt;Reducing stack by rule 40 (line 616), arg -&gt; expr&lt;br /&gt;Stack now 0 2&lt;br /&gt;Entering state 64&lt;br /&gt;Next token is token &#39;\n&#39; ()&lt;br /&gt;Reducing stack by rule 34 (line 596), expr -&gt; stmt&lt;br /&gt;Stack now 0 2&lt;br /&gt;Entering state 63&lt;br /&gt;Next token is token &#39;\n&#39; ()&lt;br /&gt;Reducing stack by rule 6 (line 381), stmt -&gt; stmts&lt;br /&gt;Stack now 0 2&lt;br /&gt;Entering state 62&lt;br /&gt;Next token is token &#39;\n&#39; ()&lt;br /&gt;Shifting token &#39;\n&#39;, Entering state 216&lt;br /&gt;Reducing stack by rule 496 (line 2429), &#39;\n&#39; -&gt; term&lt;br /&gt;Stack now 0 2 62&lt;br /&gt;Entering state 220&lt;br /&gt;Reducing stack by rule 497 (line 2432), term -&gt; terms&lt;br /&gt;Stack now 0 2 62&lt;br /&gt;Entering state 300&lt;br /&gt;Reading a token: Now at end of input.&lt;br /&gt;Reducing stack by rule 489 (line 2416), terms -&gt; opt_terms&lt;br /&gt;Stack now 0 2 62&lt;br /&gt;Entering state 299&lt;br /&gt;Reducing stack by rule 4 (line 373), stmts opt_terms -&gt; compstmt&lt;br /&gt;Stack now 0 2&lt;br /&gt;Entering state 61&lt;br /&gt;Reducing stack by rule 2 (line 328), @1 compstmt -&gt; program&lt;br /&gt;Stack now 0&lt;br /&gt;Entering state 1&lt;br /&gt;Now at end of input.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;XRuby&#39;s ANTLR parser does not have this option. But as ANRLE produces human readable code, you can just read the generated code or step through it in a debugger to learn how it works.</content><link rel='replies' type='application/atom+xml' href='http://xruby.blogspot.com/feeds/3260764849108752043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3465041532843598205/3260764849108752043' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/3260764849108752043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/3260764849108752043'/><link rel='alternate' type='text/html' href='http://xruby.blogspot.com/2007/06/ruby-y.html' title='ruby -y'/><author><name>xue.yong.zhi</name><uri>http://www.blogger.com/profile/13007279094431940132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3465041532843598205.post-814845163194211011</id><published>2007-05-15T10:10:00.000-05:00</published><updated>2007-05-15T10:15:50.550-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="xruby"/><title type='text'>XRuby 0.2.0 released</title><content type='html'>I am glad to announce that XRuby 0.2.0 is now available for download at: &lt;br /&gt;&lt;a href=&quot;http://code.google.com/p/xruby/downloads/list&quot;&gt;http://code.google.com/p/xruby/downloads/list&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is a summary of major changes in this release:&lt;br /&gt;&lt;br /&gt;1. Beanworms started to work on the debugging support and we now have a basic debugger in trunk.&lt;br /&gt;2. Zhang Yu and Haofei Wang added/fixed lots of builtin methods&lt;br /&gt;3. Dreamhead rewrote RubySymbol as the old one was plain wrong&lt;br /&gt;4. As test::unit works on XRuby, we imported unit tests from c ruby (test\ruby) to test our implementation. The result was not very impressive so far, less than half of the tests passed. We are planning to make all tests pass in the coming weeks.&lt;br /&gt;5. Meanwhile, Femto is leading our efforts to create an ANTLR v3 based ruby parser in another branch. Upgrading our parser from ANTLR v2 to v3 is indeed challenging, but he has make very impressive progress.&lt;br /&gt;&lt;br /&gt;Thank you everybody who contributed to this release!</content><link rel='replies' type='application/atom+xml' href='http://xruby.blogspot.com/feeds/814845163194211011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3465041532843598205/814845163194211011' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/814845163194211011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/814845163194211011'/><link rel='alternate' type='text/html' href='http://xruby.blogspot.com/2007/05/xruby-020-released.html' title='XRuby 0.2.0 released'/><author><name>xue.yong.zhi</name><uri>http://www.blogger.com/profile/13007279094431940132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3465041532843598205.post-2945982417064006641</id><published>2007-04-17T06:14:00.001-05:00</published><updated>2007-04-27T06:27:26.018-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="xruby"/><title type='text'>InfoQ article on XRuby</title><content type='html'>Werner Schuster from InfoQ has a very nice article about XRuby, you can &lt;a href=&quot;http://www.infoq.com/news/2007/04/xruby-another-ruby-on-jvm&quot;&gt;read it here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;UPDATE 04/27/2007: InfoQ China had an interview with our core developer Dreamhead. You can read it &lt;a href=&quot;http://www.infoq.com/cn/news/2007/04/interview-xruby-developer&quot;&gt;here (in Chinese)&lt;/a&gt;. And congratulations to Dreamhead for joining Thoughtworks.</content><link rel='replies' type='application/atom+xml' href='http://xruby.blogspot.com/feeds/2945982417064006641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3465041532843598205/2945982417064006641' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/2945982417064006641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/2945982417064006641'/><link rel='alternate' type='text/html' href='http://xruby.blogspot.com/2007/04/infoq-article-on-xruby.html' title='InfoQ article on XRuby'/><author><name>xue.yong.zhi</name><uri>http://www.blogger.com/profile/13007279094431940132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3465041532843598205.post-1464778851164827806</id><published>2007-04-10T10:18:00.000-05:00</published><updated>2007-04-10T19:31:10.805-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="xruby"/><title type='text'>XRuby 0.1.4 released</title><content type='html'>I am glad to announce that XRuby 0.1.4 is now available for download at: &lt;a href=&quot;http://code.google.com/p/xruby/downloads/list&quot;&gt;http://code.google.com/p/xruby/downloads/list&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The most significant change in this release is: one of our team member, dreamhead, single-handly created a new runtime (the core of the system that manages ruby types, methods...) to make it very close to the classic C ruby, and therefore fixed several compatibility issues with C ruby. As a translator of the Chinese version Ruby Hacking Guide, dreamhead has very good knowledge of the ruby internal and gives a great lift on the XRuby&#39;s development.&lt;br /&gt;&lt;br /&gt;As we have learned rewriting is very difficult, we learned it again in a hard way. Dreamhead wrote most of code last year, several months before 0.1.0 release. First we tried to make a wholesale replacement of the runtime, but problems were here and there and lots of unit tests broke. Since we do not want to have a broken system in the SVN trunk, we decided to take &#39;refactoring&#39; approach and merge changes step by step. It is still very hard, but dreamhead made lots of efforts and finished the merge yesterday.&lt;br /&gt;&lt;br /&gt;Actually it may take less time if we insist on following the &#39;rewrite&#39; approach (replace all the old code and fix broken tests), but the benefit of &#39;refactoring&#39; is significant: it gives us a stable code base so that we made several releases during this big change.&lt;br /&gt;&lt;br /&gt;There are more exciting news behind the scene now: Beanworms is working on the debugger support, and Femto and Yuesefa have showed interest to migrate our ruby parser to ANTLR 3.0.&lt;br /&gt;&lt;br /&gt;Thank you for people who helps us on making this release. It has been a great learning experience working with the project.</content><link rel='replies' type='application/atom+xml' href='http://xruby.blogspot.com/feeds/1464778851164827806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3465041532843598205/1464778851164827806' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/1464778851164827806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/1464778851164827806'/><link rel='alternate' type='text/html' href='http://xruby.blogspot.com/2007/04/xruby-014-released.html' title='XRuby 0.1.4 released'/><author><name>xue.yong.zhi</name><uri>http://www.blogger.com/profile/13007279094431940132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3465041532843598205.post-964995537222117230</id><published>2007-03-11T21:50:00.000-05:00</published><updated>2007-03-12T07:50:18.697-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="xruby"/><title type='text'>Ruby builtin in pure Ruby</title><content type='html'>&lt;i&gt;[Update 03/12/2007 If you know how to implement Interge#times in pure ruby and make it have the same behavior as Ruby 1.8.5, please let me know. Thank you!]&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;One of the best things I love about rubinius project is: their developers try to keep the dependency on system language (C in their case) minimal, and they take it seriously. Take a look of &lt;a href=&quot;http://code.fallingsnow.net/svn/rubinius/trunk/kernel/core/&quot;&gt;http://code.fallingsnow.net/svn/rubinius/trunk/kernel/core/&lt;/a&gt;, you will find out lots of buitlin libraries are implemented in pure ruby, even lots of string functions.&lt;br /&gt;&lt;br /&gt;Pure ruby builtin has some drawbacks, though. One is performance penalty, the other is potential side effects. For example, basically &lt;b&gt;Integer#times&lt;/b&gt; can be implemented as simple as this in pure ruby:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class Integer&lt;br /&gt; def times  &lt;br /&gt;  i = 0  &lt;br /&gt;  while i &lt; self&lt;br /&gt;   yield i&lt;br /&gt;   i += 1;  &lt;br /&gt;  end &lt;br /&gt;  self&lt;br /&gt; end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;But this version of Integer#times does not work exactly the same as Ruby 1.8.5. If an user want to override Fixnum#+ (this may never happen in real life):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class Fixnum&lt;br /&gt;  def + x&lt;br /&gt;    return 9999&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Our Integer#times&#39;s behavior will change, while Ruby 1.8.5 won&#39;t. That is because Ruby 1.8.5&#39;s implementation (int_dotimes() in Numeric.c) optimizes for Fixnum: it does not  call &#39;+&#39; method dynamically for Fixnum, instead, it just increases the integer directly.  If you want to implement this method as same as Ruby 1.8.5 then you have to write code in system language.&lt;br /&gt;&lt;br /&gt;This kind of optimization is all over the place in c ruby. I am not clear about its motivation, but I guess performance is one of the reasons. For example, &quot;&lt;b&gt;30000000.times {|x|}&lt;/b&gt;&quot; is about twice faster than &quot;&lt;b&gt;i = 0; while i &lt; 30000000; i +=1; end&lt;/b&gt;&quot; in Ruby 1.8.5.&lt;br /&gt;&lt;br /&gt;Difference people may have different opinions on what the &#39;right&#39; behavior should be. As for me, I like the behavior of the pure ruby implementation better.</content><link rel='replies' type='application/atom+xml' href='http://xruby.blogspot.com/feeds/964995537222117230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3465041532843598205/964995537222117230' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/964995537222117230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/964995537222117230'/><link rel='alternate' type='text/html' href='http://xruby.blogspot.com/2007/03/ruby-builtin-in-pure-ruby.html' title='Ruby builtin in pure Ruby'/><author><name>xue.yong.zhi</name><uri>http://www.blogger.com/profile/13007279094431940132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3465041532843598205.post-3382177361817778139</id><published>2007-03-06T18:49:00.000-05:00</published><updated>2007-03-11T22:02:19.732-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="xruby"/><title type='text'>XRuby is faster than Ruby 1.8.5 in most benchmarks</title><content type='html'>Two weeks ago, Antonio Cangiano compared the &lt;a href=&quot;http://www.antoniocangiano.com/articles/2007/02/19/ruby-implementations-shootout-ruby-vs-yarv-vs-jruby-vs-gardens-point-ruby-net-vs-rubinius-vs-cardinal&quot;&gt;performance of different ruby implementations&lt;/a&gt; using Ruby 1.9 (YARV)&#39;s benchmark suite. His numbers got me thinking: all alternative implementations performed badly -- most are even way slower than ruby 1.8.5. Does it signal that JVM and .NET are bad platform for Ruby language? &lt;br /&gt;&lt;br /&gt;With this doubt I tried the benchmark with XRuby. XRuby is a ruby compiler. Unlike other implementations, it generates Java bytecode that run directly on JVM. But at first the numbers are not impressive: the 0.1.2 version is still slower than Ruby 1.8.5 in most of the cases.&lt;br /&gt;&lt;br /&gt;Maybe I should mention that the XRuby team had done virtually nothing for performance before, and we would avoid optimization as long as possible if it makes our code complicated. But after doing some measurements, it turns out our bad performance are largely caused by a logic &#39;error&#39;: as we know Ruby Fixnum can not have singleton methods, but in 0.1.2 it still lookup an empty method table. And along with some bad code practices (iterating an empty ArrayList without checking if it is empty first etc), it makes method lookup much slower than it should be. &lt;br /&gt;&lt;br /&gt;I fixed the problem by adding about 10 lines of code, and got great result: &lt;b&gt;In most benchmarks, XRuby 0.1.3 is faster than Ruby 1.8.5. For some, faster in a significant way&lt;/b&gt;. There are still some tests in which we are slower, but it looks like caused by poorly implemented builtin.&lt;br /&gt;&lt;br /&gt;The following table shows the benchmark result for XRuby 0.1.3. The best part is: &lt;b&gt;we did it without a method cache&lt;/b&gt;. YARV is still faster than XRuby, but we have lots of room to improve too.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&gt;java -Xmx512m -jar xruby-0.1.3.jar benchmark\run.rb&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;Test&lt;/td&gt;&lt;td&gt;Ruby 1.8.5&lt;/td&gt;&lt;td&gt;XRuby 0.1.3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_answer.rb&lt;/td&gt;&lt;td&gt;fail&lt;/td&gt;&lt;td&gt;fail&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_factorial.rb&lt;/td&gt;&lt;td&gt;fail&lt;/td&gt;&lt;td&gt;fail&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_fib.rb&lt;/td&gt;&lt;td&gt;20.02&lt;/td&gt;&lt;td BGCOLOR=green&gt;12.29&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_mandelbrot.rb&lt;/td&gt;&lt;td BGCOLOR=green&gt;7.099&lt;/td&gt;&lt;td&gt;8.252&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_pentomino.rb&lt;/td&gt;&lt;td BGCOLOR=green&gt;289.8&lt;/td&gt;&lt;td&gt;538.5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_raise.rb&lt;/td&gt;&lt;td&gt;4.846&lt;/td&gt;&lt;td BGCOLOR=green&gt;3.986&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_strconcat.rb&lt;/td&gt;&lt;td&gt;5.898&lt;/td&gt;&lt;td BGCOLOR=green&gt;3.234&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_tak.rb&lt;/td&gt;&lt;td&gt;26.14&lt;/td&gt;&lt;td BGCOLOR=green&gt;22.12&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_tarai.rb&lt;/td&gt;&lt;td&gt;20.89&lt;/td&gt;&lt;td BGCOLOR=green&gt;18.35&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_loop_times.rb&lt;/td&gt;&lt;td BGCOLOR=green&gt;14.28&lt;/td&gt;&lt;td&gt;19.30&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_loop_whileloop.rb&lt;/td&gt;&lt;td&gt;26.03&lt;/td&gt;&lt;td BGCOLOR=green&gt;19.27&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_loop_whileloop2.rb&lt;/td&gt;&lt;td&gt;5.257&lt;/td&gt;&lt;td BGCOLOR=green&gt;4.786&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_ackermann.rb&lt;/td&gt;&lt;td&gt;fail&lt;/td&gt;&lt;td&gt;fail&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_array.rb&lt;/td&gt;&lt;td BGCOLOR=green&gt;19.17&lt;/td&gt;&lt;td&gt;46.84&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_concatenate.rb&lt;/td&gt;&lt;td BGCOLOR=green&gt;5.727&lt;/td&gt;&lt;td&gt;9.684&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_count_words.rb&lt;/td&gt;&lt;td BGCOLOR=green&gt;2.944&lt;/td&gt;&lt;td&gt;45.50&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_exception.rb&lt;/td&gt;&lt;td&gt;9.793&lt;/td&gt;&lt;td BGCOLOR=green&gt;7.399&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_lists.rb&lt;/td&gt;&lt;td BGCOLOR=green&gt;3.666&lt;/td&gt;&lt;td&gt;24.59&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_matrix.rb&lt;/td&gt;&lt;td BGCOLOR=green&gt;6.249&lt;/td&gt;&lt;td&gt;8.452&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_nested_loop.rb&lt;/td&gt;&lt;td&gt;15.17&lt;/td&gt;&lt;td BGCOLOR=green&gt;13.45&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_object.rb&lt;/td&gt;&lt;td&gt;21.49&lt;/td&gt;&lt;td BGCOLOR=green&gt;7.991&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_random.rb&lt;/td&gt;&lt;td&gt;6.169&lt;/td&gt;&lt;td BGCOLOR=green&gt;5.888&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_sieve.rb&lt;/td&gt;&lt;td BGCOLOR=green&gt;2.042&lt;/td&gt;&lt;td&gt;2.753&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm1_block.rb&lt;/td&gt;&lt;td&gt;64.57&lt;/td&gt;&lt;td BGCOLOR=green&gt;38.69&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm1_const.rb&lt;/td&gt;&lt;td&gt;47.47&lt;/td&gt;&lt;td BGCOLOR=green&gt;25.57&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm1_ensure.rb&lt;/td&gt;&lt;td&gt;45.54&lt;/td&gt;&lt;td BGCOLOR=green&gt;20.01&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm1_length.rb&lt;/td&gt;&lt;td&gt;55.50&lt;/td&gt;&lt;td BGCOLOR=green&gt;40.89&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm1_rescue.rb&lt;/td&gt;&lt;td&gt;39.61&lt;/td&gt;&lt;td BGCOLOR=green&gt;20.64&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm1_simplereturn.rb&lt;/td&gt;&lt;td&gt;56.02&lt;/td&gt;&lt;td BGCOLOR=green&gt;29.06&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm1_swap.rb&lt;/td&gt;&lt;td&gt;76.35&lt;/td&gt;&lt;td BGCOLOR=green&gt;30.52&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_array.rb&lt;/td&gt;&lt;td&gt;19.34&lt;/td&gt;&lt;td BGCOLOR=green&gt;8.532&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_method.rb&lt;/td&gt;&lt;td&gt;33.72&lt;/td&gt;&lt;td BGCOLOR=green&gt;19.63&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_poly_method.rb&lt;/td&gt;&lt;td&gt;45.23&lt;/td&gt;&lt;td BGCOLOR=green&gt;20.62&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_poly_method_ov.rb&lt;/td&gt;&lt;td&gt;12.64&lt;/td&gt;&lt;td BGCOLOR=green&gt;8.261&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_proc.rb&lt;/td&gt;&lt;td&gt;21.08&lt;/td&gt;&lt;td BGCOLOR=green&gt;17.86&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_regexp.rb&lt;/td&gt;&lt;td BGCOLOR=green&gt;13.09&lt;/td&gt;&lt;td&gt;30.87&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_send.rb&lt;/td&gt;&lt;td BGCOLOR=green&gt;11.71&lt;/td&gt;&lt;td&gt;15.75&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_super.rb&lt;/td&gt;&lt;td&gt;13.92&lt;/td&gt;&lt;td BGCOLOR=green&gt;7.510&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_unif1.rb&lt;/td&gt;&lt;td&gt;11.30&lt;/td&gt;&lt;td BGCOLOR=green&gt;8.292&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_zsuper.rb&lt;/td&gt;&lt;td&gt;15.71&lt;/td&gt;&lt;td BGCOLOR=green&gt;7.740&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm3_thread_create_join.rb&lt;/td&gt;&lt;td BGCOLOR=green&gt;0.110&lt;/td&gt;&lt;td&gt;1.331&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;* The test environment is Intel Pentium M 1G CPU, 1G Memory, Windows XP SP2, Java 1.5.0_09.</content><link rel='replies' type='application/atom+xml' href='http://xruby.blogspot.com/feeds/3382177361817778139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3465041532843598205/3382177361817778139' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/3382177361817778139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/3382177361817778139'/><link rel='alternate' type='text/html' href='http://xruby.blogspot.com/2007/03/xruby-runs-most-benchmark-faster-than.html' title='XRuby is faster than Ruby 1.8.5 in most benchmarks'/><author><name>xue.yong.zhi</name><uri>http://www.blogger.com/profile/13007279094431940132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3465041532843598205.post-3668581736744779213</id><published>2007-02-28T20:24:00.000-05:00</published><updated>2007-03-02T00:58:57.750-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="xruby"/><title type='text'>XRuby 0.1.2 released</title><content type='html'>XRuby 0.1.2 is now available for download from the project download page: &lt;a href=&quot;http://code.google.com/p/xruby/downloads/list&quot;&gt;http://code.google.com/p/xruby/downloads/list&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This latest release contains more built-in libraries and a few bug fixes for the compiler. We expect to release a new stable version every month.&lt;br /&gt;&lt;br /&gt;Last week, Antonio Cangiano did a very interesting job to&lt;a href=&quot;http://www.antoniocangiano.com/articles/2007/02/19/ruby-implementations-shootout-ruby-vs-yarv-vs-jruby-vs-gardens-point-ruby-net-vs-rubinius-vs-cardinal&quot;&gt; compare the performance of different ruby implementations&lt;/a&gt; using YARV&#39;s benchmark suite. XRuby is not included in his test as Antonio may not know our project exists. For people who are interested, here is the XRuby&#39;s performance data (due to my limited resource, only ruby 1.8.5 interpreter was compared):&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&gt;java -Xmx512m -jar xruby-0.1.2.jar benchmark\run.rb&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;Test&lt;/td&gt;&lt;td&gt;Ruby 1.8.5&lt;/td&gt;&lt;td&gt;XRuby 0.1.2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_answer.rb&lt;/td&gt;&lt;td&gt;fail&lt;/td&gt;&lt;td&gt;fail&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_factorial.rb&lt;/td&gt;&lt;td&gt;fail&lt;/td&gt;&lt;td&gt;fail&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_fib.rb&lt;/td&gt;&lt;td&gt;20.42&lt;/td&gt;&lt;td&gt;33.84&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_mandelbrot.rb&lt;/td&gt;&lt;td&gt;7.270&lt;/td&gt;&lt;td&gt;15.33&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_pentomino.rb&lt;/td&gt;&lt;td&gt;294.2&lt;/td&gt;&lt;td&gt;956.9&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_raise.rb&lt;/td&gt;&lt;td&gt;4.906&lt;/td&gt;&lt;td&gt;4.597&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_strconcat.rb&lt;/td&gt;&lt;td&gt;5.917&lt;/td&gt;&lt;td&gt;5.858&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_tak.rb&lt;/td&gt;&lt;td&gt;26.46&lt;/td&gt;&lt;td&gt;38.95&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_app_tarai.rb&lt;/td&gt;&lt;td&gt;21.08&lt;/td&gt;&lt;td&gt;35.51&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_loop_times.rb&lt;/td&gt;&lt;td&gt;14.83&lt;/td&gt;&lt;td&gt;93.55&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_loop_whileloop.rb&lt;/td&gt;&lt;td&gt;26.26&lt;/td&gt;&lt;td&gt;76.5&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_loop_whileloop2.rb&lt;/td&gt;&lt;td&gt;5.327&lt;/td&gt;&lt;td&gt;16.15&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_ackermann.rb&lt;/td&gt;&lt;td&gt;fail&lt;/td&gt;&lt;td&gt;fail&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_array.rb&lt;/td&gt;&lt;td&gt;19.35&lt;/td&gt;&lt;td&gt;300.2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_concatenate.rb&lt;/td&gt;&lt;td&gt;5.868&lt;/td&gt;&lt;td&gt;26.58&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_count_words.rb&lt;/td&gt;&lt;td&gt;2.253&lt;/td&gt;&lt;td&gt;46.43&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_exception.rb&lt;/td&gt;&lt;td&gt;9.893&lt;/td&gt;&lt;td&gt;9.973&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_lists.rb&lt;/td&gt;&lt;td&gt;3.696&lt;/td&gt;&lt;td&gt;41.04&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_matrix.rb&lt;/td&gt;&lt;td&gt;6.328&lt;/td&gt;&lt;td&gt;21.29&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_nested_loop.rb&lt;/td&gt;&lt;td&gt;15.38&lt;/td&gt;&lt;td&gt;68.20&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_object.rb&lt;/td&gt;&lt;td&gt;21.97&lt;/td&gt;&lt;td&gt;20.77&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_random.rb&lt;/td&gt;&lt;td&gt;6.269&lt;/td&gt;&lt;td&gt;15.69&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_so_sieve.rb&lt;/td&gt;&lt;td&gt;1.992&lt;/td&gt;&lt;td&gt;5.476&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm1_block.rb&lt;/td&gt;&lt;td&gt;65.67&lt;/td&gt;&lt;td&gt;98.91&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm1_const.rb&lt;/td&gt;&lt;td&gt;48.05&lt;/td&gt;&lt;td&gt;82.31&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm1_ensure.rb&lt;/td&gt;&lt;td&gt;46.19&lt;/td&gt;&lt;td&gt;75.38&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm1_length.rb&lt;/td&gt;&lt;td&gt;55.62&lt;/td&gt;&lt;td&gt;105.6&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm1_rescue.rb&lt;/td&gt;&lt;td&gt;36.47&lt;/td&gt;&lt;td&gt;80.91&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm1_simplereturn.rb&lt;/td&gt;&lt;td&gt;57.12&lt;/td&gt;&lt;td&gt;88.16&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm1_swap.rb&lt;/td&gt;&lt;td&gt;76.21&lt;/td&gt;&lt;td&gt;85.73&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_array.rb&lt;/td&gt;&lt;td&gt;18.64&lt;/td&gt;&lt;td&gt;19.65&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_method.rb&lt;/td&gt;&lt;td&gt;33.41&lt;/td&gt;&lt;td&gt;35.32&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_poly_method.rb&lt;/td&gt;&lt;td&gt;45.42&lt;/td&gt;&lt;td&gt;47.78&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_poly_method_ov.rb&lt;/td&gt;&lt;td&gt;12.81&lt;/td&gt;&lt;td&gt;25.98&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_proc.rb&lt;/td&gt;&lt;td&gt;21.54&lt;/td&gt;&lt;td&gt;31.23&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_regexp.rb&lt;/td&gt;&lt;td&gt;13.40&lt;/td&gt;&lt;td&gt;52.35&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_send.rb&lt;/td&gt;&lt;td&gt;11.87&lt;/td&gt;&lt;td&gt;31.60&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_super.rb&lt;/td&gt;&lt;td&gt;13.98&lt;/td&gt;&lt;td&gt;20.25&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_unif1.rb&lt;/td&gt;&lt;td&gt;11.46&lt;/td&gt;&lt;td&gt;19.95&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm2_zsuper.rb&lt;/td&gt;&lt;td&gt;15.84&lt;/td&gt;&lt;td&gt;21.92&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;bm_vm3_thread_create_join.rb&lt;/td&gt;&lt;td&gt;0.120&lt;/td&gt;&lt;td&gt;1.402&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;The test environment is Intel Pentium M 1G CPU, 1G Memory, Windows XP SP2, Java 1.5.0_09. It may be worth to mention we have done almost nothing for optimization, not even a simple method cache. I think it is quite possible for a JVM based ruby compiler to beat the classic Ruby interpreter on performance, while YARV&#39;s number is going to be very hard for us to reach.</content><link rel='replies' type='application/atom+xml' href='http://xruby.blogspot.com/feeds/3668581736744779213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3465041532843598205/3668581736744779213' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/3668581736744779213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/3668581736744779213'/><link rel='alternate' type='text/html' href='http://xruby.blogspot.com/2007/02/xruby-012-released.html' title='XRuby 0.1.2 released'/><author><name>xue.yong.zhi</name><uri>http://www.blogger.com/profile/13007279094431940132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3465041532843598205.post-3201949237348003811</id><published>2007-02-18T22:00:00.000-05:00</published><updated>2007-02-18T22:33:20.335-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="xruby"/><title type='text'>On-Ruby interview</title><content type='html'>&lt;br/&gt;Pat Eyler recently interviewed XRuby team, the first episode is  now posted on his popular On-Ruby blog: &lt;a href=&quot;http://on-ruby.blogspot.com/2007/02/serial-xruby-interview-episode-i.html&quot;&gt;http://on-ruby.blogspot.com/2007/02/serial-xruby-interview-episode-i.html&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://xruby.blogspot.com/feeds/3201949237348003811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3465041532843598205/3201949237348003811' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/3201949237348003811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/3201949237348003811'/><link rel='alternate' type='text/html' href='http://xruby.blogspot.com/2007/02/on-ruby-interview.html' title='On-Ruby interview'/><author><name>xue.yong.zhi</name><uri>http://www.blogger.com/profile/13007279094431940132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3465041532843598205.post-4248276477594093840</id><published>2007-01-29T13:11:00.000-05:00</published><updated>2007-01-29T17:32:24.696-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="xruby"/><title type='text'>XRuby 0.1.0 released</title><content type='html'>&lt;br/&gt;[Link of this article: &lt;a href=&quot;http://xruby.blogspot.com/2007/01/xruby-010-released.html&quot;&gt;http://xruby.blogspot.com/2007/01/xruby-010-released.html&lt;/a&gt;]&lt;br/&gt;&lt;br/&gt;Today I am glad to announce the release XRuby 0.1.0 , a ruby compiler which compiles ruby script (.rb) to java bytecode (.class).  You can download it from here: &lt;a href=&quot;http://code.google.com/p/xruby/downloads/list&quot;&gt;http://code.google.com/p/xruby/downloads/list&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;XRuby 0.1.0 is the first release of XRuby. It is able to pass all tests in samples/test.rb - a decent test suite that comes with ruby installation.&lt;br/&gt;&lt;br/&gt;As a compiler, XRuby compiles ruby source code so that your program can run on top of Java Virtual Machine.  For example, if you have a ruby script like this:&lt;br/&gt;&lt;br/&gt;&lt;i&gt;class MyClass&lt;br/&gt;   def say_hello_three_times&lt;br/&gt;      3.times {puts &quot;hello&quot;}&lt;br/&gt;   end&lt;br/&gt;end&lt;br/&gt;&lt;br/&gt;MyClass.new.say_hello_three_times&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;You can compile it with XRuby (assuming its name is test.rb):&lt;br/&gt;&lt;br/&gt;&lt;i&gt;&gt;java -jar xruby-0.1.0.jar -c test.rb&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;The compiler will generate a test.jar. It can be launched as a regular java application, with the following command: &lt;br/&gt;&lt;br/&gt;&lt;i&gt;&gt;java -jar test.jar&lt;br/&gt;hello&lt;br/&gt;hello&lt;br/&gt;hello&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;For your convenience, you can also run the script directly (without -c option), just like the classic ruby interpreter. Under the hood it compiles the script then run the bytecode:&lt;br/&gt;&lt;br/&gt;&lt;i&gt;&gt;java -jar xruby-0.1.0.jar test.rb&lt;br/&gt;hello&lt;br/&gt;hello&lt;br/&gt;hello&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;While little known, this project has been under active development for one year and eight months. I started the project around mid 2005, and it took me about eight months to write a ruby parser with Antlr, and then one year to implement the compiler and runtime. Some people joined me during the second half of 2006 and made great contribution. It is just the beginning of an exciting journey.&lt;br/&gt;&lt;br/&gt;We still have a long way to go before claiming XRuby is a very competent alternative implementation of ruby. And comparing with our peers we lag behind in implementing ruby&#39;s built-in libraries and do not have Ruby-Java bridge. Our next focus is to improve this situation and make major ruby libraries and framework work under XRuby. And we hope by end of 2007 you can use XRuby to compile your Ruby On Rails application to a .war file and run it directly on a J2EE server. &lt;br/&gt;&lt;br/&gt;We appreciate your feedback. Our development maillist is at: &lt;a href=&quot;http://groups.google.com/group/xruby-devel&quot;&gt;http://groups.google.com/group/xruby-devel&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;I also setup a new blog to be used as XRuby&#39;s team blog: &lt;a href=&quot;http://xruby.blogspot.com/&quot;&gt;http://xruby.blogspot.com&lt;/a&gt; . While  new articles will be cross posted for quite a while, I encourage you to subscribe &lt;a href=&quot;http://feeds.feedburner.com/xruby&quot;&gt;http://feeds.feedburner.com/xruby &lt;/a&gt;if have not done so.&lt;br/&gt;&lt;br/&gt;Thank you and have fun.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</content><link rel='replies' type='application/atom+xml' href='http://xruby.blogspot.com/feeds/4248276477594093840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3465041532843598205/4248276477594093840' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/4248276477594093840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3465041532843598205/posts/default/4248276477594093840'/><link rel='alternate' type='text/html' href='http://xruby.blogspot.com/2007/01/xruby-010-released.html' title='XRuby 0.1.0 released'/><author><name>xue.yong.zhi</name><uri>http://www.blogger.com/profile/13007279094431940132</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>