<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title>Rubinius Blog</title>
  <link rel="self" type="application/atom+xml" href="http://rubini.us/feed/atom.xml" />
  <link rel="alternate" type="text/html" href="http://rubini.us/blog" />
  <updated></updated>
  <id>http://rubini.us/</id>

  
  <entry>
    <title>What&rsquo;s the Status, Kenneth?</title>
    <id>http://rubini.us/2011/07/05/whats-the-status-kenneth/</id>
    <link rel="alternate" type="text/html" href="http://rubini.us/2011/07/05/whats-the-status-kenneth/" />
    <updated>2011-07-05T00:00:00+00:00</updated>
    <author>
      <name>Shane Becker</name>
    </author>
    
    <content type="html">&lt;p&gt;I&amp;rsquo;m pretty sure it started like this.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;ldquo;Hello, Evan dear.&amp;rdquo; &amp;mdash; &lt;em&gt;Evan&amp;rsquo;s Grandma Betty&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;ldquo;Grandma Betty!&amp;rdquo; &amp;mdash; &lt;em&gt;Evan&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;ldquo;You know, I was thinking about your little Rubinius thingy while I was gardening today. How&amp;rsquo;s it doing?&amp;rdquo; &amp;mdash; &lt;em&gt;Evan&amp;rsquo;s Grandma Betty&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;ldquo;Oh, Grandma Betty, that&amp;rsquo;s so sweet of you to think of me and it. It&amp;rsquo;s coming along still, of course.&amp;rdquo; &amp;mdash; &lt;em&gt;Evan&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;ldquo;That&amp;rsquo;s good to hear. I was specifically wondering how the 1.9 support is looking.&amp;rdquo; &amp;mdash; &lt;em&gt;Evan&amp;rsquo;s Grandma Betty&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;ldquo;Grandma Betty! You do always love the Latest and Greatest&amp;trade;, don&amp;rsquo;t you? Well, let&amp;rsquo;s see. I&amp;rsquo;d say that &lt;em&gt;1.9 support&lt;/em&gt; comes down to 7 main areas: Encoding, String, Regex, Symbol, IO, Argument Processing, Windows Support. Each has varying degrees of progress.&amp;rdquo; &amp;mdash; &lt;em&gt;Evan&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;ldquo;OK. I wish that there was some way for me to keep more up to date on these happenings without needing to calling you. When I call you, I want to hear about that wife and baby of yours.&amp;rdquo; &amp;mdash; &lt;em&gt;Evan&amp;rsquo;s Grandma Betty&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;ldquo;You got it, Grandma Betty. I&amp;rsquo;ll get my Top Nerds&amp;trade; on the case.&amp;rdquo; &amp;mdash; &lt;em&gt;Evan&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;[sometime later]&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;ldquo;Alright, Grandma Betty. We made the Rubinius Status Board&amp;trade; especially just for you. It&amp;rsquo;s &lt;a href=&quot;http://status.rubini.us&quot;&gt;status.rubini.us&lt;/a&gt;&amp;rdquo; &amp;mdash; &lt;em&gt;Evan&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That conversation may or may not be &lt;strong&gt;completely fictionalized&lt;/strong&gt;. There is one thing that is most emphatically true: Rubinius has a Status Board&amp;trade; now. If you are ever curious how progress is going on things, go check out &lt;a href=&quot;http://status.rubini.us&quot;&gt;status.rubini.us&lt;/a&gt;. Tell your friends.&lt;/p&gt;

&lt;p&gt;XOXO RBX.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Rubinius All Around the World</title>
    <id>http://rubini.us/2011/07/03/all-around-the-world/</id>
    <link rel="alternate" type="text/html" href="http://rubini.us/2011/07/03/all-around-the-world/" />
    <updated>2011-07-03T00:00:00+00:00</updated>
    <author>
      <name>Shane Becker</name>
    </author>
    
    <content type="html">&lt;p&gt;As a result of the &lt;a href=&quot;http://rubini.us/2011/05/26/rubinius-rewards/&quot; title=&quot;Announcing Rubinius Rewards - Rubinius&quot;&gt;Rubinius Rewards&lt;/a&gt;, people from all over the world have requested Rubinius stickers and t-shirts. That just warms our little hearts and humbles us everyday. Thank you so much. It means the world to us. Keep using Rubinius with passion and excitement. Keep spreading the good word to your friends and anyone who&amp;rsquo;ll listen and care. And keep telling us how Rubinius is working for you. However good or bad, we want to know.&lt;/p&gt;

&lt;p&gt;Here&amp;rsquo;s a map of all the places where we&amp;rsquo;ve sent stickers and/or t-shirts. You can also view it on
&lt;a href=&quot;http://maps.google.com/maps/ms?msa=0&amp;amp;msid=204706765448868864026.0004a732bcb9b5816e407&amp;amp;ie=UTF8&amp;amp;ll=19.311143,-0.351562&amp;amp;spn=111.602296,333.632812&amp;amp;z=2&amp;amp;source=embed&quot; title=&quot;Rubinius Around the World - Google Maps&quot;&gt;a larger map&lt;/a&gt;. Wow.&lt;/p&gt;

&lt;iframe width=&quot;950&quot; height=&quot;400&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; src=&quot;http://maps.google.com/maps/ms?msa=0&amp;amp;msid=204706765448868864026.0004a732bcb9b5816e407&amp;amp;ie=UTF8&amp;amp;ll=19.311143,-0.351562&amp;amp;spn=111.602296,333.632812&amp;amp;z=2&amp;amp;output=embed&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;Again, thank you from the bottom of our hearts.&lt;/p&gt;

&lt;p&gt;Stay safe, kids.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;XOXO RBX&lt;/strong&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Rubinius Summit 062011 in Pictures</title>
    <id>http://rubini.us/2011/07/01/rubinius-summit-in-pictures/</id>
    <link rel="alternate" type="text/html" href="http://rubini.us/2011/07/01/rubinius-summit-in-pictures/" />
    <updated>2011-07-01T00:00:00+00:00</updated>
    <author>
      <name>Shane Becker</name>
    </author>
    
    <content type="html">&lt;p&gt;Once a month Evan Phoenix, Brian Ford and I (Shane Beccker) get together for a few days in-person face-time. Usually we meet up in San Francisco at the &lt;a href=&quot;http://engineyard.com&quot;&gt;Engine Yard&lt;/a&gt; HQ and spend time with our dear and lovely boss, &lt;a href=&quot;http://twitter.com/drnic&quot;&gt;Dr Nic&lt;/a&gt;. We like to call these little get togethers Rubinius Summits. For the June 2011 Rubinius Summit, Brian came down to LA where both Evan and I live. We spent the week working together at &lt;a href=&quot;http://farmhouse.la&quot;&gt;The Farmhouse&lt;/a&gt; on moving the ball forward toward the 2.0 release. Here&amp;rsquo;s a few pictures of some of the things that went down.&lt;/p&gt;

&lt;h3 id=&quot;i-used-rubinius-at-railsconf-2011-stickers&quot;&gt;I Used Rubinius at RailsConf 2011 stickers&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;http://flickr.com/photos/veganstraightedge/5885836117&quot;&gt;&lt;img src=&quot;http://farm7.static.flickr.com/6052/5885836117_ba60ba6408_z.jpg&quot; alt=&quot;&amp;quot;I Used Rubinius at RailsConf 2011&amp;quot; stickers at The Farmhouse in Hollywood, CA&quot; title=&quot;&amp;quot;I Used Rubinius at RailsConf 2011&amp;quot; stickers at The Farmhouse in Hollywood, CA                     &quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These stickers arrived and are ready to be shipped out. If you DMed your address to &lt;a href=&quot;http://twitter.com/rubinius&quot;&gt;us on Twitter&lt;/a&gt;, we&amp;rsquo;ve got you. If you never contacted us, but used Rubinius while at RailsConf 2011 in Baltimore, email us at &lt;a href=&quot;&amp;#109;&amp;#097;&amp;#105;&amp;#108;&amp;#116;&amp;#111;:&amp;#099;&amp;#111;&amp;#109;&amp;#109;&amp;#117;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#064;&amp;#114;&amp;#117;&amp;#098;&amp;#105;&amp;#110;&amp;#105;&amp;#046;&amp;#117;&amp;#115;&quot;&gt;&amp;#099;&amp;#111;&amp;#109;&amp;#109;&amp;#117;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#064;&amp;#114;&amp;#117;&amp;#098;&amp;#105;&amp;#110;&amp;#105;&amp;#046;&amp;#117;&amp;#115;&lt;/a&gt; to get your sticker.&lt;/p&gt;

&lt;h3 id=&quot;t-shirts&quot;&gt;T-Shirts!&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;http://flickr.com/photos/veganstraightedge/5889084175&quot;&gt;&lt;img src=&quot;http://farm7.static.flickr.com/6019/5889084175_6414a83e97_z.jpg&quot; alt=&quot;Nearly 600 more @Rubinius shirts just arrived at the @farmhouse in Hollywood, CA&quot; title=&quot;Nearly 600 more @Rubinius shirts just arrived at the @farmhouse in Hollywood, CA                             &quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is what nearly 600 shirts looks like. We&amp;rsquo;ve got a huge back log of people all over the world who responded to our offer of free Rubinius t-shirts. Those will all get shipped out over the next week or so.&lt;/p&gt;

&lt;h3 id=&quot;progress-on-19-support&quot;&gt;Progress on 1.9 Support&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;http://flickr.com/photos/veganstraightedge/5888809669&quot;&gt;&lt;img src=&quot;http://farm6.static.flickr.com/5076/5888809669_134b0d6e23_z.jpg&quot; alt=&quot;Serious @rubinius big brain nerdery happening between @brixen and @evanphx at the @farmhouse in Hollywood, CA&quot; title=&quot;Serious @rubinius big brain nerdery happening between @brixen and @evanphx at the @farmhouse in Hollywood, CA&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Brian and Evan, like a couple of mad scientists, sketched out how to handle 1.9 block arguments for Rubinus 2.0.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://flickr.com/photos/veganstraightedge/5889687428&quot;&gt;&lt;img src=&quot;http://farm6.static.flickr.com/5038/5889687428_b2f0f07f40_z.jpg&quot; alt=&quot;A sketch of Ruby 1.9 block args in Rubinus 2.0 by @evanphx and @brixen at the @farmhouse in Hollywood, CA&quot; title=&quot;A sketch of Ruby 1.9 block args in Rubinus 2.0 by @evanphx and @brixen at the @farmhouse in Hollywood, CA    &quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;http://flickr.com/photos/veganstraightedge/5889686740&quot;&gt;&lt;img src=&quot;http://farm7.static.flickr.com/6024/5889686740_ca7962db63_z.jpg&quot; alt=&quot;A sketch of Ruby 1.9 block args in Rubinus 2.0 by @evanphx and @brixen at the @farmhouse in Hollywood, CA&quot; title=&quot;A sketch of Ruby 1.9 block args in Rubinus 2.0 by @evanphx and @brixen at the @farmhouse in Hollywood, CA    &quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here are the sketches of 1.9 block arguments for Rubinus 2.0.&lt;/p&gt;

&lt;h3 id=&quot;one-more-thing&quot;&gt;One More Thing&lt;/h3&gt;

&lt;p&gt;We came up with an idea this week for how to better communicate outwardly and be more transparent. We built it up real quick and are launching it &amp;hellip;&lt;em&gt;really soon&lt;/em&gt;. Here&amp;rsquo;s a little teaser.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://drbl.in/bxbg&quot;&gt;&lt;img src=&quot;http://dribbble.com/system/users/1288/screenshots/202858/rubinius_...thing_2.png&quot; alt=&quot;Rubinius teaser 1&quot; title=&quot;Rubinius teaser 1&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;http://drbl.in/bxbf&quot;&gt;&lt;img src=&quot;http://dribbble.com/system/users/1288/screenshots/202857/rubinius_...thing_1.png&quot; alt=&quot;Rubinius teaser 2&quot; title=&quot;Rubinius teaser 2&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;XOXO RBX&lt;/em&gt;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Inside the Rubinius 2.0 Preview Release</title>
    <id>http://rubini.us/2011/06/07/inside-rubinius-20-preview/</id>
    <link rel="alternate" type="text/html" href="http://rubini.us/2011/06/07/inside-rubinius-20-preview/" />
    <updated>2011-06-07T00:00:00+00:00</updated>
    <author>
      <name>Brian Ford</name>
    </author>
    
    <content type="html">&lt;p&gt;Houston, we have a problem. Complex projects are difficult to transition
forward and Rubinius is a complex project. Rubinius is at the point of a major
transition and we need your help to move forward.&lt;/p&gt;

&lt;p&gt;Just over a year ago, Rubinius released version 1.0. Since then, dozens of
contributors have added over 2,200 commits to the master branch and we have
released seven new versions. At the same time, we have added nearly 450
commits on a development branch to remove the global interpreter lock (GIL)
and begin adding Ruby 1.9 and Windows support.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/rubinius-2-0-developer-preview-blog-post.png&quot; alt=&quot;Rubinius 2.0 Developer Preview&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Today we are releasing &lt;em&gt;Rubinius 2.0 Developer Preview&lt;/em&gt;. The primary focus of
this release is true Ruby multi-threaded concurrency. Additionally, it
contains the beginnings of Ruby 1.9 and Microsoft Windows support.&lt;/p&gt;

&lt;h3 id=&quot;rubinius-20-developer-preview&quot;&gt;Rubinius 2.0 Developer Preview&lt;/h3&gt;

&lt;p&gt;We are seeking developers interested in running their Ruby and Rails projects
on Rubinius to help us iron out issues as we work toward the final 2.0
release. Let&amp;rsquo;s look at the details of the 2.0 developer preview.&lt;/p&gt;

&lt;p&gt;One of the central features of Rubinius 2.0 is a fundamental change in the
threading architecture. In Rubinius 2.0, Ruby threads will run with true
concurrency. This means that if multi-core or multi-CPU hardware is available,
Ruby code on different threads will actually run in parallel.&lt;/p&gt;

&lt;p&gt;Another central feature of Rubinius 2.0 is support for both Ruby 1.8.7 and
Ruby 1.9.2 syntax. The Rubinius 2.0 support for Ruby 1.8.7 should be 100%
backward compatible with the support in the Rubinius master branch. The full
Ruby concurrency is enabled regardless of what language syntax mode is active.&lt;/p&gt;

&lt;h3 id=&quot;repository-migration&quot;&gt;Repository Migration&lt;/h3&gt;

&lt;p&gt;We are migrating the main Rubinius repository to the &lt;a href=&quot;https://github.com/rubinius&quot;&gt;Rubinius&lt;/a&gt; organization.&lt;/p&gt;

&lt;p&gt;The RVM project has already been updated to work with the new repository. So
&lt;code&gt;rvm install rbx&lt;/code&gt; will use the new repository.  If you have an existing clone
of Rubinius, update and run &lt;code&gt;rake github&lt;/code&gt; to point your existing repository to
the new one.&lt;/p&gt;

&lt;p&gt;You can clone directly from the &lt;a href=&quot;https://github.com/rubinius/rubinius&quot;&gt;new repository&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;installation&quot;&gt;Installation&lt;/h3&gt;

&lt;p&gt;For testing Rubinius with your application, installing with RVM is probably
the easiest. To install the 2.0 developer preview, ensure that RVM is updated:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rvm get head
rvm reload
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then, install the Rubinius 2.0.0pre branch:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rvm install rbx-2.0.0pre
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you are interested in helping develop Rubinius, we suggest you clone the
repository directly and build. Rubinius runs fine from the source directory so
you don&amp;rsquo;t need to install it. For more details about building from a clone,
see &lt;a href=&quot;http://rubini.us/doc/en/getting-started/&quot;&gt;Getting Started&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;configuration&quot;&gt;Configuration&lt;/h3&gt;

&lt;p&gt;The goal of Rubinius 2.0 is to fully support both Ruby 1.8.7 and 1.9.2 in a
single executable. When running Rubinius, you can select which version to use.
There are configuration options to change which versions are supported and
which version is the default.&lt;/p&gt;

&lt;p&gt;The first configure option is &lt;code&gt;--enable-version=X[,Y]&lt;/code&gt;. This option sets which
language versions will be supported. An example is:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;./configure --enable-version=1.8,1.9
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The language versions can be specified as &lt;code&gt;18&lt;/code&gt; or &lt;code&gt;1.8&lt;/code&gt;. Multiple versions are
separated by a comma and no space.&lt;/p&gt;

&lt;p&gt;The second configure option is &lt;code&gt;--default-version=X&lt;/code&gt;. This option sets which
language version is the default when running Rubinius. An example is:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;./configure --default-version=1.9
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;These options are intended to be used together. You must enable a version to
select it as the default, so the options must come in the following order:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;./configure --enable-version=X,Y --default-version=Y
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once you have enabled support for a language version, to select that mode when
running Rubinius, use the &lt;code&gt;-X18&lt;/code&gt; or &lt;code&gt;-X19&lt;/code&gt; command line switches. For example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rbx -X19 -v
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This command will run Rubinius with the 1.9 language mode enabled.&lt;/p&gt;

&lt;p&gt;You may also use the &lt;code&gt;RBXOPT&lt;/code&gt; environment variable to select the language
mode. Assuming that 1.8 is the default mode, the following command would run
Rubinius with the 1.9 language mode enabled:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;RBXOPT=-X19 rbx -v
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Right now, only the 1.8 language mode is enabled in the 2.0.0pre branch.
However, we will be enabling the 1.9 mode in the very near future. The default
mode will continue to be 1.8 unless you configure Rubinius to run in 1.9 mode.&lt;/p&gt;

&lt;h3 id=&quot;building-on-windows&quot;&gt;Building on Windows&lt;/h3&gt;

&lt;p&gt;On Windows, Rubinius uses the &lt;a href=&quot;http://mingw-w64.sourceforge.net/&quot;&gt;MinGW-w64&lt;/a&gt;
compiler to build a native application. There remains a lot of work to do for
Windows support but the Rubinius VM is currently compiling on Windows 7.&lt;/p&gt;

&lt;p&gt;If you are a bleeding-edge Windows developer interested in diving into
Rubinius, here&amp;rsquo;s how to get started:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Install &lt;em&gt;MRI 1.9&lt;/em&gt; using &lt;a href=&quot;http://rubyinstaller.org/&quot;&gt;RubyInstaller&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Install &lt;a href=&quot;http://code.google.com/p/msysgit/&quot;&gt;MSysGit&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Install the 32bit or 64bit MinGW-w64 toolchain.&lt;/li&gt;
  &lt;li&gt;Clone the Rubinius repository.&lt;/li&gt;
  &lt;li&gt;In CMD, run &lt;code&gt;ruby configure&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Run &lt;code&gt;rake&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;moving-forward&quot;&gt;Moving Forward&lt;/h3&gt;

&lt;p&gt;In the near future, we will release another version of Rubinius from the
current master branch. We hope to merge 2.0.0pre into master as soon as
possible and continue working toward the 2.0 final release. We&amp;rsquo;ll make that
decision based on your reports about how the 2.0.0pre branch is working with
existing 1.8.7 applications.&lt;/p&gt;

&lt;p&gt;We greatly appreciate your help polishing up the Rubinius 2.0 release! Follow
us on &lt;a href=&quot;http://twitter.com/rubinius&quot;&gt;Twitter&lt;/a&gt; for updates and stop by #rubinius
on freenode.net to chat about anything on your mind.&lt;/p&gt;

&lt;h3 id=&quot;rubinius-support-on-engineyard-appcloud&quot;&gt;Rubinius Support on EngineYard AppCloud&lt;/h3&gt;

&lt;p&gt;Rubinius 1.2.3 is currently in beta on Engine Yard AppCloud, and we encourage
users to &lt;a href=&quot;http://docs.engineyard.com/rubinius.html&quot;&gt;give it a try&lt;/a&gt;. Engine
Yard will support Rubinius 2.0.0 after it’s officially released.&lt;/p&gt;

&lt;p&gt;To learn more about Rubinius, join Engine Yard for a &lt;a href=&quot;http://pages.engineyard.com/RubyPlatformOptionsWebinarJuly212011.html&quot;&gt;Platform Options Webinar&lt;/a&gt; in July.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Announcing Rubinius Rewards</title>
    <id>http://rubini.us/2011/05/26/rubinius-rewards/</id>
    <link rel="alternate" type="text/html" href="http://rubini.us/2011/05/26/rubinius-rewards/" />
    <updated>2011-05-26T00:00:00+00:00</updated>
    <author>
      <name>Shane Becker</name>
    </author>
    
    <content type="html">&lt;h2 id=&quot;tldr&quot;&gt;tl;dr&lt;/h2&gt;

&lt;p&gt;Email &lt;a href=&quot;&amp;#109;&amp;#097;&amp;#105;&amp;#108;&amp;#116;&amp;#111;:&amp;#099;&amp;#111;&amp;#109;&amp;#109;&amp;#117;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#064;&amp;#114;&amp;#117;&amp;#098;&amp;#105;&amp;#110;&amp;#105;&amp;#046;&amp;#117;&amp;#115;&quot;&gt;&amp;#099;&amp;#111;&amp;#109;&amp;#109;&amp;#117;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#064;&amp;#114;&amp;#117;&amp;#098;&amp;#105;&amp;#110;&amp;#105;&amp;#046;&amp;#117;&amp;#115;&lt;/a&gt; to get stickers and
t-shirts. Include your mailing address.&lt;/p&gt;

&lt;h2 id=&quot;we-made-t-shirts-and-stickers&quot;&gt;We Made T-Shirts and Stickers&lt;/h2&gt;

&lt;p&gt;We heard you like stickers and t-shirts, so we made some. They
debuted at &lt;a href=&quot;http://en.oreilly.com/rails2011&quot; title=&quot;RailsConf 2011 - O'Reilly Conferences, May 16 - 19, 2011, Baltimore, MD!&quot;&gt;RailsConf 2011 in Baltimore, MD&lt;/a&gt;.
Then we gave almost all of them away in just a few hours. They went like
hotcakes. It turns out that there was a lot of pent up demand for Rubinius
swag.&lt;/p&gt;

&lt;p&gt;Not everyone could be at RailsConf to get the goods, of course. Even some
people who were there didn&amp;rsquo;t get their shirts/stickers. If you didn&amp;rsquo;t get one
and want one, we&amp;rsquo;re very sorry, but don&amp;rsquo;t you worry. We&amp;rsquo;ve got you covered.&lt;/p&gt;

&lt;h2 id=&quot;general-availability-stickers&quot;&gt;General Availability Stickers&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/veganstraightedge/5742057726&quot;&gt;&lt;img src=&quot;http://farm3.static.flickr.com/2458/5742057726_48c42d5462_z.jpg&quot; alt=&quot;A box of Rubinius stickers&quot; title=&quot;A box of Rubinius stickers by veganstraightedge, on Flickr&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We&amp;rsquo;ve got a box of stickers in three designs:
&lt;a href=&quot;http://asset.rubini.us/web/images/blog/rubinius_square_sticker.png&quot;&gt;square&lt;/a&gt;,
&lt;a href=&quot;http://asset.rubini.us/web/images/blog/rubinius_bumper_sticker.png&quot;&gt;bumper&lt;/a&gt;
and
&lt;a href=&quot;http://asset.rubini.us/web/images/blog/rubinius_diecut_sticker.png&quot;&gt;die-cut&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;&amp;#109;&amp;#097;&amp;#105;&amp;#108;&amp;#116;&amp;#111;:&amp;#099;&amp;#111;&amp;#109;&amp;#109;&amp;#117;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#064;&amp;#114;&amp;#117;&amp;#098;&amp;#105;&amp;#110;&amp;#105;&amp;#046;&amp;#117;&amp;#115;&quot;&gt;&amp;#069;&amp;#109;&amp;#097;&amp;#105;&amp;#108;&amp;#032;&amp;#117;&amp;#115;&lt;/a&gt; and tell us which one you want.&lt;/p&gt;

&lt;h2 id=&quot;general-availability-t-shirt&quot;&gt;General Availability T-Shirt&lt;/h2&gt;

&lt;p&gt;We&amp;rsquo;re printing 500 more grey Rubinius t-shirts in the two different designs
and in a a handful of sizes (women&amp;rsquo;s small and medium, unisex small &amp;ndash;
xx-large).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;&amp;#109;&amp;#097;&amp;#105;&amp;#108;&amp;#116;&amp;#111;:&amp;#099;&amp;#111;&amp;#109;&amp;#109;&amp;#117;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#064;&amp;#114;&amp;#117;&amp;#098;&amp;#105;&amp;#110;&amp;#105;&amp;#046;&amp;#117;&amp;#115;&quot;&gt;&amp;#069;&amp;#109;&amp;#097;&amp;#105;&amp;#108;&amp;#032;&amp;#117;&amp;#115;&lt;/a&gt; and tell us which design / size you want:
&lt;a href=&quot;http://asset.rubini.us/web/images/blog/rubinius_use_ruby_square_shirt.jpg&quot;&gt;square&lt;/a&gt;
or
&lt;a href=&quot;http://asset.rubini.us/web/images/blog/rubinius_use_ruby_horizontal_shirt.jpg&quot;&gt;horizontal&lt;/a&gt;
in
women&amp;rsquo;s small, women&amp;rsquo;s medium, unisex small, unisex medium, unisex large,
unisex x-large or unisex xx-large.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/veganstraightedge/5709097384&quot;&gt;&lt;img src=&quot;http://farm4.static.flickr.com/3469/5709097384_0bde99e1d3_z.jpg&quot; alt=&quot;Rubinius &amp;quot;Use Ruby&amp;trade;&amp;quot; T-Shirts at the Farmhouse in Hollywood, CA&quot; title=&quot;Rubinius &amp;quot;Use Ruby&amp;trade;&amp;quot; T-Shirts at the Farmhouse in Hollywood, CA, on Flickr&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Photo by &lt;a href=&quot;http://flickr.com/tjnelsonjunior&quot; title=&quot;Flickr: tjnelsonjunior's Photostream&quot;&gt;Tj Nelson Jr&lt;/a&gt;
&lt;a href=&quot;http://twitter.com/tjnelsonjr&quot; title=&quot;@tjnelsonjr&quot;&gt;@tjnelsonjr&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;first-commit-sticker&quot;&gt;First Commit Sticker&lt;/h2&gt;

&lt;p&gt;Going forward, we want to reward everyone who makes a contribution to
Rubinius. As a very small token of our gratitude, we&amp;rsquo;re mailing a Rubinius
sticker (and a handwritten thank you note from one of us) to everyone after
their first commit. So, if you&amp;rsquo;ve ever thought about dipping your toe into
Rubinius (or diving headlong into the deep end), now&amp;rsquo;s the best time ever.
Help us make Rubinius better (in big and small ways) and we&amp;rsquo;ll send you stuff.&lt;/p&gt;

&lt;h2 id=&quot;tenth-commit-shirt&quot;&gt;Tenth Commit Shirt&lt;/h2&gt;

&lt;p&gt;We want you to stick around and keep helping Rubinius to get better and better.
If you make 10 commits to Rubinius, we&amp;rsquo;ll send you a special shirt only
available to committers. That design is still a secret for now, but it&amp;rsquo;s just
for 10+ committers.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Please, don&amp;rsquo;t try to game the system by intentionally breaking stuff up into
smaller commits just to bump up your count. Let&amp;rsquo;s keep it honest.&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;quarterly-committer-merit-badge-stickers&quot;&gt;Quarterly Committer Merit Badge Stickers&lt;/h2&gt;

&lt;p&gt;In addition to getting a generally available sticker after your first commit,
at the end of each calendar quarter (every three months) we&amp;rsquo;re sending a
sticker to everyone who committed to Rubinius &lt;strong&gt;during&lt;/strong&gt; that quarter.&lt;/p&gt;

&lt;p&gt;E.g. after July 1, 2011, we&amp;rsquo;ll print and ship a sticker to everyone who
committed between April 1 and June 30. Each quarter&amp;rsquo;s sticker has the year /
quarter in the corner. Keep committing every quarter and you&amp;rsquo;ll keep
collecting the merit badge stickers.&lt;/p&gt;

&lt;h2 id=&quot;one-more-thing-mdash-im-committed-sticker&quot;&gt;One More Thing &amp;mdash; I&amp;rsquo;m Committed* Sticker&lt;/h2&gt;

&lt;p&gt;Rubinius is obviously older than the new Rubinius Rewards program. To backfill
for all the contributions people have made over the years up until, we have a
&lt;em&gt;super duper limited edition never to be made again&lt;/em&gt; sticker&amp;hellip; the asterisk.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/veganstraightedge/5742135762&quot;&gt;&lt;img src=&quot;http://farm4.static.flickr.com/3187/5742135762_521146bdf9_z.jpg&quot; alt=&quot;Rubinius stickers on my laptop&quot; title=&quot;The new @Rubinius stickers on my @EngineYard laptop, on Flickr&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;get-in-touch&quot;&gt;Get in Touch&lt;/h2&gt;

&lt;p&gt;If you&amp;rsquo;re a past committer, &lt;a href=&quot;&amp;#109;&amp;#097;&amp;#105;&amp;#108;&amp;#116;&amp;#111;:&amp;#099;&amp;#111;&amp;#109;&amp;#109;&amp;#117;&amp;#110;&amp;#105;&amp;#116;&amp;#121;&amp;#064;&amp;#114;&amp;#117;&amp;#098;&amp;#105;&amp;#110;&amp;#105;&amp;#046;&amp;#117;&amp;#115;&quot;&gt;&amp;#101;&amp;#109;&amp;#097;&amp;#105;&amp;#108;&amp;#032;&amp;#117;&amp;#115;&lt;/a&gt; your
mailing address get your special merit sticker. If you&amp;rsquo;re a new committer,
we&amp;rsquo;ll try to take note and reach out to you. If you don&amp;rsquo;t hear from us,
don&amp;rsquo;t be afraid to contact us with your mailing address.&lt;/p&gt;

&lt;h3 id=&quot;up-next&quot;&gt;Up Next&amp;hellip;&lt;/h3&gt;

&lt;p&gt;Rubinius International Outposts.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Adam Prescott on Scopes in Rubinius</title>
    <id>http://rubini.us/2011/05/22/adam-prescott-on-scopes/</id>
    <link rel="alternate" type="text/html" href="http://rubini.us/2011/05/22/adam-prescott-on-scopes/" />
    <updated>2011-05-22T00:00:00+00:00</updated>
    <author>
      <name>Shane Becker</name>
    </author>
    
    <content type="html">&lt;p&gt;&lt;cite class=&quot;vcard&quot;&gt;&lt;a class=&quot;url fn&quot; href=&quot;http://aprescott.com&quot; title=&quot;Adam Prescott&quot;&gt;Adam Prescott&lt;/a&gt;&lt;/cite&gt; wrote a lengthy article about &lt;i&gt;variables, closures and scope&lt;/i&gt; in Ruby, &lt;a href=&quot;http://aprescott.com/posts/variables-closures-and-scope&quot; title=&quot;Posts / Variables, closures &amp;amp; scope &amp;mdash; Adam Prescott&quot;&gt;mentioning Rubinius at the end&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote cite=&quot;http://aprescott.com/posts/variables-closures-and-scope&quot;&gt;
  &lt;p&gt; One of the really cool things about the &lt;a href=&quot;http://en.wikipedia.org/wiki/Rubinius&quot;&gt;Rubinius&lt;/a&gt; implementation of Ruby is that it exposes, by requirement, a level of internals which you can&amp;rsquo;t find in &lt;abbr title=&quot;Matz' Ruby Interpreter&quot;&gt;MRI&lt;/abbr&gt;, including some internals with scopes. Because these internals are exposed in Ruby itself, you can &lt;a href=&quot;http://yehudakatz.com/2011/02/18/getting-comfortable-with-rubinius-pure-ruby-internals/&quot;&gt;play around with scopes as objects&lt;/a&gt;, using &lt;code&gt;VariableScope&lt;/code&gt;, including getting access to the available local variables within that scope, with &lt;code&gt;VariableScope.current.locals&lt;/code&gt;. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;How are &lt;strong&gt;you&lt;/strong&gt; using Rubinius? What are you doing with it that you couldn&amp;rsquo;t do before? What is it missing for you to really dive in? Let us know. We&amp;rsquo;re listening.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;community@rubini.us&quot;&gt;community@rubini.us&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://twitter.com/rubinius&quot; title=&quot;@rubinius on twitter&quot;&gt;@rubinius&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&amp;mdash; Use Ruby&amp;trade;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Rubinius T-Shirts and Stickers</title>
    <id>http://rubini.us/2011/04/29/rubinius-t-shirts-and-stickers/</id>
    <link rel="alternate" type="text/html" href="http://rubini.us/2011/04/29/rubinius-t-shirts-and-stickers/" />
    <updated>2011-04-29T00:00:00+00:00</updated>
    <author>
      <name>Shane Becker</name>
    </author>
    
    <content type="html">&lt;h3 id=&quot;allow-myself-to-introduce-myself&quot;&gt;Allow Myself to Introduce Myself&lt;/h3&gt;

&lt;p&gt;Hi. I&amp;rsquo;m Shane (&lt;a href=&quot;http://twitter.com/veganstraightedge&quot;&gt;@veganstraightedge&lt;/a&gt;
/ &lt;a href=&quot;http://iamshane.com&quot;&gt;iamshane.com&lt;/a&gt;). I&amp;rsquo;ll be helping out around here now.
I was recently hired by &lt;a href=&quot;http://engineyard.com&quot;&gt;Engine Yard&lt;/a&gt; to be their Open
Source Cheerleader. (Yes, there will be costumes at some point.) My
primary focus is &lt;strong&gt;Rubinius! Rubinius! Rubinius!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I have lots of big plans for helping get Rubinius used by more people
in more places and how to have a better conversation with people who are using
it. For now though, I tell you about just the first thing that I&amp;rsquo;ve done.&lt;/p&gt;

&lt;h3 id=&quot;t-shirts&quot;&gt;T-Shirts&lt;/h3&gt;

&lt;h4 id=&quot;the-first-ever-rubinius-t-shirt-from-railsconf-2007&quot;&gt;The First Ever Rubinius T-Shirt from RailsConf 2007&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;http://asset.rubini.us/web/images/blog/rubinius_sword_shirt.jpg&quot; alt=&quot;The First Ever Rubinius T-Shirt from RailsConf 2007&quot; /&gt;&lt;/p&gt;

&lt;p&gt;A long time ago (2007) in a city far, far away (Seattle, WA), Evan and I made
the first batch of Rubinius t-shirts. There were about two dozen made and
given to the handful of contributors at the time. This was at RailsConf in
Portland, OR. Since then there hasn&amp;rsquo;t been &lt;em&gt;anything&lt;/em&gt; made with the Rubinius
logo on it.&lt;/p&gt;

&lt;p&gt;Now is the time to rectify that. We&amp;rsquo;ve made two different t-shirts. Same
messaging, slightly different design orientation. Both are the same colors:
white on asphalt. They are available in an assortment of sizes from women&amp;rsquo;s
small to unisex xx-large.&lt;/p&gt;

&lt;h4 id=&quot;use-ruby-rubinius-t-shirts-from-railsconf-2011&quot;&gt;Use Ruby™ Rubinius T-Shirts from RailsConf 2011&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;http://asset.rubini.us/web/images/blog/rubinius_use_ruby_square_shirt.jpg&quot; alt=&quot;Use Ruby™ Square Ruby T-Shirt from RailsConf 2011&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://asset.rubini.us/web/images/blog/rubinius_use_ruby_horizontal_shirt.jpg&quot; alt=&quot;Use Ruby™ Horizontal Ruby T-Shirt from RailsConf 2011&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you&amp;rsquo;re going to RailsConf 2011 in Baltimore, MD, stop by the Engine Yard booth
to pick up a free Rubinius t-shirt. After RailsConf we&amp;rsquo;ll have ways to get one
from us directly.&lt;/p&gt;

&lt;h3 id=&quot;stickers&quot;&gt;Stickers&lt;/h3&gt;

&lt;p&gt;To go along with the t-shirts, we&amp;rsquo;re making a whole grip of Rubinius stickers.
Most of which will also be available for free from the Engine Yard booth at
RailsConf in Baltimore. Again, after RailsConf you&amp;rsquo;ll be able to get them
directly from us. More on that later. Here&amp;rsquo;s what we have in store.&lt;/p&gt;

&lt;h4 id=&quot;wide-screen-7in-x-375in&quot;&gt;Wide Screen (7in x 3.75in)&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;http://asset.rubini.us/web/images/blog/rubinius_bumper_sticker.png&quot; alt=&quot;Rubinius : Use Ruby bumper sticker&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;square-logo&quot;&gt;Square Logo&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;http://asset.rubini.us/web/images/blog/rubinius_square_sticker.png&quot; alt=&quot;Rubinius : Use Ruby square sticker&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;die-cut-r-logo&quot;&gt;Die-Cut R Logo&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;http://asset.rubini.us/web/images/blog/rubinius_diecut_sticker.png&quot; alt=&quot;Rubinius : r logo diecut sticker&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;im-committed-merit-sticker&quot;&gt;I&amp;rsquo;m Committed Merit Sticker&lt;/h4&gt;

&lt;p&gt;This one you have to earn. At the end of each quarter, we&amp;rsquo;ll send out a little
one inch square sticker with a year/quarter combination in its corner to
everyone who committed something to Rubinius during that calendar quarter. For
all of the incredible folks who&amp;rsquo;ve contributed something (however big or small)
already, you&amp;rsquo;ll get a special sticker. Instead of a date, there&amp;rsquo;s an asterisk.
Only those of you that&amp;rsquo;ve committed so far will get that one.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://asset.rubini.us/web/images/blog/rubinius_alumni_sticker.png&quot; alt=&quot;Rubinius : I'm committed past committers sticker&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Come find us to get free Rubinius shirts and stickers. And stay tuned to
&lt;a href=&quot;http://rubini.us/blog&quot;&gt;the Rubinius blog&lt;/a&gt; and to the Twitter account :
&lt;a href=&quot;http://twitter.com/rubinius&quot;&gt;@rubinius&lt;/a&gt;. We have lots more in store.&lt;/p&gt;

&lt;p&gt;&amp;mdash; Use Ruby&amp;trade;&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Running Ruby With No Ruby</title>
    <id>http://rubini.us/2011/03/17/running-ruby-with-no-ruby/</id>
    <link rel="alternate" type="text/html" href="http://rubini.us/2011/03/17/running-ruby-with-no-ruby/" />
    <updated>2011-03-17T00:00:00+00:00</updated>
    <author>
      <name>Brian Ford</name>
    </author>
    
    <content type="html">&lt;p&gt;Humans have come a long way since our cave-dwelling days. No, that&amp;rsquo;s not a
metaphor for primitive software. I mean literally since we lived in caves. One
of the big inventions is the lock. There are birds that bury food and will
move it later if they notice they were watched burying it. But they have no
access control. Any bird may come along and dig up the food.&lt;/p&gt;

&lt;p&gt;Humans, though, are smarter than the average bird.&lt;/p&gt;

&lt;p&gt;We have numerous systems that implement the analog of a lock, namely, some
sort of access control. For every one of these systems, we have other systems
that attempt to circumvent or defeat the access control. Two sides of the
ubiquitous coin of life.&lt;/p&gt;

&lt;p&gt;In software, attempts to implement access control typically involve
distinguishing between source code and some form of executable code. Direct
access to the source code is not permitted. Further, the format of the
executable code resists attempts to derive the source code. There are several
reasons for this:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Licenses:&lt;/strong&gt; If a vendor licenses individual copies of the software, they
want to prevent unrestricted copying of the software without paying for a
license.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Intellectual Property:&lt;/strong&gt; A vendor may have trade secrets or other
proprietary information that is disclosed by the source code.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Security:&lt;/strong&gt; Full access to the source code may reveal vulnerabilities in
the software or related systems. This is sometimes called &lt;em&gt;Security Through
Obscurity&lt;/em&gt; and is generally disparaged, but things are not so black and
white and there may be valid security concerns in the source code.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The process that separates the source code from the executable program is
typically a compilation step. However, Ruby code is not typically associated
with any sort of compilation. That&amp;rsquo;s one of the great things about Ruby,
right? There is no &lt;em&gt;edit-compile-link-load&lt;/em&gt; cycle to wait on. Just edit and run. But
if there is no compilation step, how do we separate the source code from the
executable code?&lt;/p&gt;

&lt;p&gt;You may recall from my &lt;a href=&quot;http://rubini.us/2011/03/11/making-rubinius-rbc-files-disappear/&quot;&gt;last
post&lt;/a&gt; that
Rubinius does compile Ruby code to a bytecode format that the virtual machine
executes. I also promised to explain how you could run the bytecode directly.&lt;/p&gt;

&lt;p&gt;But first, let me very clearly state that there are a number of caveats. In
fact, I&amp;rsquo;ve included a whole section on them below. Please read them. We will
assume that you have and that you understand them. If you have any questions,
please ask.&lt;/p&gt;

&lt;h3 id=&quot;application-distribution-scenario&quot;&gt;Application Distribution Scenario&lt;/h3&gt;

&lt;p&gt;Let&amp;rsquo;s review what we would like to accomplish. We&amp;rsquo;ll assume affable Abe is a
developer writing an application for customer Cain.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Abe writes some Ruby code.&lt;/li&gt;
  &lt;li&gt;Abe compiles the code to a set of files.&lt;/li&gt;
  &lt;li&gt;Abe packages the files up into an application with no Ruby source.&lt;/li&gt;
  &lt;li&gt;Abe sends the application to Cain.&lt;/li&gt;
  &lt;li&gt;Cain installs the application.&lt;/li&gt;
  &lt;li&gt;Cain runs the application.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In this scenario, I&amp;rsquo;m assuming a very vague definition of application. In
other words, the process below will fit in with a broad spectrum of bundling
and distribution schemes.&lt;/p&gt;

&lt;h3 id=&quot;application-layout&quot;&gt;Application Layout&lt;/h3&gt;

&lt;p&gt;Let&amp;rsquo;s assume that you have the following application layout. This mirrors what
you would expect to see in a gem. You could also consider this as a subtree in
your larger project.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;widget
|- lib
|- widget.rb
\- widget
   |- red.rb
   |- blue.rb
   \- green.rb
&lt;/code&gt;&lt;/pre&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;lineno&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# widget.rb&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;widget/red&amp;#39;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;3&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;widget/blue&amp;#39;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;4&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;widget/green&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;lineno&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# widget/red.rb&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;I am red&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;lineno&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# widget/blue.rb&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;I am blue&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;lineno&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# widget/green.rb&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;I am green&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;h3 id=&quot;compiling-ruby-files&quot;&gt;Compiling Ruby Files&lt;/h3&gt;

&lt;p&gt;The Rubinius bytecode compiler is accessible through a command-line script.
See &lt;code&gt;rbx compile -h&lt;/code&gt; for all options. We will only need one simple option in
our case to easily create a separate tree containing one compiled file for
every Ruby source file in our source tree.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rbx compile -s '^widget:widget-compiled' widget/
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Let&amp;rsquo;s dissect this command. The &lt;code&gt;-s&lt;/code&gt; option defines a transformation to apply
to every filename. The transformation has the form &lt;code&gt;&amp;lt;source&amp;gt;:&amp;lt;destination&amp;gt;&lt;/code&gt;
where &lt;code&gt;&amp;lt;source&amp;gt;&lt;/code&gt; can be a Regexp. In our case, we would like to change any
path starting with &lt;code&gt;widget&lt;/code&gt; to start with &lt;code&gt;widget-compiled&lt;/code&gt;. This way, we
create a separate tree of our compiled files. The final option is the
&lt;code&gt;widget/&lt;/code&gt; directory. The &lt;code&gt;rbx compile&lt;/code&gt; command will happily compile a single
file or a directory of files. Note that if we did not pass the &lt;code&gt;-s&lt;/code&gt; option,
&lt;code&gt;rbx compile&lt;/code&gt; would have created the compiled files alongside the source
files.&lt;/p&gt;

&lt;p&gt;If we now look at &lt;code&gt;widget-compiled&lt;/code&gt;, we should see the following:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;widget-compiled
|- lib
|- widget.rbc
\- widget
   |- red.rbc
   |- blue.rbc
   \- green.rbc
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&quot;loading-pre-compiled-files&quot;&gt;Loading Pre-compiled Files&lt;/h3&gt;

&lt;p&gt;Now that we have a separate tree of only compiled files, how do we load them?
Well, first, let&amp;rsquo;s load our source files so we know what to expect. Note that
the technique used in this post should not substitute for a robust test suite.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ rbx -Iwidget/lib -e &quot;require 'widget/lib/widget'&quot;
I am red
I am blue
I am green
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Ok, that is what I would expect. Now, to load the compiled files:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ rbx -Iwidget-compiled/lib -e &quot;Rubinius::CodeLoader.require_compiled 'widget/lib/widget'&quot;
I am red
I am blue
I am green
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;The crowed erupts with applause and hooting&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Golly gee, you guys&amp;hellip; &lt;em&gt;Blush&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let&amp;rsquo;s review. Our goal is to take a tree of Ruby source files and create a
tree of compiled files that can be sent to a customer and loaded to perform
exactly as the Ruby source would if loaded directly. The most direct and
simple way to accomplish this is to use the Rubinius compiler command-line
script to compile the tree of Ruby source files to a separate tree. Then, load
the root of that tree with &lt;code&gt;Rubinius::CodeLoader.require_compiled &quot;root&quot;&lt;/code&gt;.&lt;/p&gt;

&lt;h3 id=&quot;caveats&quot;&gt;Caveats&lt;/h3&gt;

&lt;p&gt;I will admit, I have resisted fiercely against encouraging or even permitting
Rubinius users from using what I showed above in their code. Not because I am
an ogre who is trying to steal your fun, but because there are serious issues
with allowing this. So, please read the following carefully.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;We, Rubinius, absolutely reserve the right to change any part of the
underlying compiled file mechanism. Since we are publishing the
&lt;code&gt;Rubinius::CodeLoader.require_compiled(name)&lt;/code&gt; method, we will respect that
contract. What it says is, given a name, we will load a representation of
that name. &lt;em&gt;DO NOT assume that &lt;code&gt;&quot;some_file&quot;&lt;/code&gt; is actually referencing
&lt;code&gt;&quot;some_file.rbc&quot;&lt;/code&gt;&lt;/em&gt;. We may change the way compiled files are stored and may
change the format of the compiled output.&lt;/li&gt;
  &lt;li&gt;We have created this facility to meet a need we had in Rubinius. Since our
compiler is written in Ruby, we have to run Ruby to run the compiler. But
since we need to compile Ruby to run it, we need to compile the compiler.
But since&amp;hellip; To handle this, we build the compiler using a bootstrapping
version of Ruby.  Then we load the pre-compiled compiler files as shown
above. The approach is quite general, as demonstrated. However, a better
approach may be appropriate for a particular application. In that case,
talk to us about how you think it should work and we can point you in a
direction to try implementing what you need.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;We assume no responsibility for any security breaches resulting from your
incorrect assumption that .rbc files provides any meaningful security
mechanism.&lt;/strong&gt; I cannot stress this enough. The compiled file mechanism is a
cache. It is a way to avoid recompiling Ruby source code that has not
changed. The compiled format is simple. We reserve the right to provide
disassemblers for our compiled code. We are happy to assist you with
direction for implementing a more secure system for your needs.&lt;/li&gt;
  &lt;li&gt;There is no mechanism that is completely safe from cracking when it comes
to software access control. Witness how often Microsoft&amp;rsquo;s products have
their security features defeated. Also witness how often attempts at DRM
are circumvented. The most secure system I have seen uses a special
compiler and a hardware dongle. The compiler takes critical parts of the
application logic and breaks them up so that part of the computation is
performed on the dongle. This is significantly harder to defeat than binary
editing an executable to turn a license key check into a no-op. The folks
you most want to keep from accessing your information are the ones most
capable of doing so. Security and access control are very hard problems.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;Rubinius compiles Ruby code to bytecode before running it. It is possible to
save the bytecode representation and reload it later. Using this mechanism, it
is possible to avoid providing the Ruby source code and run an application
directly from the compiled bytecode. The mechanism we use to do this was
created to solve our problem of bootstrapping the Rubinius bytecode compiler,
which is written in Ruby. The mechanism is not intended to be used for
security.&lt;/p&gt;

&lt;p&gt;It is possible to extend the Rubinius code loading mechanism to support custom
formats for on-disk compiled bytecode and to load those formats. This can be
done entirely in Ruby code. If this interests you, please talk with us about
it.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Making Rubinius .rbc Files Disappear</title>
    <id>http://rubini.us/2011/03/11/making-rubinius-rbc-files-disappear/</id>
    <link rel="alternate" type="text/html" href="http://rubini.us/2011/03/11/making-rubinius-rbc-files-disappear/" />
    <updated>2011-03-11T00:00:00+00:00</updated>
    <author>
      <name>Brian Ford</name>
    </author>
    
    <content type="html">&lt;p&gt;Rubinius is rather unusual as a Ruby implementation. It both compiles Ruby
source code to bytecode &lt;em&gt;and&lt;/em&gt; saves the compiled code to a cache so it does
not need to recompile unless the source code changes. This can be great for
utilities that are run often from the command line (including IRB). Rubinius
merely reloads the cached file and runs the bytecode directly rather than
needing to parse and compile the file. Sounds like a real win!&lt;/p&gt;

&lt;p&gt;Unfortunately, it is not that simple. We need some place to store that cache
and this is where the thorns on that pretty rose start poking us in the
thumbs. The solution we have been using since forever is to store the cached
file alongside the source file in the same directory, like so:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ echo 'puts &quot;hello!&quot;' &amp;gt; hello.rb
$ ls hello.*
hello.rb
$ rbx hello.rb
hello!
$ ls hello.*
hello.rb	hello.rbc
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That doesn&amp;rsquo;t look too crazy, but it can get more complicated:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ mv hello.rb hello
$ rbx hello
$ ls hello.*
hello.compiled.rbc	hello.rbc
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Whoa, what is &lt;code&gt;hello.compiled.rbc&lt;/code&gt;? Since &lt;code&gt;hello&lt;/code&gt; did not have an extension,
we add that longer &lt;code&gt;compiled.rbc&lt;/code&gt; to make it clear which file the cache is
for. Also, note that we have that &lt;code&gt;hello.rbc&lt;/code&gt; hanging about even though the
original &lt;code&gt;hello.rb&lt;/code&gt; is gone.&lt;/p&gt;

&lt;p&gt;To summarize the issues with our caching scheme:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;It requires an additional file for every Ruby source file.&lt;/li&gt;
  &lt;li&gt;It requires some potentially complicated naming scheme to associate the
cache file with the source and not clash with other names.&lt;/li&gt;
  &lt;li&gt;Removing or renaming the Ruby source file leaves the cache file behind.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Again, the advantage of the cache file is that you do not have to wait for
Rubinius to recompile the file if you have not changed the source. Let&amp;rsquo;s see
if we can get all the advantages with none of the disadvantages. That old
saying comes to mind, &lt;em&gt;Having your cake and eating it, too&lt;/em&gt;, so we may not
be successful, but it is worth a shot.&lt;/p&gt;

&lt;p&gt;First, let&amp;rsquo;s take a step back. This issue is not unique to Rubinius. Python
has &lt;code&gt;.pyc&lt;/code&gt; and &lt;code&gt;.pyo&lt;/code&gt; files. Java has &lt;code&gt;.class&lt;/code&gt; files. C/C++ has &lt;code&gt;.o&lt;/code&gt; files.
Lots of things need a place to store a compiled or cached representation of
some data. Every SCM worth mention has some mechanism to ignore the files you
don&amp;rsquo;t want to track. The same is generally true of editors. So in some sense,
this is a solved problem. However, we have always received complaints about
the &lt;code&gt;.rbc&lt;/code&gt; files, so we thought we would try to make other, hopefully better,
solutions available.&lt;/p&gt;

&lt;h3 id=&quot;solution-1-no-cache&quot;&gt;Solution 1: No Cache&lt;/h3&gt;

&lt;p&gt;One simple solution is just to never ever ever create the compiled cache files
in any form anywhere. We have an option for that:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ls hello.*
hello.rb
$ rbx -Xcompiler.no_rbc hello.rb
hello!
$ ls hello.*
hello.rb
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Win! Not one lousy &lt;code&gt;.rbc&lt;/code&gt; file in sight. Although, that&amp;rsquo;s quite the option to
type. Never fear, we have a solution to that below.&lt;/p&gt;

&lt;p&gt;Here is our scorecard for solution 1:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt; Use when you never want any compiler cache files created. For
example, on a server where startup time is not really a concern.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt; No &lt;code&gt;.rbc&lt;/code&gt; files at all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt; Startup will be slightly slower depending on what Ruby code you are
running. It will be more noticeable in a Rails application, for example.
However, the Rubinius bytecode compiler is several times faster than it was a
couple years ago so it may not be an issue for you.&lt;/p&gt;

&lt;h3 id=&quot;solution-2-cache-database&quot;&gt;Solution 2: Cache Database&lt;/h3&gt;

&lt;p&gt;What if we could put all the compilation data in a single cache location,
something like a database? We have an option for that.&lt;/p&gt;

&lt;p&gt;This option is a little more complex, so let&amp;rsquo;s take it in two steps.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ls hello.*
hello.rb
$ rbx -Xrbc.db hello.rb
hello!
$ ls hello.*
hello.rb
$ ls -R .rbx
60

.rbx/60:
60c091c3ed34c1b93ffbb33d82d810772902d3f9
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Success! No &lt;code&gt;.rbc&lt;/code&gt; files here. But what&amp;rsquo;s with all the numbers in the &lt;code&gt;.rbx&lt;/code&gt;
directory and how did that directory get there?&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;-Xrbc.db&lt;/code&gt; option without any argument will store the compilation cache in
the &lt;code&gt;.rbx&lt;/code&gt; directory in the current working directory. The cache files
themselves are split into subdirectories to avoid creating too many entries
for the file system to handle in one directory.&lt;/p&gt;

&lt;p&gt;What if you have a special location where you would prefer all compilation
cache files be saved? No problem, just give &lt;code&gt;-Xrbc.db&lt;/code&gt; a path as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ls hello.*
hello.rb
$ rbx -Xrbc.db=$HOME/.my_special_place hello.rb
hello!
$ ls hello.*
hello.rb
$ ls -R $HOME/.my_special_place
60

/Users/brian/.my_special_place/60:
60c091c3ed34c1b93ffbb33d82d810772902d3f9
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you primarily work with projects, putting the &lt;code&gt;.rbx&lt;/code&gt; directory in the
current working directory may be the best solution because it keeps the
compilation cache with the project. It is easy to add an SCM ignore for the
directory and easy to remove the directory to clear the cache (e.g. in a clean
task).&lt;/p&gt;

&lt;p&gt;However, if you are frequently running scripts in many directories, you may
not want to litter &lt;code&gt;.rbx&lt;/code&gt; directories everywhere. In this case, putting the
directory in your &lt;code&gt;$HOME&lt;/code&gt; dir or &lt;code&gt;/tmp&lt;/code&gt; may be preferable. Additionally,
&lt;code&gt;/tmp&lt;/code&gt; may be cleared on every reboot so you will not accumulate many stale
cache files.&lt;/p&gt;

&lt;p&gt;Note that, right now, Rubinius does not clear the cache directory. It will
happily continue adding to it indefinitely. However, this may not be an issue
unless you are cycling through a bunch of Ruby files, for example, working on
a number of Ruby projects in series. In that case, using a per-project (per
current working directory) cache is probably the best option.&lt;/p&gt;

&lt;p&gt;Here is how solution 2 shakes out:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt; You want to combine all compilation cache files in one location.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt; No &lt;code&gt;.rbc&lt;/code&gt; files mixed in with the rest of your files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt; You may still need a per-project or per-working-directory cache
directory. However, you can easily specify where to put that directory.&lt;/p&gt;

&lt;h3 id=&quot;using-rbxopt-for-options&quot;&gt;Using RBXOPT for Options&lt;/h3&gt;

&lt;p&gt;As mentioned above, the &lt;code&gt;-X&lt;/code&gt; options can get a little long and you certainly
don&amp;rsquo;t want to retype them constantly. We have added support for the &lt;code&gt;RBXOPT&lt;/code&gt;
environment variable, which is an analog of the &lt;code&gt;RUBYOPT&lt;/code&gt; environment variable
that we already support.&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;RBXOPT&lt;/code&gt; to specify &lt;code&gt;-X&lt;/code&gt; options that Rubinius should use. For example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;export RBXOPT=-Xrbc.db=/path/to/dir
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can check out all the &lt;code&gt;-X&lt;/code&gt; options with &lt;code&gt;rbx -Xconfig.print&lt;/code&gt; or &lt;code&gt;rbx
-Xconfig.print=2&lt;/code&gt; for more verbose output. If you want to use multiple &lt;code&gt;-X&lt;/code&gt;
options in &lt;code&gt;RBXOPT&lt;/code&gt;, use quotes and separate the options with a space:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;export RBXOPT='-Xrbc.db -Xagent.start'
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;Rubinius saves a compilation cache for compiled Ruby code to avoid wasting
time and resources recompiling source that has not changed. However, we need
some place to store the cache. Rubinius provides options for omitting the
cache altogether or for storing it in a directory of your choosing. Note that
the format of the compilation cache is an implementation detail and we reserve
the right to change it at any time, so please don&amp;rsquo;t rely on it being in any
particular format.&lt;/p&gt;

&lt;p&gt;We have not turned on &lt;code&gt;-Xrbc.db&lt;/code&gt; by default yet because we don&amp;rsquo;t know what a
good default is. So give us feedback on your use cases and what you would find
most useful.&lt;/p&gt;

&lt;p&gt;Finally, whenever we discuss the compilation cache we are inevitably asked if
you can run directly from the cache and not use the Ruby source at all after
it has been compiled. The short answer is &amp;ldquo;Yes&amp;rdquo;, the long answer is &amp;ldquo;It
depends&amp;rdquo;. I will be writing a post exploring this question in detail shortly.
For now, get out there and write more Ruby code!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Why Use Rubinius</title>
    <id>http://rubini.us/2011/02/25/why-use-rubinius/</id>
    <link rel="alternate" type="text/html" href="http://rubini.us/2011/02/25/why-use-rubinius/" />
    <updated>2011-02-25T00:00:00+00:00</updated>
    <author>
      <name>Brian Ford</name>
    </author>
    
    <content type="html">&lt;p&gt;&lt;em&gt;Why should I use Rubinius?&lt;/em&gt; We have been asked that question many, many times
over the past four years. It is a great question. It is an important question.
It&amp;rsquo;s a &lt;em&gt;hard&lt;/em&gt; question. I&amp;rsquo;m not holding out on you. I want to give you an
answer that sates your curiosity, helps you make informed decisions, and
empowers you to speak eloquently when &lt;em&gt;you&lt;/em&gt; are inevitably asked, &amp;ldquo;Why do you
use Rubinius?&amp;rdquo;&lt;/p&gt;

&lt;p&gt;The trouble is, there are many different situations in which people use Ruby
and there is simply no answer, however comprehensive, that really speaks to
everyone&amp;rsquo;s concerns. So rather that boring you at length, I thought a &lt;em&gt;Choose
your own adventure&lt;/em&gt; style would be a better approach.&lt;/p&gt;

&lt;p&gt;From the list below, select the persona that best describes you. Don&amp;rsquo;t worry,
if the one you select doesn&amp;rsquo;t sound right, you can easily backtrack here. Read
as many as interest you. After all, none of us fit easily into any one box.
When you are done exploring all the fascinating reasons to use Rubinius, let&amp;rsquo;s
meet up at the &lt;a href=&quot;#wur-conclusion&quot;&gt;Conclusion&lt;/a&gt; for some parting
words.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Enjoy!&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;&lt;a class=&quot;anchor_title&quot; name=&quot;wur-personas&quot;&gt;Choose Your Persona&lt;/a&gt;&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;#wur-newby&quot;&gt;Rails or Ruby Newby&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#wur-creative&quot;&gt;The Creative&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#wur-experienced&quot;&gt;Experienced Programmer&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#wur-seasoned&quot;&gt;Seasoned Programmer&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#wur-academic&quot;&gt;Academic Researcher&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#wur-uber&quot;&gt;Über Programmer&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#wur-philosophical&quot;&gt;Philosophy Student Seeking the Meaning of Ruby&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#wur-manager&quot;&gt;Manager&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#wur-knowledge&quot;&gt;Knowledge Seeker&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#wur-enthusiast&quot;&gt;Language Enthusiast&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;&lt;a class=&quot;anchor_title&quot; name=&quot;wur-newby&quot;&gt;Rails or Ruby Newby&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;You are pretty new to programming and after hearing about Ruby on Rails you
watched a screencast and made a website. You are curious and enthusiastic.&lt;/p&gt;

&lt;p&gt;You are the empty teacup of the Zen proverb. You are a fresh-faced flower
glistening with the morning dew. The sun smiles on you and you smile back.
You seem to like this Ruby language that makes programmers happy and you&amp;rsquo;ve
come to lend your cheery spirit&amp;hellip;&lt;/p&gt;

&lt;p&gt;Welcome!&lt;/p&gt;

&lt;p&gt;So, you have heard of this thing called Rubinius or rbx or whatever and some
folks you respect or admire seem to like it and naturally you want to know
what the big deal is and you&amp;rsquo;re like, &amp;ldquo;Yo, why would I use Rubinius?&amp;rdquo;.&lt;/p&gt;

&lt;p&gt;Cool.&lt;/p&gt;

&lt;p&gt;Well, you should use Rubinius because I said so. Try your code on it. Tell us
what worked for you. Tell us if something didn&amp;rsquo;t work by opening an
&lt;a href=&quot;https://github.com/rubinius/rubinius/issues/&quot;&gt;issue&lt;/a&gt;.
Set your imagination loose and tell us what tool you would use if you could.&lt;/p&gt;

&lt;p&gt;Spend some time reading the Rubinius source code. Start at the &lt;code&gt;kernel/&lt;/code&gt;
directory. It&amp;rsquo;s full of Ruby code! As you read through how Ruby is
implemented, how it actually works, it will give you a level of understanding
of your code that many programmers don&amp;rsquo;t have in &lt;em&gt;any&lt;/em&gt; language.&lt;/p&gt;

&lt;p&gt;Most of all, hang on to your curiosity and enthusiasm. Those were vital to the
creation of the Rubinius project in the beginning and have sustained us
through many challenges. We &lt;em&gt;can&lt;/em&gt; make our Ruby experience better, freeing us
from the shackles of other languages and foreign libraries. We &lt;em&gt;can&lt;/em&gt; have fast
and reliable web servers, games, editors, websites and applications written in
Ruby. We &lt;em&gt;can&lt;/em&gt; have first class tools written for and with Ruby. The world
&lt;em&gt;can&lt;/em&gt; be rosy red without our glasses.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#wur-personas&quot;&gt;&lt;strong&gt;Back to personas&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;&lt;a class=&quot;anchor_title&quot; name=&quot;wur-creative&quot;&gt;The Creative&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;Ruby is groovy. No, not that Groovy, eww, no. I mean:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;groovy |ˈgroōvē| adj.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;fashionable and exciting : &lt;em&gt;sporting a groovy new haircut&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;enjoyable and excellent : &lt;em&gt;he played all the remarkably groovy guitar parts
himself&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(Apple's dashboard dictionary widget.)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ruby respects creativity. It has an &lt;em&gt;aesthetic&lt;/em&gt;. You don&amp;rsquo;t just write Ruby
code, you write &lt;em&gt;beautiful&lt;/em&gt; Ruby code.  It would be unthinkable to do
otherwise. Sure, there is more than one way to do many things. This is not
some sterile laboratory. We are not automatons; we are people. Of course,
being utilitarian is not bad. But other languages have that angle pretty
well covered. There is probably only one right way to implement Python.&lt;/p&gt;

&lt;p&gt;Rubinius has an aesthetic, too: excellence, utility, simplicity, beauty, joy.
Mostly in that order. Useful code that isn&amp;rsquo;t of very good quality is a drag.
It slows you down. It gives you a headache. It drives you away. We strive to
keep it out of Rubinius. On the other hand, we are not just writing sonnets
here. This is Serious Business™. We have some hard-core problems to solve. So
we strive for excellent, useful, beautiful code that is a joy to work with.&lt;/p&gt;

&lt;p&gt;Of course, this is an ongoing process. It is a journey, not a destination.
There are areas of Rubinius that could use a thorough cleaning or a new
perspective on making the implementation of this beautiful object-oriented
language more beautiful and object-oriented.&lt;/p&gt;

&lt;p&gt;We welcome your artistic perspective. Help us improve the dialog between
Rubinius and the person using it. The command line doesn&amp;rsquo;t have to be a
desolate place of obscure, condescending error messages. Web interfaces to the
diagnostic tools deserve a good dose of user-experience and interaction
design. You know that feeling you get when looking at an Enterprise web
application? That weird plastic-masquerading-as-quality-material feeling?
The too much 1996-Enterprise-faux-rounded-corner-wanabe-2006-hip gloss?
Gives me the willies whenever I have to use an app like that. Yeah, we don&amp;rsquo;t
want that.&lt;/p&gt;

&lt;p&gt;We want to create tools that are powerful, graceful, easy to use, and
beautiful to look at. Beautiful tools are easier to use. (Yehuda Katz provided
a couple links related to this: &lt;a href=&quot;https://www.westga.edu/~distance/ojdla/winter134/david_glore134.html&quot;&gt;The Impact of Design and Aesthetics on
Usability, Credibility, and Learning in an Online Environment
&lt;/a&gt; and
&lt;a href=&quot;http://www.alistapart.com/articles/indefenseofeyecandy&quot;&gt;In Defense of Eye
Candy&lt;/a&gt;. If you know of
other research, leave us a comment.) So if you have a creative bent but enjoy
writing code also, try out Rubinius and let us know where it could use some
polish.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#wur-personas&quot;&gt;&lt;strong&gt;Back to personas&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;&lt;a class=&quot;anchor_title&quot; name=&quot;wur-experienced&quot;&gt;Experienced programmer&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;That saying, &lt;em&gt;Time is Money&lt;/em&gt;, you live by it. You have applications to deliver
and you choose the best tool for the job. You are professional, conscientious,
duly cautious, and not inclined to episodes of emotional exuberance about the
latest fad. You accept compromises. There are always trade-offs. The correct
approach is cost-benefit analysis. The numbers tell the story and level-headed
decision making follows the numbers.&lt;/p&gt;

&lt;p&gt;You have heard about Rubinius and you are curious whether it may be
appropriate for your current project. As usual, rather than speculating or
paying too much heed to the buzz, you look into it yourself. After some
investigation, you discover that:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Much of Rubinius is implemented in Ruby itself. This may be a big help when
tracking down troublesome bugs.&lt;/li&gt;
  &lt;li&gt;Rubinius has a very fast bytecode virtual machine, as well as a modern
generational garbage collector so memory profiles should be more
predictable and consistent in deployed applications.&lt;/li&gt;
  &lt;li&gt;It has a profile-driven JIT compiler that uses type-feedback to
aggressively inline methods resulting in significant performance
improvements.&lt;/li&gt;
  &lt;li&gt;It has a built-in debugger and precise method profiler, both of which are
fast due to being well integrated.&lt;/li&gt;
  &lt;li&gt;It has a built-in API for monitoring a VM out-of-process, even on a remote
machine. We are building a variety of diagnostic tools atop this API.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Of course, even if the technology in Rubinius sounds terrific in theory, how
suitable is Rubinius for your application? How does it perform under your
specific constraints? Again, you do some investigating. You have a solid test
suite for your application, so you start by running that. If you hit any
problems, please open an &lt;a href=&quot;https://github.com/rubinius/rubinius/issues/&quot;&gt;issue&lt;/a&gt;
to let us know.&lt;/p&gt;

&lt;p&gt;If everything goes well with the tests, you start running some of the
benchmarks that you have accumulated while doing performance tuning. Of
course, no sensible person asks for benchmark results from &lt;em&gt;other&lt;/em&gt; people&amp;rsquo;s
code. That defies logic. It&amp;rsquo;s like asking if your program will run because
your Aunt Mabeline likes decaf coffee. It&amp;rsquo;s contrary to the very point of
benchmarking, where you are trying to correlate two values that are connected.&lt;/p&gt;

&lt;p&gt;Again, if you note an significant issues, please let us know. Sometimes
Rubinius exposes issues in existing code. Performance characteristics of real
applications are vital to making Rubinius faster. Also, if you have
suggestions for tools you would like to use, tell us. If you just want to
chat about the technology, that&amp;rsquo;s fine, too. We&amp;rsquo;re hanging out in the
#rubinius channel on freenode.net.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#wur-personas&quot;&gt;&lt;strong&gt;Back to personas&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;&lt;a class=&quot;anchor_title&quot; name=&quot;wur-seasoned&quot;&gt;Seasoned programmer&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;Well, I am being kind by saying &lt;em&gt;seasoned&lt;/em&gt;. You know when you look in the
mirror that &lt;em&gt;jaded&lt;/em&gt; and &lt;em&gt;cynical&lt;/em&gt; are much more apt. You&amp;rsquo;ve seen it all and it
has worn you down. You&amp;rsquo;ve been fighting the good fight, carefully guarding
that last flicker of optimism that burns in the secret place deep in your
heart. You&amp;rsquo;ve programmed Java/.NET/C++ professionally. You&amp;rsquo;ve even sucked it
up and written some PHP and Python when asked; you are a professional, they
ask and you deliver. You&amp;rsquo;ve seen attacked servers on fire off the shoulder of
Rackspace&amp;hellip;&lt;/p&gt;

&lt;p&gt;Rubinius has a lot to offer you. Remember that little flicker of optimism?  It
is only the idealists that get ground down by the complete indifference to
pursuit of an ideal in so much of the world. Deep down, you are an idealist
and you will find plenty to refresh you here.&lt;/p&gt;

&lt;p&gt;Rubinius aims to be the best possible implementation of Ruby by putting Ruby
itself front and center. We are using modern technology and always improving.
We change when there is a better way to do things. We judiciously rewrite and
are not too attached to any code or algorithm. The legacy Enterprise isn&amp;rsquo;t on
the steering committee. Our work will be done when you can use Ruby, just
Ruby, to solve your thorny problems.&lt;/p&gt;

&lt;p&gt;Sure, that sounds idealistic. But never mind the pessimists that tell you that
you have to compromise. If you are not idealistic, you will not be unsatisfied
with things that are not as good as they could be; you will not try to change
the world. So give Rubinius a try, you may be surprised. And if you are, put
all that hard-earned wisdom you have gained to use for the betterment of Ruby.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#wur-personas&quot;&gt;&lt;strong&gt;Back to personas&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;&lt;a class=&quot;anchor_title&quot; name=&quot;wur-academic&quot;&gt;Academic Researcher&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;Forgive me for staring, I know it is impolite. I&amp;rsquo;m just&amp;hellip; intrigued. Of
course, you know Ruby is a late bound language, every message sent could
conceivably fail to find a target, potentially resulting in an uncaught
exception and program termination. There&amp;rsquo;s shared state, wild orgies of
mutation that disallow any reasonable attempt at automated parallelization.
Program proof is as oxymoronic a concept as military intelligence. It&amp;rsquo;s a very
messy affair of programming and meta-programming and meta-meta-programming,
which, for the love of Lisp, could be done so simply with macros. There&amp;rsquo;s all
this eager evaluation and complete disregard for purity. Despite vast odds,
somehow programs are written that actually run. You have noted all this with
great objectivity but you are nonetheless interested.&lt;/p&gt;

&lt;p&gt;Excellent, we are pleased. We have much to learn and welcome the opportunity
for lively discussions about bringing formal methods to bear on the problems
of making Ruby as fast as possible.&lt;/p&gt;

&lt;p&gt;Java benefited tremendously from the amount of attention it received by
academic researchers. Ruby can benefit from some of this research as well, not
to mention the research into Smalltalk and Self that preceded it. But Ruby has
its own set of problems to solve and deserves specific attention. The problems
are hard but not insurmountable. Rubinius is already demonstrating that.  The
suggestion that we need to add more keywords, restrict Ruby dynamism, or write
&lt;code&gt;public static final int&lt;/code&gt; all over are simply nonsense.&lt;/p&gt;

&lt;p&gt;Rubinius already leverages research for fast virtual machines, garbage
collection (e.g. the generational approach and the Immix &lt;em&gt;mark-region&lt;/em&gt;
algorithm), and JIT compilers (based on pioneering research done in Self and
used in the JVM Hotspot VM). Rubinius uses the exceptional
&lt;a href=&quot;http://llvm.org&quot;&gt;LLVM&lt;/a&gt; project for optimization and code generation in the
JIT compiler. We are also working on better infrastructure for the JIT to
address Ruby complexities head-on.&lt;/p&gt;

&lt;p&gt;Rubinius would be excellent to use in teaching. A compiler construction class
could study the architecture of the bytecode compiler written in Ruby and
experiment with exploratory changes to the compiler using IRB without having
to recompile anything! A 30-minute introduction to Rubinius could proceed
immediately to simple AST generation and have students experimenting with
their own syntax immediately. While it is easy to get started, there is plenty
of depth for exploring complex topics in virtual-machine construction and
garbage collection.&lt;/p&gt;

&lt;p&gt;Whether you are interested in language research or language pedagogy, Rubinius
is an great project to consider. We look forward to hearing from you.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#wur-personas&quot;&gt;&lt;strong&gt;Back to personas&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;&lt;a class=&quot;anchor_title&quot; name=&quot;wur-uber&quot;&gt;Über programmer&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;You learned the untyped lambda calculus sitting on your mother&amp;rsquo;s knee while
she worked on her doctorate in computer science. You were substituting terms
before you even uttered the word, &amp;ldquo;dada&amp;rdquo;. You wrote three different Lisp
implementations in Commodore Basic before you were seven. You can write
multi-threaded web servers in one pass with no tests and never hit a deadlock
or critical data race. You write parsers and compilers for odd languages on a
Friday night for the heck of it while waiting for the pizza to arrive before a
night out at the karaoke bar where you give an inspiring performance of Laga
Gaga&amp;rsquo;s &lt;em&gt;Poker Face&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;(&lt;em&gt;Loooong pause&lt;/em&gt;. You&amp;rsquo;re not reading this. You&amp;rsquo;ve already written one or a few
languages on Rubinius and posted them to our
&lt;a href=&quot;http://rubini.us/projects/&quot;&gt;Projects&lt;/a&gt; page. But anyway, I&amp;rsquo;ll continue&amp;hellip;)&lt;/p&gt;

&lt;p&gt;You are the Luke Skywalker of Ruby; Yoda has nothing more to teach you. Only
your fate confronts you now. Use the Source Luke and save the Federation of
Ruby loyalists from the Evil Oracle and its Java the Hurt.&lt;/p&gt;

&lt;p&gt;There are a number of domains in which Ruby could benefit tremendously from
excellent libraries:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Servers and web servers&lt;/strong&gt;: the web is here to stay but the argument that all
applications are going to be in Javascript on the client is not valid. A variety
of hybrid client-server architectures will continue to be the norm. We need
software that enables application authors to build a suitable solution to
their particular problems rather than trying to stuff their apps into
someone else&amp;rsquo;s solution with layers of wrapping.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Concurrency&lt;/strong&gt;: multi-core is here to stay but it is not only functional
programming that is suitable for high-concurrency applications.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Graphical user interface&lt;/strong&gt;: the web browser is also here to stay but it is
not the last word in applications. There are many cases where GUI apps are
the best option and Ruby needs a mature library or set of libraries to
build these apps on any major platform. I know some of these libraries
exist, but they seem to be collecting dust lately.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Big data and data analysis libraries&lt;/strong&gt;: our industry repeatedly witnesses
the same pattern: domain X starts with huge applications running on huge
horsepower servers for huge businesses and then it starts appearing in small
applications on small computers for small businesses. Accounting and
geographic information systems (GIS) are two examples. Data analysis is
coming to a laptop near you.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These are general areas in which Ruby can be an excellent solution. So how
does Rubinius fit in? Rubinius is dedicatedly pushing more and more into Ruby
itself. Each of these domain is typically handled in Ruby right now by going
to find a library in a foreign language to wrap in a fuzzy Ruby embrace.
Rubinius is calling on the über-programmers of the world to implement
solutions in Ruby to help us identify performance challenges and address them.&lt;/p&gt;

&lt;p&gt;Rubinius is also being used in some fascinating language experiments. Two of
these are Atomo (&lt;a href=&quot;http://atomo-lang.org&quot;&gt;http://atomo-lang.org&lt;/a&gt; which is
implemented in Haskell, with a Rubinius implementation code-named
&lt;a href=&quot;https://github.com/vito/quanto/&quot;&gt;quanto&lt;/a&gt;) and Fancy
(&lt;a href=&quot;http://fancy-lang.org&quot;&gt;http://fancy-lang.org&lt;/a&gt;). So, if language design is
your cup of tea, Rubinius offers an excellent platform for experimentation.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#wur-personas&quot;&gt;&lt;strong&gt;Back to personas&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;&lt;a class=&quot;anchor_title&quot; name=&quot;wur-philosophical&quot;&gt;Philosophy Student Seeking the Meaning of Ruby&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;Like your persona description, you tend to be long winded. You find most
descriptions too brief, almost dismissive. There are words and words should be
used to delve into the minutiae of minutiae. You, more than anyone, want to
know &amp;ldquo;Why?&amp;rdquo; with every fiber of your being. You will continue asking long
after the supply of hallucinogens has been exhausted and everyone else is
drooling in their sleep.&lt;/p&gt;

&lt;p&gt;For you, Rubinius is an existential dilemma crying out for justification. If
we already have MRI, why build Rubinius?&lt;/p&gt;

&lt;p&gt;It would be accurate to say that Rubinius has a philosophy. That philosophy is
simply this: &lt;em&gt;Ruby should be a first class language&lt;/em&gt;. What does that mean?
Simply that it should be possible to solve problems writing Ruby code.&lt;/p&gt;

&lt;p&gt;Let&amp;rsquo;s consider libraries: Being first class means not having to wrap a Java
library or build a C extension. If wrapping the library were the end of the
story, it wouldn&amp;rsquo;t be so bad. But that is &lt;em&gt;never&lt;/em&gt; the case. Libraries have
bugs, weird APIs, incompatibility with other libraries, threading issues, and
disappearing maintainers. They may even be incompatible with newer versions of
the language in which they are written.&lt;/p&gt;

&lt;p&gt;This list goes on. To address any one of these issues requires delving into a
different language with weird and incompatible semantics. If the library is
your core competency, that&amp;rsquo;s not such a big deal. But I will wager that it is
not, which is why you are using the library in the first place. Also, the
language in which you are wrapping the library (Ruby here) is not likely the
core competency of the library author, or you probably wouldn&amp;rsquo;t need to be
wrapping it. So Ruby wrapping one of these libraries will always be a
second-class citizen. Decisions will be made about the library&amp;rsquo;s API that do
not give one thought to the Ruby programs using it. Furthermore, the code
written in that foreign language does nothing to support the ecosystem of
Ruby. The knowledge gained in writing the library and the improved skills of
the library author do not benefit Ruby. Ruby deserves better.&lt;/p&gt;

&lt;p&gt;Ruby has gotten a big boost recently with the production release of MRI 1.9.2.
There are significant speed improvements and welcomed additions to the core
libraries, like powerful handling of String encodings. At the same time, the
Complex and Rational libraries were added to the core library and rewritten
from Ruby to C code. This is disappointing. We should be able to solve these
problems more effectively in Ruby itself.&lt;/p&gt;

&lt;p&gt;The philosophy of Rubinius is to make Ruby a first-class citizen. Ruby plays
second fiddle to no one. There is no other language whose history, semantics,
or vested interests compete with Ruby&amp;rsquo;s. It is true that there are difficult
problems to solve in making Ruby fast. But much of the technology already
exists and we will build what does not. Evan often quips that if we can get
Rubinius caught up to the dynamic language technology of ten years ago, Ruby
will be light-years ahead.  That may be overstating how far behind Ruby is,
but it illustrates the focus of Rubinius.&lt;/p&gt;

&lt;p&gt;There&amp;rsquo;s the saying, &lt;em&gt;In theory, there is no difference between theory and
practice. In practice, there is&lt;/em&gt;. In Rubinius, theory and practice are
merging. We are motivated by the desire for Ruby to be a first-class language.
But we are also showing real progress in making that a reality. The Rubinius
VM executes Ruby code blazingly fast. The JIT compiler, while still being
quite young, is showing great promise. Compatibility with MRI is quite good
and speed is constantly improving.&lt;/p&gt;

&lt;p&gt;Is the Rubinius philosophy valid? We think the proof is in the pudding.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#wur-personas&quot;&gt;&lt;strong&gt;Back to personas&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;&lt;a class=&quot;anchor_title&quot; name=&quot;wur-manager&quot;&gt;Manager&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;No, it did not cross my mind to describe this persona as Pointy-haired Boss.
Not only would that be unfair to Dilbert, but that persona would be reading an
article on Web Scale. No, you are someone who has fought hard battles in the
trenches and learned valuable lessons: it&amp;rsquo;s about execution and execution
depends on good technology.&lt;/p&gt;

&lt;p&gt;Rubinius is building solid technology. We started the RubySpec project and
have contributed tens of thousands of lines of code to it. With the support of
Rubyspec, in just over four years as a public project, we have basically
caught up with MRI 1.8.7 in compatibility and performance. For some code, our
performance is much better, for other code, it is not as good. However,
Rubinius is built on solid, modern technology and the project&amp;rsquo;s trajectory and
velocity are outstanding.&lt;/p&gt;

&lt;p&gt;Rubinius is a completely new implementation of core Ruby. Rubinius did not
start as a port of existing code. Furthermore, Rubinius implements its own
virtual machine and garbage collector in C++. The bytecode compiler that
targets the virtual machine is pure Ruby. The core Ruby library is mostly Ruby
with some primitive operations in C++. The JIT compiler uses the
&lt;a href=&quot;http://llvm.org&quot;&gt;LLVM&lt;/a&gt; project. Given the amount of work being done in the
project, Rubinius is pacing extremely well relative to other implementations.&lt;/p&gt;

&lt;p&gt;Currently, we are working on support for Ruby 1.9 features, Windows support,
and full concurrency with no global interpreter lock (GIL).&lt;/p&gt;

&lt;p&gt;If you are looking at Ruby to implement your next project, rest assured that
Ruby will have the support of excellent technology. If you are already using
Ruby, consider investigating how your application runs on Rubinius. We welcome
the feedback and look forward to solving challenging engineering problems.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#wur-personas&quot;&gt;&lt;strong&gt;Back to personas&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;&lt;a class=&quot;anchor_title&quot; name=&quot;wur-knowledge&quot;&gt;Knowledge Seeker&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;You thirst for Knowledge. You follow it wherever it leads you. You&amp;rsquo;ll happily
walk Haskell&amp;rsquo;s hallowed halls of pure laziness or sit at the feet of the
meta-program gazing raptly at class transmorgrification. You don&amp;rsquo;t judge. You
have more than enough knowledge to be dangerous, enough to know that the
universe is amoral and knowledge is the only Truth there is. Nor does any mere
mortal language bind you. All languages are finite. You&amp;rsquo;ll be here today and
gone tomorrow; there is no permanence for the knowledge seeker.&lt;/p&gt;

&lt;p&gt;Rubinius is merely a step along the path you journey. Take what you want, it
is all free. As a Ruby implementation, it has much to offer your quest for
knowledge. The Ruby code in the core library is accessible and easy to follow.
The interface between Ruby and the C++ primitives is consistent. The C++ code
itself is restrained. You won&amp;rsquo;t need a PhD in Turing-complete template
languages to understand it.&lt;/p&gt;

&lt;p&gt;Rubinius offers extensive opportunities to learn about programming languages
in general and Ruby in particular. When I first started working with Rubinius,
I knew a little bit about garbage collection and virtual machines. I would
call what I knew, toy knowledge. As I struggled to learn more, it seemed
helpful to consider layers of understanding:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;General programming language semantics&lt;/strong&gt;: the procedure abstraction,
looping and iteration, recursion, references and values, etc.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Ruby semantics&lt;/strong&gt;: modules and classes, access restrictions, blocks and
lambdas, etc. Even with fundamental programming knowledge, a particular
language can be confusing. When I was learning C, a friend was also
studying it. One day he walked over and threw &lt;em&gt;The C Programming Language&lt;/em&gt;
book down on my desk and said, &amp;ldquo;This &lt;code&gt;for&lt;/code&gt; loop makes no sense!&amp;rdquo; He was
quite upset. &amp;ldquo;Look,&amp;rdquo; he said, &amp;ldquo;in this example &lt;code&gt;for (i=0; i &amp;lt; n; i++)&lt;/code&gt; how
can &lt;code&gt;i &amp;lt; n&lt;/code&gt; get executed &lt;em&gt;after&lt;/em&gt; the code in the body?!&amp;rdquo; It&amp;rsquo;s easy to laugh
at that confusion, but coming from BASIC, that really threw him. Deepening
our understanding to this second level requires confronting some
&amp;ldquo;counter-intuitive&amp;rdquo; notions.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Hypothetical implementation&lt;/strong&gt;: knowing how Ruby works, how might one
implement it. I think this is an important layer of understanding and it is
easy to miss or gloss over it. By pausing at this layer and thinking how
you might implement something, you test whether or not you are really
understanding it.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;The MRI implementation&lt;/strong&gt;: Reading the MRI source code is an excellent way
to investigate Ruby. For one thing, it will inform you how Ruby &lt;em&gt;actually&lt;/em&gt;
works, and you may be surprised.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;The Rubinius implementation&lt;/strong&gt;: here you are exposed to the philosophy of
Rubinius and the challenges to implementing Ruby. We are attempting to
bring the beauty of Ruby as an object-oriented language deep into the core
of Ruby itself.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;While the Rubinius code itself offers many opportunities for learning, don&amp;rsquo;t
hesitate to drop by the #rubinius channel on freenode.net and ask us
questions. Perhaps you already know a lot about another language and are
interested in how Rubinius implements some feature. Or you may be relatively
new to programming languages and have some basic questions. We enjoy talking
about these concepts. If you are quite new to Rubinius, you may find these
posts informative:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.engineyard.com/blog/2010/making-ruby-fast-the-rubinius-jit/&quot;&gt;Making Ruby Fast: The Rubinius JIT&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.engineyard.com/blog/2009/improving-the-rubinius-bytecode-compiler/&quot;&gt;Improving the Rubinius Bytecode Compiler&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.engineyard.com/blog/2009/the-anatomy-of-a-ruby-jit-compile/&quot;&gt;Compiling Ruby: From Text to Bytecode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finally, consider helping other knowledge seekers by writing blog posts on
what you learn about Rubinius. Or, help us &lt;a href=&quot;http://rubini.us/doc/en/how-to/write-documentation/&quot;&gt;write documentation&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#wur-personas&quot;&gt;&lt;strong&gt;Back to personas&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;&lt;a class=&quot;anchor_title&quot; name=&quot;wur-enthusiast&quot;&gt;Language Enthusiast&lt;/a&gt;&lt;/h4&gt;

&lt;p&gt;You like languages for their intrinsic value. Of course the world comes in
many shapes and sizes. You wouldn&amp;rsquo;t have it any other way. That&amp;rsquo;s the fun and
spice, joie de vivre, raison d&amp;rsquo;etre, supermarché&amp;hellip; Sometimes you get carried
away writing a program in another language just because you like how the
letters arrange down the screen. Ruby is definitely one of the impressive
languages and sometimes you almost notice a tiny bit of favoritism in your
normally egalitarian attitude.&lt;/p&gt;

&lt;p&gt;As with any enthusiast, you like to experiment. Your interest is not mere
curiosity or sterile investigation. You want to get your feet wet and your
hands dirty. Rubinius is an excellent opportunity to delve into a number of
fascinating subjects. We can merely suggest a path; your experiences along the
way will tell you whether or not Rubinius has value to you.&lt;/p&gt;

&lt;p&gt;If you are most interested in languages themselves, the syntax and arrangement
of features, Rubinius offers you immediate gratification. Look for Evan&amp;rsquo;s
upcoming post on his Language Toolkit or check out the code to
&lt;a href=&quot;https://github.com/evanphx/prattle&quot;&gt;prattle&lt;/a&gt;, a Smalltalk dialect used to
illustrate the ease of building a language on Rubinius. Also look at some of
the existing languages &lt;a href=&quot;http://rubini.us/projects/&quot;&gt;projects&lt;/a&gt; targeting
Rubinius.&lt;/p&gt;

&lt;p&gt;If it is the machinery under the covers that is more interesting, start
reading some code. The bytecode compiler lives in &lt;code&gt;lib/compiler/&lt;/code&gt;. The virtual
machine is in &lt;code&gt;vm/&lt;/code&gt;, and the garbage collector is in &lt;code&gt;vm/gc&lt;/code&gt;. As you are
reading through, consider helping us write better documentation. There are
already sections for the &lt;a href=&quot;http://rubini.us/doc/en/virtual-machine/&quot;&gt;virtual
machine&lt;/a&gt;,
&lt;a href=&quot;http://rubini.us/doc/en/garbage-collector/&quot;&gt;garbage-collector&lt;/a&gt;, &lt;a href=&quot;http://rubini.us/doc/en/jit/&quot;&gt;JIT
compiler&lt;/a&gt; and &lt;a href=&quot;http://rubini.us/doc/en/bytecode-compiler/&quot;&gt;bytecode
compiler&lt;/a&gt; in the documentation, so
adding content is easy.&lt;/p&gt;

&lt;p&gt;You may also be interested in these previous posts about Rubinius:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.engineyard.com/blog/2010/rubinius-wants-to-help-you-make-ruby-better/&quot;&gt;Rubinius wants to help YOU make Ruby better&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.engineyard.com/blog/2009/5-things-youll-love-about-rubinius/&quot;&gt;5 Things You&amp;rsquo;ll Love About Rubinius&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.engineyard.com/blog/2009/rubinius-the-book-tour/&quot;&gt;Rubinius: The Book Tour&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most of all, experiment. Rubinius is easy to hack on. Are you curious about a
particular feature needed in your language? Try adding it to Rubinius. Think
Lua is all the rage because it uses a register VM? You could probably write a
register-based bytecode interpreter for Rubinius in an afternoon. That&amp;rsquo;s just
an example, of course. The point is to play around with your ideas and have
fun doing it. I think you&amp;rsquo;ll find Rubinius to be an adventuresome companion.&lt;/p&gt;

&lt;p&gt;Be sure to let us know what you&amp;rsquo;re working on. We like to be inspired, too!
Consider writing a blog post about things that you find interesing, like this
&lt;a href=&quot;http://yehudakatz.com/2011/02/18/getting-comfortable-with-rubinius-pure-ruby-internals/&quot;&gt;recent post&lt;/a&gt; by Yehuda Katz.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;#wur-personas&quot;&gt;&lt;strong&gt;Back to personas&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;&lt;a class=&quot;anchor_title&quot; name=&quot;wur-conclusion&quot;&gt;Conclusion&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;So there you have it. Just like there are many different viewpoints, there are
many different reasons to use Rubinius. Not all those reasons make sense to
everyone. We believe, however, that Rubinius has something to offer to just
about everyone interested in Ruby. Most importantly, try it!&lt;/p&gt;

&lt;p&gt;If we didn&amp;rsquo;t answer your question here, leave us a comment. If you have a
reason for using Rubinius that we didn&amp;rsquo;t mention, let us know. As always, we
appreciate your feedback. Chat with us in the #rubinius channel on
freenode.net, &lt;a href=&quot;https://github.com/rubinius/rubinius&quot;&gt;watch our Github project&lt;/a&gt;,
and &lt;a href=&quot;http://twitter.com/rubinius&quot;&gt;follow us on Twitter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;P.S. Thanks to David Waite for suggesting the Academic Researcher and Language
Enthusiast personas, I always forget those!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Introduction to Fancy</title>
    <id>http://rubini.us/2011/02/23/introduction-to-fancy/</id>
    <link rel="alternate" type="text/html" href="http://rubini.us/2011/02/23/introduction-to-fancy/" />
    <updated>2011-02-23T00:00:00+00:00</updated>
    <author>
      <name>Christopher Bertels</name>
    </author>
    
    <content type="html">&lt;p&gt;Fancy is a new general-purpose programming language targetting the
Rubinius VM.&lt;/p&gt;

&lt;p&gt;This blog post will give a short introduction to the language, what
kind of problems it&amp;rsquo;s trying to solve and why I chose Rubinius as the
VM to run Fancy on.&lt;/p&gt;

&lt;h3 id=&quot;what-is-fancy&quot;&gt;What is Fancy?&lt;/h3&gt;

&lt;p&gt;Fancy is a new general-purpose, dynamic, pure object-oriented
programming language heavily inspired by Ruby, Smalltalk and Erlang
that runs on the Rubinius VM. It&amp;rsquo;s the first fully bootstrapped
language, aside from Ruby, running on Rubinius. This means that the
compiler that generates bytecode for Rubinius is written in Fancy
itself.&lt;/p&gt;

&lt;p&gt;You can think of Fancy as a mix of features from the mentioned
languages above, taking each of their strengths and improving upon
their weaknesses.
Fancy has a very small core and is largely based on the concept of
message passing, just like Smalltalk. It tries to have as many
language concepts being first-class values in the language.&lt;/p&gt;

&lt;p&gt;Just like Ruby, Fancy is a dynamic object-oriented language that
allows changing code at runtime, everything being an expression and
generally embracing more then one way to do things. Fancy also has all
the literal support that Ruby has, plus literal syntax for Tuples and
Patterns (more on that below).&lt;/p&gt;

&lt;p&gt;In contrast to Ruby and just like Smalltalk, Fancy has a very small
amount of built-in keywords and all of the control structures are
implemented in terms of message sends to objects using closures.&lt;/p&gt;

&lt;p&gt;The third language that served as an inspiration is Erlang, from which
Fancy takes the idea that concurrent programming should be easy by
having the Actor Model built into the language. This part is still a
work in progress, but should come together soon. The fact that
Rubinius has a built-in Channel type, inter-VM communication
capabilities and even an actor library makes implementing this easier
than in traditional systems.&lt;/p&gt;

&lt;h3 id=&quot;why-fancy&quot;&gt;Why Fancy?&lt;/h3&gt;

&lt;p&gt;I believe there is real value in having a language that supports
certain things out of the box. Especially when it comes to things like
asynchronous and concurrent programming, having proper semantics built
into the language can often help developers more than a library can.
Very often it&amp;rsquo;s not just about the functionality itself but also about
the semantics you want that functionality to have. This can cause
problems particularly if the language&amp;rsquo;s semantics differ from what
your library is trying to solve. A good example is the callback-based
approach to asynchronous progamming which leads to code that differs
both in semantics as well as how code is structured, compared to
synchronous code. Ideally you&amp;rsquo;d still want to write code in a
synchronous fashion, where exceptions pop up naturally while still
being highly asynchronous.&lt;/p&gt;

&lt;p&gt;In that sense Fancy is more flexible than Ruby as there&amp;rsquo;s not many
special case semantics built in to the core language. Everything&amp;rsquo;s
done via message passing, which fits nicely the actor model approach
to concurrency. Fancy&amp;rsquo;s syntax is a lot simpler, too.&lt;/p&gt;

&lt;p&gt;Since all the core control structures are just implemented in Fancy
itself and adhere to the message passing protocol, you can easily
override them for your personal needs. This is especially interesting
when implementing domain specific languages.
Say, you&amp;rsquo;d want to add some logging to conditional or looping
constructs - it&amp;rsquo;s as easy as overriding a method in your DSL&amp;rsquo;s
classes. Fancy also has class-based mixins, so it makes it easy to
share functionality across class hierarchy boundaries.&lt;/p&gt;

&lt;p&gt;Finally, I created Fancy because I wanted a language implementation
that was well documented, easy to understand and very flexible to
extend. Ruby is a nice language, but it has some inconsistencies and
there&amp;rsquo;s only so much you can do when you&amp;rsquo;re bound by backwards
compatibility. By starting fresh, Fancy has a clean, simple and easy
to extend core which allows further exploration of features and
abstractions.&lt;/p&gt;

&lt;h3 id=&quot;why-target-rubinius&quot;&gt;Why target Rubinius?&lt;/h3&gt;

&lt;p&gt;The initial implementation of Fancy was a simple interpreter written
in C++, similar to how Ruby 1.8 (MRI) works. It was a simple AST
walker. After moving to Rubinius and writing an initial bootstrap
compiler in Ruby, the codebase shrank to about 20% of the original
implementation while actually being more performant. This of course is
mostly due to Rubinius&amp;rsquo; architecture and JIT compiler but it was a
great experience nontheless.&lt;/p&gt;

&lt;p&gt;The nice part about having a common virtual machine and runtime is
that you&amp;rsquo;re not forced to a completely different platform to get the
job done. Fancy and Ruby can coexist in the same application nicely
and calling code from one another is dead simple. In fact, as of now,
Rubinius doesn&amp;rsquo;t know anything about Fancy. And it shouldn&amp;rsquo;t. As long
as all languages running on top of it adhere to the same interface
(in this case the bytecode), it should just work fine.&lt;/p&gt;

&lt;p&gt;Choosing Rubinius as a successor platform for Fancy was easy. It&amp;rsquo;s
built for Ruby, a language that&amp;rsquo;s closely related to Fancy. Rubinius,
while having been developed as a VM for running Ruby code, is very
flexible and there are many features that abstract over Ruby&amp;rsquo;s
external semantics. It was just a natural choice given the fact that
Rubinius&amp;rsquo; architecture and design was heavily influenced by Smalltalk
VMs. Also, it&amp;rsquo;s a very nice dynamic bytecode virtual machine. The
community is very responsive and helpful. Bugs get fixed instantly,
there&amp;rsquo;s always someone to help out and overall it&amp;rsquo;s been a great
experience.&lt;/p&gt;

&lt;h3 id=&quot;lets-look-at-some-code&quot;&gt;Let&amp;rsquo;s look at some code!&lt;/h3&gt;

&lt;p&gt;OK, enough talking. Let&amp;rsquo;s have a look on how to get some Fancy code up
and running. Our little sample application will be a simple IRC bot
that connects to Fancy&amp;rsquo;s irc channel on Freenode and says hello to
everyone that greets it. To make life easier, there&amp;rsquo;s already a Fancy
package out there that helps with exactly this task:
&lt;a href=&quot;https://github.com/bakkdoor/fancy_irc&quot;&gt;FancyIRC&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;FancyIRC is a simple IRC client library inspired by Ruby&amp;rsquo;s IRC bot
framework &lt;a href=&quot;https://github.com/cinchrb/cinch&quot;&gt;Cinch&lt;/a&gt;. It&amp;rsquo;s much simpler
and the code is fairly easy to read, but it gives you a similar
interface for writing IRC clients or bots.&lt;/p&gt;

&lt;p&gt;So let&amp;rsquo;s get going by installing Fancy. You can either use the Fancy
Rubygem and install it with Rubinius or get the code from GitHub and
run &lt;code&gt;rake&lt;/code&gt; in the directory. You&amp;rsquo;ll also then have to add the &lt;code&gt;bin&lt;/code&gt;
directory to your &lt;code&gt;$PATH&lt;/code&gt;. If you want the latest and greatest version
of Fancy I recommend building directly from source, as the Gem might
not be up to date all the time. For demonstration purposes, let&amp;rsquo;s
install the Rubygem.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ rbx -S gem install fancy
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To get the FancyIRC package we use Fancy&amp;rsquo;s built-in package manager,
which knows how to find the code on GitHub and install it locally:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ fancy install bakkdoor/fancy_irc
&lt;/code&gt;&lt;/pre&gt;

&lt;h4 id=&quot;writing-the-code&quot;&gt;Writing the code&lt;/h4&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;fancy&quot;&gt;&lt;span class=&quot;lineno&quot;&gt; 1&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;require:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;fancy_irc&amp;quot;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 2&lt;/span&gt; 
&lt;span class=&quot;lineno&quot;&gt; 3&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;greeter_bot&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;FancyIRC&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Client&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;new:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 4&lt;/span&gt;   &lt;span class=&quot;nf&quot;&gt;configuration:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 5&lt;/span&gt;     &lt;span class=&quot;nf&quot;&gt;nickname:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;greeter_bot&amp;quot;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 6&lt;/span&gt;     &lt;span class=&quot;nf&quot;&gt;server:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;irc.freenode.net&amp;quot;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 7&lt;/span&gt;     &lt;span class=&quot;nf&quot;&gt;port:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;6667&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 8&lt;/span&gt;     &lt;span class=&quot;nf&quot;&gt;channels:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;#fancy&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 9&lt;/span&gt;   &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;10&lt;/span&gt; 
&lt;span class=&quot;lineno&quot;&gt;11&lt;/span&gt;   &lt;span class=&quot;c1&quot;&gt;# greet person back&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;12&lt;/span&gt;   &lt;span class=&quot;nf&quot;&gt;on:&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&amp;#39;channel&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;pattern:&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/^[hH]ello greeter_bot/&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;do:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;13&lt;/span&gt;     &lt;span class=&quot;n&quot;&gt;msg&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;reply:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;Hello to you too, #{msg author}!&amp;quot;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;14&lt;/span&gt;   &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;15&lt;/span&gt; 
&lt;span class=&quot;lineno&quot;&gt;16&lt;/span&gt;   &lt;span class=&quot;c1&quot;&gt;# &amp;quot;echo&amp;quot; command&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;17&lt;/span&gt;   &lt;span class=&quot;c1&quot;&gt;# invoke with: !echo &amp;lt;text&amp;gt;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;18&lt;/span&gt;   &lt;span class=&quot;nf&quot;&gt;on:&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&amp;#39;channel&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;pattern:&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/^!echo (.*)$/&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;do:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;19&lt;/span&gt;     &lt;span class=&quot;n&quot;&gt;msg&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;reply:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;#{msg author} said: #{text}&amp;quot;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;20&lt;/span&gt;   &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;21&lt;/span&gt; 
&lt;span class=&quot;lineno&quot;&gt;22&lt;/span&gt;   &lt;span class=&quot;c1&quot;&gt;# tell bot to shutdown via !shutdown command&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;23&lt;/span&gt;   &lt;span class=&quot;nf&quot;&gt;on:&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;&amp;#39;channel&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;pattern:&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/^!shutdown/&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;do:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;24&lt;/span&gt;     &lt;span class=&quot;n&quot;&gt;msg&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;reply:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;OK, shutting down&amp;quot;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;25&lt;/span&gt;     &lt;span class=&quot;no&quot;&gt;System&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exit&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;26&lt;/span&gt;   &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;27&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;28&lt;/span&gt; 
&lt;span class=&quot;lineno&quot;&gt;29&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;greeter_bot&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;connect&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;30&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;greeter_bot&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;run&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;I think the code is pretty straight forward. This should give you a
feeling for what Fancy looks and feels like. There is of course lots
more to Fancy than what was shown here. It would not fit into a single
blog post.&lt;/p&gt;

&lt;p&gt;A quick list of what&amp;rsquo;s currently being worked on:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;New pattern matching system: Message passing based pattern matching
that preserves encapsulation and is very extensible including
pattern literals that allow custom pattern types to be defined by
anyone. There&amp;rsquo;s an experimental branch for that. I&amp;rsquo;m happy
to answer questions.&lt;/li&gt;
  &lt;li&gt;Async support using coroutines (Fibers) - Write async code in a more
natural way where exceptions propagate naturally and you don&amp;rsquo;t have
to think about callbacks all the time.&lt;/li&gt;
  &lt;li&gt;First-class support for actors - Asynchronous message sends, Futures
and multi-vm messaging built-in.&lt;/li&gt;
  &lt;li&gt;And much more&amp;hellip;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;interested&quot;&gt;Interested?&lt;/h3&gt;

&lt;p&gt;If you got interested in Fancy and want to know where to go next,
here&amp;rsquo;s a short list of things to check out:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/bakkdoor/fancy&quot;&gt;Fancy&amp;rsquo;s GitHub repository&lt;/a&gt;.
The standard library is completely written in Fancy and most classes
and methods have docstrings. It should be fairly easy to understand.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/fancy-lang/infancy&quot;&gt;Programming InFancy&lt;/a&gt;
An open source tutorial on learning Fancy. Work in progress.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://api.fancy-lang.org&quot;&gt;http://api.fancy-lang.org&lt;/a&gt;
A work in progress page containing Fancy&amp;rsquo;s standard library class
and method documentation.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://groups.google.com/forum/#!forum/fancy-lang&quot;&gt;Fancy&amp;rsquo;s Google Group mailinglist&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;IRC Channel: #fancy @ irc.freenode.net&lt;/li&gt;
  &lt;li&gt;Website: &lt;a href=&quot;http://www.fancy-lang.org&quot;&gt;http://www.fancy-lang.org&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  
  <entry>
    <title>Running Multiple Rubinius Branches Simultaneously with RVM.</title>
    <id>http://rubini.us/2011/02/22/rubinius-multiple-branches-with-rvm/</id>
    <link rel="alternate" type="text/html" href="http://rubini.us/2011/02/22/rubinius-multiple-branches-with-rvm/" />
    <updated>2011-02-22T00:00:00+00:00</updated>
    <author>
      <name>Wayne E. Seguin</name>
    </author>
    
    <content type="html">&lt;p&gt;This article is written with the assumption that you have RVM installed
already. If you do not, follow the
&lt;a href=&quot;https://rvm.beginrescueend.com/rvm/install/&quot;&gt;Installation Instructions&lt;/a&gt;
followed by the
&lt;a href=&quot;https://rvm.beginrescueend.com/rvm/basics/&quot;&gt;Basics&lt;/a&gt;
closely first.&lt;/p&gt;

&lt;h3 id=&quot;named-ruby-installs&quot;&gt;Named Ruby Installs&lt;/h3&gt;

&lt;p&gt;Everyone familiar with RVM knows that it allows you to quickly and
easily install a particular Ruby interpreter by simply running, for
example,&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rvm install rbx
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;What is not widely known (yet) is that there is a &amp;ldquo;Named Rubies&amp;rdquo; feature
that allows you to install altered versions of the same Ruby
installation along side the original.&lt;/p&gt;

&lt;p&gt;In the case of Rubinius there is this facinating branch called &amp;lsquo;hydra&amp;rsquo;.
So let us see how we can have the Rubinius master branch installed as
the main rbx with the hydra branch installed along side as well.&lt;/p&gt;

&lt;p&gt;As above you first install rbx which is currently defaulted to -head
version so&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rvm install rbx
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;is currently equivalent to&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rvm install rbx-head
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After we have the mainline head Rubinus branch installed, we now want to
use the named rubies feature. This is done using the -n specifier in the
Ruby identifier string. So for example to install our hydra branch as an
RVM ruby with the name &amp;lsquo;hydra&amp;rsquo; in it we do the following:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rvm install --branch hydra rbx-nhydra
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now we can see that they can be used together! Using the Rubinius master
environment,&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ rvm rbx ; ruby -v
rubinius 1.2.1 (1.8.7 6feb585f 2011-02-15 JI) [x86_64-apple-darwin10.6.0]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Whereas using the Rubinius hydra environment,&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ rvm rbx-nhydra ; ruby -v
rubinius 1.3.0dev (1.8.7 6feb585f xxxx-xx-xx JI) [x86_64-apple-darwin10.6.0]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We see that the next release of Rubinius (hydra branch) is indeed
version 1.3.0 whereas the master branch is version 1.2.1.&lt;/p&gt;

&lt;p&gt;Also please note that RVM creates wrapper scripts, so you do not need to
switch out the entire environment just to run the differen versions
either:&lt;/p&gt;

&lt;p&gt;For Rubinius master,&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ rbx-head -v
rubinius 1.2.1 (1.8.7 6feb585f 2011-02-15 JI) [x86_64-apple-darwin10.6.0]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For Rubinius hydra,&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ rbx-head-nhydra -v
rubinius 1.3.0dev (1.8.7 6feb585f xxxx-xx-xx JI) [x86_64-apple-darwin10.6.0]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;There is a lot more available to you than this, for more information on
RVM capabilities please visit the &lt;a href=&quot;https://rvm.beginrescueend.com/&quot;&gt;RVM
Website&lt;/a&gt; and also come talk to us in #rvm on
irc.freenode.net during the daytime EDT.&lt;/p&gt;

&lt;p&gt;I hope that this is helpful and informative to you!&lt;/p&gt;

&lt;p&gt;~Wayne&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Rubinius, What's Next?</title>
    <id>http://rubini.us/2011/02/17/rubinius-what-s-next/</id>
    <link rel="alternate" type="text/html" href="http://rubini.us/2011/02/17/rubinius-what-s-next/" />
    <updated>2011-02-17T00:00:00+00:00</updated>
    <author>
      <name>Brian Ford</name>
    </author>
    
    <content type="html">&lt;p&gt;On Tuesday, we released version 1.2.1 (see the &lt;a href=&quot;http://rubini.us/releases/1.2.1/&quot;&gt;Release
notes&lt;/a&gt;). This release weighs in at 256
commits and 21 tickets closed in the 56 calendar days since the release of
1.2.0. Many thanks to those who contributed patches and to everyone who helped
us test it.&lt;/p&gt;

&lt;p&gt;While we were working on 1.2.1, we were also working on a Top Secret project
that we&amp;rsquo;ve craftily &lt;a href=&quot;https://github.com/evanphx/rubinius/tree/hydra&quot;&gt;hidden in plain
sight&lt;/a&gt;. I&amp;rsquo;d like to introduce
the work we are doing on the hydra branch and the features you can expect to
see in Rubinius soon.&lt;/p&gt;

&lt;h3 id=&quot;daedalus---a-new-build-system&quot;&gt;Daedalus - A new build system&lt;/h3&gt;

&lt;p&gt;Rubinius is a fairly complex project. It combines multiple components into a
single system. We have worked hard to contain this complexity and from the
beginning we insisted that building Rubinius be as simple as possible. For
example, Rubinius can be run from the source directory, there is no need to
install it first. Typically, building requires:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;./configure
rake
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The Rubinius system combines:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;External libraries written in C/C++, sometimes built with just Makefiles
and sometimes using autotools.&lt;/li&gt;
  &lt;li&gt;The virtual machine, garbage collector, and JIT compiler written in C++.&lt;/li&gt;
  &lt;li&gt;The virtual machine interpreter instructions, including support code for
the JIT, and instruction documentation all generated at build time from an
instruction template.&lt;/li&gt;
  &lt;li&gt;The core library and bytecode compiler written in Ruby.&lt;/li&gt;
  &lt;li&gt;Various C extensions like the Melbourne parser, BigDecimal, Digest, and
OpenSSL libraries. In the case of the parser, we have to build &lt;em&gt;two&lt;/em&gt;
versions, one for the bootstrapping system and one for the Rubinius system
being built.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It has not been easy to make this work and over the years we have compiled a
list of exactly what we need in a build system. Evan, in typical form, started
hacking out a first pass and created &lt;em&gt;daedalus&lt;/em&gt;, our new build system. It
features such exotic (and extremely useful) features as SHA-based change
detection, parallel builds, single-process execution, and use-aware
configuration options. Allow me to elaborate.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;A typical build system decides to rebuild a file if the source is newer than
the build artifact. This can result is unnecessarily building files that
have been touched by some process (like updating from the source repository)
but whose contents have not changed.  By basing rebuild decisions on the SHA
digest of the source, only files that have actually been changed need to be
built. Since compiling C++ with optimizations is &lt;em&gt;not&lt;/em&gt; a fast process,
eliminating unnecessary building is great for productivity, not to mention
global warming.&lt;/li&gt;
  &lt;li&gt;With a multi-core system, builds can be done faster if they are done in
parallel. If the build system can accurately determine dependencies, it can
execute build sub-steps in parallel. Of course, this can cut into YouTube
and Twitter browsing time, but that&amp;rsquo;s a risk we are willing to take.&lt;/li&gt;
  &lt;li&gt;While parallel sub-processes during the build are excellent, the supervising
process benefits from running as a single process from start to finish.
Otherwise, configuration data needs to be re-parsed. To support a single
build process, we need multiple, independent dependency graphs for the
components. As noted above, we need to build two versions of the parser,
which requires two dependency graphs &lt;em&gt;for the same component&lt;/em&gt;! This is
simply impossible in Rake.&lt;/li&gt;
  &lt;li&gt;Use-aware configuration values know that the user has set the value and can
intelligently merge with newer configuration variables that we create
without requiring the user to reconfigure. Ultimately, we are aiming for a
&lt;em&gt;single&lt;/em&gt; command build. Just run &amp;lsquo;daedalus&amp;rsquo; and done. There is no step 2.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;full-on-concurrency&quot;&gt;Full-on Concurrency&lt;/h3&gt;

&lt;p&gt;Nobody likes waiting in line. In fact, the more desirable a thing is, the less
we want to stand idly waiting in a line for it, tapping our foot, twiddling
our thumbs. The same could be said about our programs.&lt;/p&gt;

&lt;p&gt;Threads give us the ability to add concurrency to our programs. However,
unless the hardware either has multiple CPUs or multiple cores per CPU (or
both), the apparent concurrency will still be executing serially. Since there
are so many multi-core CPUs around these days, our programs should be getting
stuff done in parallel.&lt;/p&gt;

&lt;p&gt;Unfortunately, there&amp;rsquo;s a twist. Even with native threads on a multi-core CPU,
the amount of parallelism you get depends on how well you manage locks around
shared data and resources. Sometimes managing these locks is complex and you
opt for one big lock, essentially only allowing one thread at a time to run.
That big lock is usually called a global interpreter lock (GIL) or global VM
lock (GVL).&lt;/p&gt;

&lt;p&gt;The Rubinius VM originally had green (user-space) threads, but it has had
native threads with a GIL for a while now. In the hydra branch, Evan and
contributors like Dirkjan Bussink have been working on replacing the GIL with
fine-grained locks so that threads truly execute in parallel. This work has
been going very well, owing in part to the fact that so much code in Rubinius
is actually written in Ruby. Contributors like Chuck Remes have been running
hydra under heavy concurrency loads and Rubinius is performing well.&lt;/p&gt;

&lt;p&gt;Rubinius also has experimental support for Fibers and a built-in Actor
library. There is more work to be done but Rubinius is quickly becoming an
excellent platform for concurrency, with a variety of approaches available to
the programmer. Evan has also suggested rewriting the Rubinius IO subsystem to
enable even better APIs for concurrency, all from Ruby.&lt;/p&gt;

&lt;h3 id=&quot;performance&quot;&gt;Performance&lt;/h3&gt;

&lt;p&gt;Forget everything anyone has ever told you about Ruby being slow. There are
two things that make Ruby, as implemented, slow: 1) inexperience; 2)
inadequate tools. These two result in one big thing: &lt;em&gt;doing too much&lt;/em&gt;. Or, as
they say: &lt;em&gt;No code runs faster than no code&lt;/em&gt;. We have been working for 4+
years to build adequate tools in Rubinius, and there is plenty of experience
in Smalltalk, Self, and other languages for making dynamic languages fast.&lt;/p&gt;

&lt;p&gt;Presently, Rubinius typically runs pure Ruby code almost 2 times faster than
MRI 1.9. However, there are also cases where Rubinius is slower. These mostly
involve core libraries that are implemented in C in MRI. There are three main
fronts on which we are attacking performance issues: 1) improving the
algorithms in the Ruby code that implements the core library; 2) continuing to
tune the VM and garbage collector; and 3) improving the JIT compiler. Which
leads me to one of the most exciting things we are working on&amp;hellip;&lt;/p&gt;

&lt;h3 id=&quot;jit-intermediate-representation-ir&quot;&gt;JIT Intermediate Representation (IR)&lt;/h3&gt;

&lt;p&gt;The just-in-time (JIT) compiler is the key to making Ruby fast. One of the
biggest challenges with a dynamic language like Ruby is knowing what method is
actually being invoked when a message is sent to an object. Consider the
following code:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;lineno&quot;&gt; 1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;A&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 2&lt;/span&gt;   &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 3&lt;/span&gt;     &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 4&lt;/span&gt;   &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 5&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 6&lt;/span&gt; 
&lt;span class=&quot;lineno&quot;&gt; 7&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;B&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 8&lt;/span&gt;   &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 9&lt;/span&gt;     &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;10&lt;/span&gt;   &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;11&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;12&lt;/span&gt; 
&lt;span class=&quot;lineno&quot;&gt;13&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;C&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;14&lt;/span&gt;   &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;work&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;15&lt;/span&gt;     &lt;span class=&quot;n&quot;&gt;obj&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;16&lt;/span&gt;   &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt;17&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;What method is being invoked by &lt;code&gt;obj.m(y)&lt;/code&gt;? There is no way to definitively
know this by looking at the source code. However, when the program is actually
running, we can know precisely what &lt;code&gt;obj&lt;/code&gt; is and precisely which method &lt;code&gt;m&lt;/code&gt;
was invoked. This is called type profiling and that is exactly what the Rubinius
VM does. Then the JIT uses the type information to make decisions like whether
to inline a method into another method. When methods are inlined, it gives the
optimizer more data and more possibilities to remove redundant code. The less
code we can run, the faster Ruby will be.&lt;/p&gt;

&lt;p&gt;Presently, the JIT compiler converts Rubinius bytecode into LLVM IR and LLVM
handles the thorny task of generating machine code. However, Rubinius bytecode
is designed for fast execution by the virtual machine rather than as a rich
intermediate representation. So Evan has started work on a new JIT IR.&lt;/p&gt;

&lt;p&gt;This new IR will help us to express Ruby semantics in a way that enables many
powerful optimizations and will ultimately allow LLVM to generate even better
machine code. Put another way, &lt;em&gt;Rubinius loves Ruby code!&lt;/em&gt; Right down to the
metal. There&amp;rsquo;s no fighting a foreign type system or the semantics of a
language at odds with Ruby&amp;rsquo;s rosy view of the world.&lt;/p&gt;

&lt;h3 id=&quot;ruby-19&quot;&gt;Ruby 1.9&lt;/h3&gt;

&lt;p&gt;MRI 1.9 introduced two completely different changes to Ruby. The first was a
new implementation based on a bytecode virtual machine. While the virtual
machine replaced the AST-walking interpreter, little else changed
architecturally. Mostly the same core library and garbage collector code
exists in MRI 1.9 as was in MRI 1.8. The second change introduced some new
syntax (minor) and encodings (major). Many of the other changes, for example,
returning Enumerator objects from methods that take blocks, have been
back-ported to Ruby 1.8.7 and are already available in Rubinius.&lt;/p&gt;

&lt;p&gt;So, the key to supporting Ruby 1.9 in Rubinius essentially involves supporting
the 1.9 syntax changes and encodings. We have begun implementing the parser
changes and introduced the foundation for Encoding-aware Strings. A good
amount of work remains to be done, but over the next month we expect that
we will be starting to run Ruby 1.9-specific code in Rubinius.&lt;/p&gt;

&lt;h3 id=&quot;tools-of-information&quot;&gt;Tools of Information&lt;/h3&gt;

&lt;p&gt;It has been said that &lt;code&gt;printf&lt;/code&gt; is the mother of all debuggers. That
illustrates two points: 1) data is often buried in our program code; and 2) we
should have tools (e.g. a debugger) that enables us to access the data without
manually instrumenting our code.&lt;/p&gt;

&lt;p&gt;Presently, Rubinius has a built-in debugger, precise method profiler, memory
analysis tool, and Agent interface that permits querying a running Rubinius
VM&amp;ndash;even one running on a remote machine&amp;ndash;for a variety of information.&lt;/p&gt;

&lt;p&gt;We will be adding the ability to track the location where objects are
allocated to assist finding object leaks or code that is creating unusually
large numbers of objects. We are also working on a tool to graphically display
information like number of running threads, amount of CPU usage, and amount of
memory used while actively monitoring a VM.&lt;/p&gt;

&lt;p&gt;I am also curious about correlating this VM information with external data to
enable play-back review.  For example, I would like to monitor RubySpec runs
and correlate which spec is running with the VM data. I imagine a simple
monotonic reference ID provided by the VM would be useful in correlating these
two otherwise unrelated pieces of data. The RubySpec runner would request the
ID before running each spec and the Agent monitor would request the ID when
gathering VM data. Later the two data sets could easily be merged.&lt;/p&gt;

&lt;p&gt;When you find yourself manually instrumenting some code, consider what data
you are trying to get your hands on and let us know the scenario.  We&amp;rsquo;ll
likely be able to build a tool that will open up new vistas into the behavior
of your Ruby programs.&lt;/p&gt;

&lt;h3 id=&quot;windowssupregsup&quot;&gt;Windows&lt;sup&gt;&amp;reg;&lt;/sup&gt;&lt;/h3&gt;

&lt;p&gt;However one may feel about Windows as an operating system, it is undeniable
that the vast majority of people in the world use Windows. We believe those
people have an inalienable right to use Rubinius, too.&lt;/p&gt;

&lt;p&gt;Thanks to the wonderful, hard-working
&lt;a href=&quot;http://mingw-w64.sourceforge.net/&quot;&gt;MinGW-w64&lt;/a&gt; folks, we are able to compile
the Rubinius VM into a native Windows executable. Presently, the VM will
compile, link, and attempt to load the Ruby core library. More
platform-specific work is needed to load the library. The next step after that
will be getting the RubySpecs to run and start fixing issues.&lt;/p&gt;

&lt;p&gt;Since the Windows work is being done on the hydra branch, the other features
discussed above will be available on Windows as soon as we complete them.&lt;/p&gt;

&lt;h3 id=&quot;multi-language-ualization&quot;&gt;Multi-language-ualization&lt;/h3&gt;

&lt;p&gt;The Rubinius VM began as an effort to create a modern, first-class environment
for running programs written in Ruby. However, it turns out that Ruby is a
terrific language for writing subsystems for other programming languages.
Actually, this should come as no surprise; Ruby is a fabulous general purpose
programming language.&lt;/p&gt;

&lt;p&gt;To support experimenting with writing other languages that run on the Rubinius
VM, Evan has started to put together a Language Toolkit. This includes things
like a built-in PEG parser, convenient ways to create methods from Rubinius
bytecode, and decoupling method dispatch from Ruby semantics.&lt;/p&gt;

&lt;p&gt;Hopefully, Evan will introduce us to all this in a future blog post, but
here is a taste of what you can do:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;lineno&quot;&gt; 1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Hello&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 2&lt;/span&gt;   &lt;span class=&quot;n&quot;&gt;dynamic_method&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:world&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 3&lt;/span&gt;     &lt;span class=&quot;n&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;push&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:self&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 4&lt;/span&gt;     &lt;span class=&quot;n&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;push_literal&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Hello, world&amp;quot;&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 5&lt;/span&gt;     &lt;span class=&quot;n&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;send&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:puts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 6&lt;/span&gt;     &lt;span class=&quot;n&quot;&gt;g&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ret&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 7&lt;/span&gt;   &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 8&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;lineno&quot;&gt; 9&lt;/span&gt; 
&lt;span class=&quot;lineno&quot;&gt;10&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Hello&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;world&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Of course, that is much more concisely written in Ruby, but combine this
ability with a built-in PEG parser and you can be experimenting with your own
fascinating syntax in a matter of minutes.&lt;/p&gt;

&lt;p&gt;Check out the Rubinius &lt;a href=&quot;http://rubini.us/projects/&quot;&gt;Projects page&lt;/a&gt; for some of
these language experiments. One language in particular is
&lt;a href=&quot;https://github.com/bakkdoor/fancy&quot;&gt;Fancy&lt;/a&gt;, which is fully bootstrapped (i.e.
the Fancy compiler is now written in Fancy) on Rubinius.&lt;/p&gt;

&lt;h3 id=&quot;documentation&quot;&gt;Documentation&lt;/h3&gt;

&lt;p&gt;One the one hand, Rubinius just runs Ruby code, and you shouldn&amp;rsquo;t need any
special knowledge to run your application on Rubinius. On the other hand, as
I&amp;rsquo;ve discussed above, there are some specific Rubinius features that may be
very helpful to you. However, they can only be as helpful as the documentation
we have for them.&lt;/p&gt;

&lt;p&gt;Before we released 1.2.0 in December last year, I spent quite a bit of time
getting a new documentation system in place. Since then, we&amp;rsquo;ve had
contributors help with translations to Russian, Polish, Spanish, and German.
Adam Gardiner started documenting the garbage collector algorithms. Yehuda
Katz (you may have heard the name) has contributed documentation for &lt;a href=&quot;http://rubini.us/doc/en/bytecode-compiler/&quot;&gt;the
bytecode compiler&lt;/a&gt; complete with
diagrams!. Chuck Remes wrote up a great piece on the &lt;a href=&quot;http://rubini.us/doc/en/tools/memory-analysis/&quot;&gt;memory
analysis&lt;/a&gt; tool.&lt;/p&gt;

&lt;p&gt;We really appreciate these contributions. We understand the need for great
documentation and we have been creating better support for it. In many cases,
all that is needed is to just open a file and start writing. Of course, one
cannot expect to understand much about Rubinius without digging into the code.
If there is a particular part of Rubinius that you are curious about, jump in
the #rubinius channel on freenode.net and ask us questions. We can point you
in the right direction and help clarify things. If nothing else, let us know
which part of the missing documentation is most important to you and we can
start filling that in.&lt;/p&gt;

&lt;h3 id=&quot;how-you-can-help&quot;&gt;How you can help&lt;/h3&gt;

&lt;p&gt;There you have it, some super exciting things coming very soon for Rubinius
and for Ruby! We would love to have your help making Rubinius even better. The
most important thing you can do is try running your Ruby code. Give us
feedback. Let us know what features or tools would make your life easier. Help
us to build them.&lt;/p&gt;

&lt;p&gt;Rubinius adopts Ruby&amp;rsquo;s rosy view of the world. We want to empower you to solve
your hardest problems with Ruby, and have fun doing it.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Rubinius Has a Blog!</title>
    <id>http://rubini.us/2010/12/15/rubinius-has-a-blog/</id>
    <link rel="alternate" type="text/html" href="http://rubini.us/2010/12/15/rubinius-has-a-blog/" />
    <updated>2010-12-15T00:00:00+00:00</updated>
    <author>
      <name>Brian Ford</name>
    </author>
    
    <content type="html">&lt;p&gt;Many thought the day would never come, but Rubinius finally has a blog. That&amp;rsquo;s
not all, though: We have integrated the website, blog, and documentation using
Jekyll. The source code for it all is in the main &lt;a href=&quot;http://github.com/rubinius/rubinius&quot;&gt;Rubinius
repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;People have often requested that we write more about the &lt;em&gt;awesome&lt;/em&gt; features in
Rubinius. We hear you and we&amp;rsquo;d love to do this. However, there is always a
trade-off between working on those awesome features and writing about them.
Until now, it&amp;rsquo;s been rather painful to write docs or blog posts because we did
not have good infrastructure in place. Now, I think we do. I&amp;rsquo;m sure there are
still a lot of improvements we can make, but we have a good place to start.
I&amp;rsquo;d like to give a brief tour of our new system.&lt;/p&gt;

&lt;p&gt;The primary goal was to improve collaboration and reduce friction for writing
new documentation and blog posts. That&amp;rsquo;s right, improve collaboration. There
are many people who have experience developing Rubinius and running their
applications on it. We love how people have collaborated with source code
commits. Now anyone has the ability to write a blog post as well. I&amp;rsquo;ve written
a basic &lt;a href=&quot;/doc/en/how-to/write-a-blog-post/&quot;&gt;How-To - Write a Blog Post&lt;/a&gt;
document. If you have an idea for a blog post, just let us know. We will
exercise a bit of editorial control just to ensure the topics are appropriate
for Rubinius, but generally, we are thrilled to have your contributions.&lt;/p&gt;

&lt;p&gt;Recently, we added the &lt;code&gt;rbx docs&lt;/code&gt; command. This will run a web server on your
machine and open a browser window to display the Rubinius documentation. Now
the documentation will also be available at the &lt;a href=&quot;http://rubini.us&quot;&gt;rubini.us&lt;/a&gt;
website. I have added a basic outline and a bunch of files to further simplify
the task of writing docs. In many cases, merely open a file and start writing
docs in &lt;a href=&quot;http://daringfireball.net/projects/markdown/syntax&quot;&gt;Markdown&lt;/a&gt; format.&lt;/p&gt;

&lt;p&gt;We have also begun translating our documentation to other languages. I am
excited about this, being a huge language geek. I wish that I were proficient
in 10 languages so I could polish our documentation for the many people who
are not native English speakers. Alas, I only have a fair ability to write in
Spanish, so we are again depending on your help. I started the translation
effort by passing the existing English docs through Google translate. We have
a beginning guide for &lt;a href=&quot;/doc/en/how-to/translate-documentation&quot;&gt;How-To - Translate
Documentation&lt;/a&gt;. I&amp;rsquo;ve been told by
&lt;em&gt;kronos_vano&lt;/em&gt; in our #rubinius IRC channel that he&amp;rsquo;s already working on a
Russian translation. I personally would love to see Japanese and Chinese
translations.&lt;/p&gt;

&lt;p&gt;So that&amp;rsquo;s a brief introduction to our new infrastructure for documenting and
explaining Rubinius. It&amp;rsquo;s been such a joy to see so many people contribute to
the Rubinius source code over the years. We hope that the blog, documentation,
and translations will further empower people to contribute and benefit from
the value that Rubinius has to offer the Ruby community.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;¡Adelante!&lt;/em&gt;&lt;/p&gt;
</content>
  </entry>
  

</feed>
