<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/atom10full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US">
  <title>def euler(x); cos(x) + i*sin(x); end - Home</title>
  <id>tag:blog.brightredglow.com,2008:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.7.2">Mephisto Noh-Varr</generator>
  
  <link href="http://blog.brightredglow.com/" rel="alternate" type="text/html" />
  <updated>2008-04-28T17:02:49Z</updated>
  <link rel="self" href="http://feeds.feedburner.com/defeulerxcosxisinxend" type="application/atom+xml" /><entry xml:base="http://blog.brightredglow.com/">
    <author>
      <name>brian</name>
    </author>
    <id>tag:blog.brightredglow.com,2008-04-28:5130</id>
    <published>2008-04-28T17:01:00Z</published>
    <updated>2008-04-28T17:02:49Z</updated>
    <link href="http://feeds.feedburner.com/~r/defeulerxcosxisinxend/~3/279518063/ruby-in-ruby-seriously" rel="alternate" type="text/html" />
    <title>Ruby in Ruby--Seriously</title>
<content type="html">
            &lt;p&gt;All the attention that the various &lt;a href='http://ruby-lang.org'&gt;Ruby&lt;/a&gt; implementations are getting these days is a wonderful thing. Competition and lots of people trying out different ideas is a win for everyone. That said, there are still the silly human issues of ego and vested interest, always exacerbated by tossing some green into the mix.&lt;/p&gt;


	&lt;p&gt;I would definitely assert that &lt;a href='http://jruby.codehaus.org'&gt;JRuby&lt;/a&gt; is one of the more impressive stabs at a Ruby implementation. And we have, in large measure, to thank &lt;a href='http://headius.blogspot.com'&gt;Charles&lt;/a&gt; for that. But, at the same time, Charles can write &lt;a href='http://headius.blogspot.com/2008/04/promise-and-peril-for-alternative-ruby.html'&gt;&lt;span class='caps'&gt;FUD&lt;/span&gt;&lt;/a&gt; like the best of them. I haven’t made it through the whole article yet (it does ramble on a bit), but I should point out a couple things.&lt;/p&gt;


	&lt;p&gt;Method dispatch is hard to get fast in Ruby, no matter what. Substitute a VM for an interpreter, C# for C for Java, whatever. And if you read carefully about what Charles is pinning his hopes on for the future of JRuby, it is precisely optimizations in the new &lt;span class='caps'&gt;JVM&lt;/span&gt; for better method dispatch. Rubinius will address these issues for sure. But instead of working on this with something like &lt;strong&gt;143,866&lt;/strong&gt; lines of Java code, we have something like this: In the new C++ VM (which is not yet complete but substantially implemented), we have &lt;strong&gt;12,619&lt;/strong&gt; lines of &lt;code&gt;C++&lt;/code&gt;, and in our kernel directory, we have &lt;strong&gt;23,882&lt;/strong&gt; lines of, what now, oh, right &lt;em&gt;Ruby&lt;/em&gt; code. What you might miss when you think about the &lt;strong&gt;143,866&lt;/strong&gt; lines of Java code is the several hundred thousand lines of &lt;code&gt;C++&lt;/code&gt; that make up the &lt;span class='caps'&gt;JVM&lt;/span&gt;. Hmm.&lt;/p&gt;


	&lt;p&gt;So, ultimately, Charles hopes to make JRuby fast using the same basic techniques that Rubinius does and will use. Except, it seems he’d rather use a 747 passenger jet to mow his lawn, rather than a comfy John Deere riding mower that your average small engine enthusiast can tinker with when something goes awry.&lt;/p&gt;


	&lt;p&gt;Seriously, the “Ruby in Ruby” meme &lt;em&gt;must not die&lt;/em&gt;. It is an inspiration to a lot of folks and, most importantly, it has great promise. Press Charles on the issue and he will admit he’d rather have more of JRuby written in Ruby. I sense something of “bitter-gate” in Charles’ post. We don’t cling to Ruby because we can’t write C#, C, Java, etc. We don’t just like Ruby when it’s fun and fashionable and hyped. We are demonstrating that Ruby can be sanely implemented and push the state of the art for the language forward.&lt;/p&gt;


	&lt;p&gt;The &lt;span class='caps'&gt;C VM&lt;/span&gt; (named shotgun) was not our last word. Nor is the next generation C++ VM. They are both pragmatic steps toward a higher goal. And, let’s be very clear. We have not recently implemented a bunch of core methods in C. I’ve done two major pieces of rework recently that introduced a number of primitives (chunks of C code that access the VM directly). One was LookupTable, which was written in C because it is used heavily in the VM. However, it is exposed to Ruby code as well because, oh yes, we write a ton of stuff in Ruby, like stuff related to method and constant lookup. LookupTable acts a lot like a Hash, but separating it from Hash actually made Hash more clear and enabled writing &lt;em&gt;even more&lt;/em&gt; of Hash in Ruby.&lt;/p&gt;


	&lt;p&gt;Another piece of work was optimizing some of String’s methods. You can see the performance enhancements in &lt;a href='http://rubinius.lighthouseapp.com/projects/5089/tickets/359-task-improve-performance-of-string'&gt;this ticket&lt;/a&gt;. I did introduce a couple new primitives in this rework, mostly to make a more sane set of composable primitives that were useful in many String methods. Primitives are a necessary fact of life in this composite implementation. Something has to bridge Ruby and &lt;code&gt;C/C++&lt;/code&gt;. Also, by using a well-defined set of primitives, it makes it very easy to take our Ruby core libs and run them on something else. Ask Charles and he will tell you this. And if we write a little &lt;code&gt;C/C++&lt;/code&gt; to get the performance of a large number of Ruby methods up to par, that’s a huge win.&lt;/p&gt;


	&lt;p&gt;So again, the “Ruby in Ruby” meme is &lt;em&gt;really&lt;/em&gt; important. Don’t let it die. And don’t let Charles tell you otherwise. While he can make snarky comments about our &lt;code&gt;C/C++&lt;/code&gt; VM, he should really look at his own kettle of &lt;strong&gt;143,866&lt;/strong&gt; lines of Java code plus hundred thousands more lines of &lt;code&gt;C++&lt;/code&gt; JVM. The goal is a first-rate, powerful, extensible, approachable implementation of Ruby. Everyone in the Ruby ecosystem is contributing to that in various ways. Rubinius just seems to be putting the best pieces together, if I do say so myself.&lt;/p&gt;
          </content>  <feedburner:origLink>http://blog.brightredglow.com/2008/4/28/ruby-in-ruby-seriously</feedburner:origLink></entry>
  <entry xml:base="http://blog.brightredglow.com/">
    <author>
      <name>brian</name>
    </author>
    <id>tag:blog.brightredglow.com,2008-01-18:5020</id>
    <published>2008-01-18T01:26:00Z</published>
    <updated>2008-01-18T01:27:47Z</updated>
    <link href="http://feeds.feedburner.com/~r/defeulerxcosxisinxend/~3/218567441/rubinius-runs-rspec-1-1-2" rel="alternate" type="text/html" />
    <title>Rubinius runs RSpec 1.1.2</title>
<content type="html">
            &lt;p&gt;This day has been a long time coming. About a year ago, I started trying to get &lt;a href='http://rubini.us'&gt;Rubinius&lt;/a&gt; to run &lt;a href='http://rspec.rubyforge.org'&gt;RSpec&lt;/a&gt;. Hats off to all the wonderful Rubinius contributors and special mention to the cool guys who hung out with me at &lt;a href='http://rubini.us/forums/5/topics/11'&gt;pdx.rbc meetups&lt;/a&gt; in early 2007. (Unfortunately, the page in that link will disappear soon. Maybe I’ll make a pdf out of it and keep it here. You know, nostalgia.)&lt;/p&gt;


	&lt;p&gt;Everyone’s efforts have paid off and here is the proof:&lt;/p&gt;


&lt;pre&gt;
$ shotgun/rubinius -I ../rspec-1.1.2/lib/ ../rspec-1.1.2/bin/spec spec/ruby/1.8/core/true/
.....

Finished in 0.988572 seconds

5 examples, 0 failures

&lt;/pre&gt;

	&lt;p&gt;The TrueClass specs were some of the very first ones I wrote, so I thought it fitting those be the first ones I ran successfully with RSpec.&lt;/p&gt;


	&lt;p&gt;Congratulations everyone!&lt;/p&gt;
          </content>  <feedburner:origLink>http://blog.brightredglow.com/2008/1/18/rubinius-runs-rspec-1-1-2</feedburner:origLink></entry>
  <entry xml:base="http://blog.brightredglow.com/">
    <author>
      <name>brian</name>
    </author>
    <id>tag:blog.brightredglow.com,2008-01-17:5019</id>
    <published>2008-01-17T18:01:00Z</published>
    <updated>2008-01-17T18:02:32Z</updated>
    <link href="http://feeds.feedburner.com/~r/defeulerxcosxisinxend/~3/218376387/contra-what" rel="alternate" type="text/html" />
    <title>Contra--what?</title>
<content type="html">
            &lt;p&gt;I’m going to be pedantic for a minute. If you are Betrand Russell, feel free to spend your time more productively. Everyone else, don’t be afraid of a few symbols.&lt;/p&gt;


	&lt;p&gt;If you read my &lt;a href='http://blog.brightredglow.com/2008/1/17/evil-can-be-dangerous'&gt;last post&lt;/a&gt;, you might be inclined, as is every human mind, to reduce all those words to something simple you can put in your back pocket (maybe take it out later and show it to a friend). Perhaps something like this:&lt;/p&gt;


&lt;pre&gt;
  Immutable == Security == Good
&lt;/pre&gt;

	&lt;p&gt;If you do that, you might get lots of nods and a fair bit of affirmation from folks. Makes perfect sense, right. You can make all sorts of analogies that &lt;em&gt;prove&lt;/em&gt; this to you. Consider my front door, if it’s not easily opened, I feel more secure. Perfect. Must be true.&lt;/p&gt;


	&lt;p&gt;It’s not. Things are not so easily distilled into such nifty little boxes.&lt;/p&gt;


	&lt;p&gt;Now, once they have this shiny, handy, palm-sized summary in their back pocket, folks tend to go the extra mile. They decide to make one of the most fundamental logic errors. Essentially, trying to think all the way around this hairy problem, they decide:&lt;/p&gt;


&lt;pre&gt;
  If Immutable == Security
  Then Not Immutable == Not Security
&lt;/pre&gt;

	&lt;p&gt;Doh. That’s where this contra thing comes in. Read the gory details on &lt;a href='http://en.wikipedia.org/wiki/Contraposition'&gt;Wikipedia&lt;/a&gt;, but here’s the summary:&lt;/p&gt;


	&lt;p&gt;In logic, something like &lt;code&gt;A -&amp;gt; B&lt;/code&gt; is read “A implies B” or “if A then B”. It is very tempting to then think, “if not A then not B”. Unfortunately, that is not generally true. Given “A implies B”, the statement “if not A then not B” is called the &lt;em&gt;inverse&lt;/em&gt;. Again, these are not generally logically equivalent. The statement “if not B then not A” is called the &lt;em&gt;contrapositive&lt;/em&gt;, and it &lt;strong&gt;&lt;em&gt;is&lt;/em&gt;&lt;/strong&gt; generally true that a statement and it’s contrapositive are logically equivalent.&lt;/p&gt;


	&lt;p&gt;Applying this to the above, we can see that &lt;strong&gt;IF&lt;/strong&gt; (a very big if) it is true that “if Immutable then Secure” is true, then the statement “if not Secure then not Immutable” is equivalently true. However, it has not been demonstrated that immutability is equivalent to security. And indeed there are numerous ways to achieve “security” (a word that begs precise definition) in a variety of different systems.&lt;/p&gt;


	&lt;p&gt;So, before you start touting something like Java because it is statically typed, immutable and “secure”, consider whether you are making the mistake of confusing the inverse for the contrapositive. If you’re feeling extra nimble and up for some mental gymnastics, consider this rather hyperbolic assertion:&lt;/p&gt;


&lt;blockquote&gt;
	&lt;p&gt;Ruby is a very, very sharp knife. Java is a little more like a butter knife. We safely leave butter knives on the table when the kids are around. But, we probably grumble more than a little when trying to cut our steak with a butter knife.&lt;/p&gt;

&lt;/blockquote&gt;




	&lt;p&gt;If we want to make Ruby “safer”, it’s possible to do so in the same manner as dealing with sharp knives: we make something like a sheath. We don’t just take a hammer to the blade and dull it.&lt;/p&gt;
          </content>  <feedburner:origLink>http://blog.brightredglow.com/2008/1/17/contra-what</feedburner:origLink></entry>
  <entry xml:base="http://blog.brightredglow.com/">
    <author>
      <name>brian</name>
    </author>
    <id>tag:blog.brightredglow.com,2008-01-17:5017</id>
    <published>2008-01-17T06:33:00Z</published>
    <updated>2008-01-17T06:46:56Z</updated>
    <link href="http://feeds.feedburner.com/~r/defeulerxcosxisinxend/~3/218070511/evil-can-be-dangerous" rel="alternate" type="text/html" />
    <title>Evil can be dangerous</title>
<content type="html">
            &lt;p&gt;The first post I read by &lt;a href='http://blog.fallingsnow.net/'&gt;Evan&lt;/a&gt; about &lt;a href='http://rubini.us'&gt;Rubinius&lt;/a&gt; had a quote about &lt;a href='http://blog.fallingsnow.net/rubinius/'&gt;evil built in&lt;/a&gt;. Of course, that caught my eye. What was Evan’s point? Legend has it (I wasn’t there) that during Q&amp;A someone asked about fundamental aspects of the Rubinius system being available for modification from normal user code. The issue was raised that perhaps something should restrict that unlimited power. Evan’s response was that Rubinius sorta has evil built in. Usually, that’s a good thing.&lt;/p&gt;


	&lt;p&gt;In fact, it’s a very sharp double-edged blade. We all cherish the dynamic nature of Ruby when it allows us to do useful things. For example, the following works great in &lt;span class='caps'&gt;MRI&lt;/span&gt;:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
class Fixnum
  alias / quo
end
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;That little snippet and you’ve redefined fixed-point math to return a floating point number. That gem is one of the core pieces of the Mathn library in the Ruby standard library collection. Together with the Rational library, you can do some cool stuff:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ irb
&amp;gt;&amp;gt; require 'rational'
=&amp;gt; false
&amp;gt;&amp;gt; require 'mathn'
=&amp;gt; true
&amp;gt;&amp;gt; 1 / 2
=&amp;gt; 1/2
&amp;gt;&amp;gt; 1 / 2 + 3 / 8
=&amp;gt; 7/8
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Combine that with Matrix and Rational and you have at your disposal some pretty powerful tools for doing more realistic mathematics. Take a look at &lt;a href='http://google.com/codesearch?q=lang%3Aruby+require+mathn&amp;hl=en&amp;btnG=Search+Code'&gt;what some folks do&lt;/a&gt; with it.&lt;/p&gt;


	&lt;p&gt;Fortunately, and unfortunately, Rubinius is very different than every other implementation of Ruby that I’m aware of. Rubinius follows the Smalltalk model and uses the Ruby language itself to build the implementation. That means that Array, for instance, calculates values for its internal operations using none other than the same Fixnum values that you use in your Ruby code. So, what happens when we redefine Fixnum#/ to return a Float instead?&lt;/p&gt;


	&lt;p&gt;Yes, you guessed right. Things work differently. In fact, not at all.&lt;/p&gt;


	&lt;p&gt;Since we’re not about to rescind the promise of a better Ruby, we have to figure out some way to deal with this. There are several approaches possible. One would be to code all of the core library with a different set of numeric classes, say BasicFixnum and BasicBignum, that are superclasses of Fixnum and Bignum. That would be really cumbersome. Another approach would be to use different methods in the core library. Again, cumbersome. So, this sounds like there are some basic goals we have in mind. In fact, there are. We want to keep the core library code as simple as possible and provide the full power of Ruby at every level, to the greatest extent possible.&lt;/p&gt;


	&lt;p&gt;This isn’t necessarily the ultimate approach we’ll use, but I checked in some code today that leverages a very slick feature that Evan built into the compiler. I created the following compiler plugin:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
class SafeMathOperators &amp;lt; Plugin
  plugin :safemath

  MathOps = {
    :/ =&amp;gt; :divide
  }

  def handle(g, call)
    name = MathOps[call.method]
    if name and call.argcount == 1
      call.emit_args(g)
      call.receiver_bytecode(g)
      g.send name, 1, false
      return true
    end
    return false
  end
end
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Essentially, what this does is map any calls to the #/ method to the #divide method. I’ve changed the core library classes Fixnum, Bignum, Float, and Numeric to handle this. So, the code in core looks the same, but is protected from the redefinition that the Mathn library performs. The compiler plugin is activated with the -frbx-safe-math switch only when compiling the Rubinius core libraries.&lt;/p&gt;


&lt;blockquote&gt;
	&lt;p&gt;&lt;strong&gt;&lt;span class='caps'&gt;UPDATE&lt;/span&gt;:&lt;/strong&gt; Note that you do not have to do anything differently. The compiler flag is passed in automatically when you type &lt;code&gt;rake&lt;/code&gt; to build the Rubinius libraries. If you are writing user code, you also do not need to do anything differently. You just write your code as you normally would. If you require the Mathn library, &lt;code&gt;1 / 2 =&amp;gt; 0.5&lt;/code&gt;. If you also require the Rational library &lt;code&gt;1 / 2 =&amp;gt; 1/2&lt;/code&gt;. Invisible, maybe even a little evil.&lt;/p&gt;

&lt;/blockquote&gt;




	&lt;p&gt;Again, this is not necessarily the way we’ll always do it. The lessons are:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;Ruby is a great, powerful language&lt;/li&gt;
		&lt;li&gt;Rubinius makes Ruby even more powerful&lt;/li&gt;
		&lt;li&gt;We can work around snags pretty dang easily, even if temporarily&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;Of course, we’re always learning. Any papers, systems, code, etc that you can point me to?&lt;/p&gt;
          </content>  <feedburner:origLink>http://blog.brightredglow.com/2008/1/17/evil-can-be-dangerous</feedburner:origLink></entry>
  <entry xml:base="http://blog.brightredglow.com/">
    <author>
      <name>brian</name>
    </author>
    <id>tag:blog.brightredglow.com,2008-01-05:5005</id>
    <published>2008-01-05T22:53:00Z</published>
    <updated>2008-01-05T23:11:38Z</updated>
    <link href="http://feeds.feedburner.com/~r/defeulerxcosxisinxend/~3/211804898/irb-in-the-house" rel="alternate" type="text/html" />
    <title>Irb in the house</title>
<content type="html">
            &lt;p&gt;I’m going to give this live blogging thing a go. As of 14:52 &lt;span class='caps'&gt;PST&lt;/span&gt;, &lt;a href='http://blog.fallingsnow.net'&gt;Evan&lt;/a&gt; announced that &lt;a href='http://rubini.us'&gt;Rubinius&lt;/a&gt; runs &lt;code&gt;irb&lt;/code&gt;. It hasn’t landed in the repository yet, but this is great news. Just a little while ago, we &lt;a href='http://blog.brightredglow.com/2007/2/11/sirb-the-rubinius-loupe'&gt;started with an irb wannabe&lt;/a&gt;. I guess a lot can happen in a year.&lt;/p&gt;


	&lt;p&gt;Congrats to Evan and all the fantastic Rubinius supporters and contributors.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;&lt;span class='caps'&gt;UPDATE&lt;/span&gt;:&lt;/strong&gt; So, I’m not a very good reporter. There’s some other very big news related to getting &lt;code&gt;irb&lt;/code&gt; working. Evan &lt;a href='http://git.rubini.us/?p=code;a=commit;h=d54ed8791a74661adb87c938e92e037ece924c90'&gt;checked in&lt;/a&gt; a working &lt;code&gt;eval&lt;/code&gt; yesterday. Enjoy!&lt;/p&gt;
          </content>  <feedburner:origLink>http://blog.brightredglow.com/2008/1/5/irb-in-the-house</feedburner:origLink></entry>
  <entry xml:base="http://blog.brightredglow.com/">
    <author>
      <name>brian</name>
    </author>
    <id>tag:blog.brightredglow.com,2007-12-06:4997</id>
    <published>2007-12-06T18:24:00Z</published>
    <updated>2007-12-08T07:57:25Z</updated>
    <link href="http://feeds.feedburner.com/~r/defeulerxcosxisinxend/~3/196222048/looking-yourself-in-the-eye" rel="alternate" type="text/html" />
    <title>Looking yourself in the eye</title>
<content type="html">
            &lt;p&gt;I’m hanging out this week at the &lt;a href='http://engineyard.com'&gt;Engine Yard&lt;/a&gt; office in South Park hoping to catch a glimpse of Cartman and pals (I wish!). You’ve heard it all before but I would be remiss to not toss in my congratulations to my new (very soon) colleagues. &lt;a href='http://blog.fallingsnow.net'&gt;Evan&lt;/a&gt;, &lt;a href='http://metaclass.org/'&gt;Wilson&lt;/a&gt;, &lt;a href='http://blog.zenspider.com/'&gt;Ryan&lt;/a&gt;, and &lt;a href='http://blog.segment7.net/'&gt;Eric&lt;/a&gt; are a stellar group of folks and a great bunch of personalities to boot. I am honored and extremely happy to be working closely with them, as well as the fantastic group of contributors world-wide.&lt;/p&gt;


	&lt;p&gt;Everyone at Engine Yard deserves big accolades for the vision, daring, and execution in making all this possible. Here’s my opinion (and gauntlet): This is why it is always the little companies that do something great. I see Ruby in general and &lt;a href='http://rubini.us'&gt;Rubinius&lt;/a&gt; in particular as a powerful antidote to insane lumbering companies that have foisted agony, fear, and self-loathing on legions of otherwise decent folks with their sharp, pointy brackets and stupidly limited language features. Bring your hungry masses to our shores. We have the very ambitious intent to build the best programming language and system to date. Hubris? We’ll see.&lt;/p&gt;


	&lt;p&gt;Oh yeah, but about this looking at your own eyeball without a mirror thing. Some of you may recall that I’ve been working a bit on writing specs for Ruby as part of this project. Since we could not run &lt;a href='http://rspec.rubyforge.org'&gt;RSpec&lt;/a&gt; initially because of its extensive use of very advanced Ruby features, we wrote a minimal replacement for it that I affectionately dubbed mini_rspec. At the time I wrote this, we were converting a ton of specs from the early host/target architecture I started with. We may have been able to run miniunit at that time, but my intention was to write specs for mini_rspec as I went along evolving the features of the framework itself. This is a very difficult bootstrap process akin to looking at your own eyeball… you get the picture. So, I must say I’m solely responsible for this little gem:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
require File.dirname(__FILE__) + '/../spec_helper'

# hmm, this is embarrassing

describe "mini rspec" do
end
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Of course, I took a nice bit of friendly needling (or should I say snickering) from Ryan for that one. But let’s not dwell on the sordid details of the past. Currently, in my branch I have a rewritten (and renamed) mSpec. This is a little better:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
euler:rubinius brian$ spec mspec/spec
.................................................................................................................................................................

Finished in 0.062927 seconds

161 examples, 0 failures

&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;That’s what I’m talking about. This time, I wisely just used existing RSpec to write the specs because my goal is not necessarily to be able to run the mSpec specs with mSpec, but to be able to evolve the system while still keeping layers of it so simple that nascent Ruby implementations will actually be able to use it.&lt;/p&gt;


	&lt;p&gt;A final word about the other approach. We wrote thousands of specs for Ruby using mini_rspec. We ran these specs against &lt;span class='caps'&gt;MRI 1&lt;/span&gt;.8.6 and they behaved as expected. So, those specs were essentially an indirect spec for mini_rspec. The challenge of that approach, of course, is that you do not have a simple and clear way to observe the impact of changes you make to the mini_rspec system. Anyway, I should finish up this massive bunch of changes very soon and push it out.&lt;/p&gt;
          </content>  <feedburner:origLink>http://blog.brightredglow.com/2007/12/6/looking-yourself-in-the-eye</feedburner:origLink></entry>
  <entry xml:base="http://blog.brightredglow.com/">
    <author>
      <name>brian</name>
    </author>
    <id>tag:blog.brightredglow.com,2007-09-20:4834</id>
    <published>2007-09-20T01:19:00Z</published>
    <updated>2007-12-06T17:55:48Z</updated>
    <link href="http://feeds.feedburner.com/~r/defeulerxcosxisinxend/~3/158809999/send-my-love-to-ruby-ii" rel="alternate" type="text/html" />
    <title>Send my love to Ruby II</title>
<content type="html">
            &lt;p&gt;In the &lt;a href='http://blog.brightredglow.com/2007/9/20/send-my-love-to-ruby'&gt;last post&lt;/a&gt;, we saw a nice use case for the &lt;code&gt;#send&lt;/code&gt; method. Now, we’ll see some coolness that Rubinius adds. First, some code:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
class Apple
  def seed
  end
end

a = Apple.new

a.send :seed
a.__send__ :seed
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Now, with the convenient and useful &lt;code&gt;describe&lt;/code&gt; facility of the Rubinius compiler, we can see something interesting:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ shotgun/rubinius describe send.rb
Path: send.rb
Size: 79 bytes

Sexp:
  [:block, 
  [:newline, 1, "(eval)", 
    [:class, [:colon2, :Apple], nil, 
      [:scope, 
        [:newline, 2, "(eval)", set_local_fp 1 ; local a

---- snip ----

pop
#line 8
push_literal 1
get_local_fp 1 ; local a
send send 1
pop
#line 9
get_local_fp 1 ; local a
push nil
push_literal 2
dup
is_symbol
git send_lbl1
send to_sym 0
send_lbl1:
push 0
set_args
send_off_stack
pop
push true
ret

---- snip ----
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;I’ve truncated that output, but feel free to run this at home. (There’s no long lasting side effects other than an itching desire to contribute to the Rubinius project.) If you correlate the assembly with the line numbers in the source, you’ll notice that the two sends are not turning out to be the same. That’s right. We have a special, and fast, &lt;code&gt;__send__&lt;/code&gt; operation.&lt;/p&gt;


	&lt;p&gt;The &lt;code&gt;#send&lt;/code&gt; method is a highly useful bit of Ruby. Unfortunately, there’s some concern that using it can hurt performance. Well, with Rubinius you can have your send and use it, too.&lt;/p&gt;
          </content>  <feedburner:origLink>http://blog.brightredglow.com/2007/9/20/send-my-love-to-ruby-ii</feedburner:origLink></entry>
  <entry xml:base="http://blog.brightredglow.com/">
    <author>
      <name>brian</name>
    </author>
    <id>tag:blog.brightredglow.com,2007-09-20:4818</id>
    <published>2007-09-20T00:25:00Z</published>
    <updated>2007-09-20T01:18:16Z</updated>
    <link href="http://feeds.feedburner.com/~r/defeulerxcosxisinxend/~3/158780931/send-my-love-to-ruby" rel="alternate" type="text/html" />
    <title>Send my love to Ruby</title>
<content type="html">
            &lt;p&gt;Over at the &lt;a href='http://rubini.us'&gt;Rubinius&lt;/a&gt; project, in between hatching plots to take over the world, we fit in some time for recreation. For example, we’ve got this masochistic interest in writing &lt;a href='http://rspec.rubyforge.org'&gt;RSpec&lt;/a&gt; compatible specs for the Ruby core library. One of the challenges there is the large number of aliased methods that Ruby has. Using RSpec’s shared behaviors as an example, I’ve created a flavor of shared behaviors in our &lt;code&gt;mini_rspec&lt;/code&gt; implementation. As the code below shows, this makes it straightforward to spec all these aliases.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
hash_store = shared "Hash#store" do |cmd|
  describe "Hash##{cmd}" do
    it "associates the key with the value and return the value" do
      h = { :a =&amp;gt; 1 }
      (h.send(cmd, :b, 2).should == 2
      h.should == {:b=&amp;gt;2, :a=&amp;gt;1}
    end

    it "duplicates and freezes string keys" do
      key = "foo" 
      h = {}
      h.send(cmd, key, 0)
      key &amp;lt;&amp;lt; "bar" 

      h.should == { "foo" =&amp;gt; 0 }
      h.keys[0].frozen?.should == true
    end

    it "duplicates string keys using dup semantics" do
      # dup doesn't copy singleton methods
      key = "foo" 
      def key.reverse() "bar" end
      h = {}
      h.send(cmd, key, 0)

      h.keys[0].reverse.should == "oof" 
    end  

    it "raises TypeError if called on a frozen instance" do
      should_raise(TypeError) { hash.send(cmd, 1, 2) }
    end
  end
end

describe "Hash#[]=" do
  it_behaves_like(hash_store, :[]=)
end
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;The very cool thing about this is how useful Ruby’s &lt;code&gt;send&lt;/code&gt; method is. And in Rubinius, it gets even cooler, as you’ll see in &lt;a href='http://blog.brightredglow.com/2007/9/20/send-my-love-to-ruby-ii'&gt;part II&lt;/a&gt;&lt;/p&gt;
          </content>  <feedburner:origLink>http://blog.brightredglow.com/2007/9/20/send-my-love-to-ruby</feedburner:origLink></entry>
  <entry xml:base="http://blog.brightredglow.com/">
    <author>
      <name>brian</name>
    </author>
    <id>tag:blog.brightredglow.com,2007-09-17:4831</id>
    <published>2007-09-17T17:54:00Z</published>
    <updated>2007-12-06T17:55:05Z</updated>
    <link href="http://feeds.feedburner.com/~r/defeulerxcosxisinxend/~3/157700967/rubinius-sprint-retrospective" rel="alternate" type="text/html" />
    <title>Rubinius sprint retrospective</title>
<content type="html">
            &lt;p&gt;Last week, &lt;a href='http://blog.fallingsnow.net/'&gt;Evan Phoenix&lt;/a&gt;, &lt;a href='http://metaclass.org/'&gt;Wilson Bilkovich&lt;/a&gt; and I met up in Denver (ok, &lt;em&gt;near&lt;/em&gt; Denver) for some serious &lt;a href='http://rubini.us'&gt;Rubinius&lt;/a&gt; coding, aka a sprint. &lt;a href='http://headius.blogspot.com/'&gt;Charles Nutter&lt;/a&gt; (of &lt;a href='http://jruby.codehaus.org/'&gt;JRuby&lt;/a&gt; fame) flew in just to hack with us for 15 hours straight and then flew back home. Very cool. When do you get collaboration like that from someone on a project that could be seen as a competitor? That’s some serious goodwill, folks, and much appreciated. Charles had his laptop out on the taxi ride from the airport digging into some issues we have with including modules. If you hang out in #rubinius, you know there’s a lot of collaboration occurring on different fronts.&lt;/p&gt;


	&lt;p&gt;This was only the second time I’ve had the pleasure to hang out with these folks in person. The sprint was intended to enable us to get some face-to-face time and work out some foundational issues, hopefully speeding other development and contribution as we head toward &lt;a href='http://www.rubycentral.org'&gt;RubyConf07&lt;/a&gt;. Here’s a few things we accomplished (in no particular order):&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Evan hooked up Syck (the &lt;span class='caps'&gt;YAML&lt;/span&gt; parser) using our very cool &lt;em&gt;subtend&lt;/em&gt; (Ruby &lt;span class='caps'&gt;C API&lt;/span&gt; compatibility) component.&lt;/li&gt;
		&lt;li&gt;Wilson hammered out a bunch of StringIO specs in a couple hours.&lt;/li&gt;
		&lt;li&gt;Evan promptly began writing a Ruby StringIO that passed the specs.&lt;/li&gt;
		&lt;li&gt;Charles whipped out a bunch of &lt;code&gt;def&lt;/code&gt; and &lt;code&gt;case&lt;/code&gt; specs, the latter being a serious beast to compile.&lt;/li&gt;
		&lt;li&gt;Wilson added these wicked colorized backtraces that enable you to quickly pick out the ultimate failure line and some significant points in the backtrace.&lt;/li&gt;
		&lt;li&gt;Wilson implemented the rest of the missing &lt;code&gt;case&lt;/code&gt; support in the compiler.&lt;/li&gt;
		&lt;li&gt;Charles added some basic ObjectSpace support.&lt;/li&gt;
		&lt;li&gt;I checked in a complete reorganization and a lot of fixes to our Ruby core library specs. We have around 2,800 specs, of which we’re passing over two thirds. We still have nearly 50% of the core library specs to complete.&lt;/li&gt;
		&lt;li&gt;Evan fixed our Thread support and added some preemption.&lt;/li&gt;
		&lt;li&gt;I added (with much help from Evan and some serious gdb sessions looking at x86 machine code) some coolness to our foreign function interface (FFI) to support reading and writing to C integers and doubles from Ruby. (The doubles support still needs a magic touch or two from Evan.) With that I was able to finish off our Math methods support and the rest of the Math specs.&lt;/li&gt;
		&lt;li&gt;Wilson hammered out a ton of the machinery necessary to support compiling &lt;code&gt;eval&lt;/code&gt;. If you don’t realize how awesome (and painful) this is, don’t blame me.&lt;/li&gt;
		&lt;li&gt;I started on an implementation of &lt;code&gt;File.fnmatch&lt;/code&gt; in preparation for &lt;code&gt;Dir.glob&lt;/code&gt; (or &lt;a href='http://blog.brightredglow.com/2007/9/17/dear-glob'&gt;dear glob&lt;/a&gt; is it is not-so-affectionately known to me) and cleaned up our fnmatch specs a bunch.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;There’s more where that came from. For all the nitty gritty details, browse the &lt;a href='http://git.rubini.us/?p=code;a=summary'&gt;git repository&lt;/a&gt;. There’s some cool stuff just over the horizon that we didn’t get to. Evan explained in more detail the architecture of our sampling profiler and our debugger support. Let’s just say you’ll be able to profile a Rails app in production with no significant performance penalty. And remote debugging is on it’s way. Seriously, let that sink in for a minute.&lt;/p&gt;


	&lt;p&gt;Interestingly, we did not consume 50 liters of coffee each and we had some incredible Japanese food one evening, thanks to a recommendation from one of Wilon’s contacts. Overall, I’m quite impressed with our progress and highly impressed with the technical prowess of these guys. The point it, Rubinius is quite accessible. It’s also some very cool and very real technology that’s going to make writing, running, living, breathing, and enjoying Ruby &lt;em&gt;a lot&lt;/em&gt; better.&lt;/p&gt;


	&lt;p&gt;And last but not least, a big thanks to &lt;a href='http://www.sun.com'&gt;Sun&lt;/a&gt; for their sponsorship, and in particular &lt;a href='http://www.tbray.org/ongoing/'&gt;Tim Bray&lt;/a&gt; for his advocacy. Rubinius is a small, ambitious project. But at heart, it’s very true to the value of making Ruby fun.&lt;/p&gt;
          </content>  <feedburner:origLink>http://blog.brightredglow.com/2007/9/17/rubinius-sprint-retrospective</feedburner:origLink></entry>
  <entry xml:base="http://blog.brightredglow.com/">
    <author>
      <name>brian</name>
    </author>
    <id>tag:blog.brightredglow.com,2007-09-17:4830</id>
    <published>2007-09-17T07:05:00Z</published>
    <updated>2007-09-19T23:32:29Z</updated>
    <link href="http://feeds.feedburner.com/~r/defeulerxcosxisinxend/~3/157479785/dear-glob" rel="alternate" type="text/html" />
    <title>Dear glob</title>
<content type="html">
            &lt;p&gt;At some point, you likely needed to grab some files and do something with them. You probably had a vague recollection about &lt;code&gt;Dir[]&lt;/code&gt; from reading the Pickaxe book. To refresh your memory, you crack it open and fire up irb. Ah, easy…&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
  irb(main):001:0&amp;gt; Dir['spec/**/*_spec.rb'].each do |file|
  irb(main):002:1* puts file
  irb(main):003:1&amp;gt; end
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;There’s no denying that Ruby makes this task dead simple. So simple, in fact, that you probably don’t think twice about how that nifty &lt;code&gt;Dir[]&lt;/code&gt; method does its work. That is, unless you’re trying to implement it.&lt;/p&gt;


	&lt;p&gt;During the &lt;a href='http://rubini.us/forums/6/topics/59'&gt;Rubinius sprint&lt;/a&gt;, I realized that having this in Rubinius would enable me to make our continuous integration spec runner much better. Now, I know that there’s a &lt;code&gt;glob&lt;/code&gt; function in C that provides behavior similar to what you get in the shell using * and ? to match file names. There’s also a function &lt;code&gt;fnmatch&lt;/code&gt; that wraps up some of that magic. No problem. We’ve got this nifty foreign-function interface (FFI) that &lt;a href='http://blog.fallingsnow.net'&gt;Evan&lt;/a&gt; has graciously provided. Evan recommended I take that route first. Yep, took all of 10 minutes to hook everything up.&lt;/p&gt;


	&lt;p&gt;Of course, it wouldn’t be &lt;em&gt;that&lt;/em&gt; interesting were this the end of the story. It’s not. Our fnmatch specs were mostly passing, but when I looked into the failing ones, I discovered something that I’d probably tried to shield my psyche from. Ruby implements its own fnmatch and glob functions. And when I say ‘implements’, it doesn’t really give you any idea of the pain and suffering involved. Do take a peek:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;The &lt;a href='http://svn.ruby-lang.org/repos/ruby/tags/v1_8_6/dir.c'&gt;Ruby source&lt;/a&gt; (stable 1.8.6)&lt;/li&gt;
		&lt;li&gt;The &lt;a href='http://svn.codehaus.org/jruby/trunk/jruby/src/org/jruby/util/Dir.java'&gt;JRuby source&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;It doesn’t take but a minute to see that &lt;a href='http://ola-bini.blogspot.com/'&gt;Ola Bini’s&lt;/a&gt; java code is extraordinarily more readable than the &lt;span class='caps'&gt;MRI&lt;/span&gt; source. But both are daunting to say the least. So, I’ve decided to take a different route.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
  def self.fnmatch(pattern, path, flags=0)
    pattern = StringValue(pattern).dup
    path = StringValue(path).dup
    escape = (flags &amp; FNM_NOESCAPE) == 0
    pathname = (flags &amp; FNM_PATHNAME) != 0
    nocase = (flags &amp; FNM_CASEFOLD) != 0
    period = (flags &amp; FNM_DOTMATCH) == 0
    subs = { /\*{1,2}/ =&amp;gt; '(.*)', /\?/ =&amp;gt; '(.)', /\{/ =&amp;gt; '\{', /\}/ =&amp;gt; '\}' }

    return false if path[0] == ?. and pattern[0] != ?. and period
    pattern.gsub!('.', '\.')
    pattern = pattern.split(/(?&amp;lt;pg&amp;gt;\[(?:\\[\[\]]|[^\[\]]|\g&amp;lt;pg&amp;gt;)*\])/).collect do |part|
      if part[0] == ?[
        part.gsub!(/\\([*?])/, '\1')
        part.gsub(/\[!/, '[^')
      else
        subs.each { |p,s| part.gsub!(p, s) }
        if escape
          part.gsub(/\\(.)/, '\1')
        else
          part.gsub(/(\\)([^*?\[\]])/, '\1\1\2')
        end
      end
    end.join

    re = Regexp.new("^#{pattern}$", nocase ? Regexp::IGNORECASE : 0)
    m = re.match path
    if m
      return false unless m[0].size == path.size
      if pathname
        return false if m.captures.any? { |c| c.include?('/') }

        a = StringValue(pattern).dup.split '/'
        b = path.split '/'
        return false unless a.size == b.size
        return false unless a.zip(b).all? { |ary| ary[0][0] == ary[1][0] }
      end
      return true
    else
      return false
    end
  end
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;This code is only passing 80% of our existing specs for &lt;code&gt;File.fnmatch?&lt;/code&gt;, so the jury is still out. And I’m sure someone can make this much better. The lesson for me is that 1) Ruby’s implementation is typically &lt;em&gt;not&lt;/em&gt; accessible (I already knew that), and 2) writing Ruby code is a good way to handle tough problems.&lt;/p&gt;


	&lt;p&gt;But then, you already knew that. ;)&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;&lt;span class='caps'&gt;UPDATE&lt;/span&gt;:&lt;/strong&gt; I’ve changed the code here to reflect our current version. It’s now passing 100% of the existing specs.&lt;/p&gt;
          </content>  <feedburner:origLink>http://blog.brightredglow.com/2007/9/17/dear-glob</feedburner:origLink></entry>
  <entry xml:base="http://blog.brightredglow.com/">
    <author>
      <name>brian</name>
    </author>
    <id>tag:blog.brightredglow.com,2007-05-19:4625</id>
    <published>2007-05-19T17:19:00Z</published>
    <updated>2007-05-19T17:22:01Z</updated>
    <link href="http://feeds.feedburner.com/~r/defeulerxcosxisinxend/~3/117996667/railsconf-2007-the-case-of-the-missing-bdd" rel="alternate" type="text/html" />
    <title>RailsConf 2007: The case of the missing BDD</title>
<content type="html">
            &lt;p&gt;Looks like the &lt;a href='http://rspec.rubyforge.org'&gt;RSpec&lt;/a&gt; folks dropped 1.0. Awesome! Congratulations!&lt;/p&gt;


	&lt;p&gt;Hmm, where’s the applause? This is the good shit. People should be knowing about this. So, as I sit here at &lt;a href='http://conferences.oreillynet.com/rails/'&gt;RailsConf 2007&lt;/a&gt; looking over the schedule, I’m not seeing any talks scheduled for &lt;a href='http://behavior-driven.org'&gt;&lt;span class='caps'&gt;BDD&lt;/span&gt;&lt;/a&gt; or &lt;a href='http://rspec.rubyforge.org'&gt;RSpec&lt;/a&gt;. That’s regrettable. So, my goal will be to embarrass, cajole, entice, encourage (pick your emotional poison) you into trying RSpec. Not sure if it’s right for you? Try it. Not sure if it will work well? Try it. Don’t get it yet? Try it, already!&lt;/p&gt;


	&lt;p&gt;And while you’re trying it, think about this: How can descriptions of the behavior of a system form the common language that spans the spectrum of development from clients to developers. Do you think your clients care about how many &lt;code&gt;def test_should_be_super_duper&lt;/code&gt; methods are in your tests? Why would they?&lt;/p&gt;


	&lt;p&gt;Would your customer care about something like this?&lt;/p&gt;


&lt;pre&gt;
The Home page
- has an entry field for username labelled 'User name'
- has an entry field for password labelled 'Password'
- has a submit button labeled 'Log in'
- has a link to retrieve a lost password FAILED

1) The Home page has a link to retrieve a lost password FAILED
   &amp;lt;insert client comprehensible failure message here&amp;gt;
&lt;/pre&gt;

	&lt;p&gt;Do you think this could form the basis of a dialogue with your clients? Would it be easier to trouble shoot this over a client saying, “The lost password link doesn’t work.” Do you see how this could make everyone’s life easier?&lt;/p&gt;


	&lt;p&gt;Is this all there is to &lt;span class='caps'&gt;BDD&lt;/span&gt; and RSpec? No, not by a long shot. So… yeah, you guessed it. Try it.&lt;/p&gt;
          </content>  <feedburner:origLink>http://blog.brightredglow.com/2007/5/19/railsconf-2007-the-case-of-the-missing-bdd</feedburner:origLink></entry>
  <entry xml:base="http://blog.brightredglow.com/">
    <author>
      <name>brian</name>
    </author>
    <id>tag:blog.brightredglow.com,2007-05-19:4624</id>
    <published>2007-05-19T16:12:00Z</published>
    <updated>2007-05-19T16:26:33Z</updated>
    <link href="http://feeds.feedburner.com/~r/defeulerxcosxisinxend/~3/117986387/oh-_why" rel="alternate" type="text/html" />
    <title>Oh, _why!</title>
<content type="html">
            &lt;p&gt;This post has no nutritional value. Feel free to put it over there by the jelly-filled pastry, bearclaw, and glazed pop tart, go back to your granola. You health nuts, you.&lt;/p&gt;


	&lt;p&gt;Now, to the jelly filling. Seems that _why dropped by #rubinius, not once, but twice yesterday. I missed it, but hopefully he’ll be back. For your viewing pleasure (no names have been changed to protect the innocents).&lt;/p&gt;


&lt;pre&gt;
19:06   _why &amp;gt;&amp;gt; whoa
19:06   _why &amp;gt;&amp;gt; well fellows
19:06   _why &amp;gt;&amp;gt; i am blown away!
19:07   _why &amp;gt;&amp;gt; looks like things are really comin along
...
19:30   _why &amp;gt;&amp;gt; oh backflip
19:30   _why &amp;gt;&amp;gt; interpolation works, splat works, IO works
19:30   Vagabond &amp;gt;&amp;gt; spat is pretty new
19:30   Vagabond &amp;gt;&amp;gt; I think it's not completely tested
19:30   shadowfiend &amp;gt;&amp;gt; Yeah, like a couple of hours old :-)
19:31   Vagabond &amp;gt;&amp;gt; it's remarkable how much is actually implemented though
19:31   _why &amp;gt;&amp;gt; yeah it's got that new splat smell

&lt;/pre&gt;
          </content>  <feedburner:origLink>http://blog.brightredglow.com/2007/5/19/oh-_why</feedburner:origLink></entry>
  <entry xml:base="http://blog.brightredglow.com/">
    <author>
      <name>brian</name>
    </author>
    <id>tag:blog.brightredglow.com,2007-05-08:4465</id>
    <published>2007-05-08T17:00:00Z</published>
    <updated>2007-05-08T17:02:27Z</updated>
    <link href="http://feeds.feedburner.com/~r/defeulerxcosxisinxend/~3/115105265/ctrl-c-is-deprecated" rel="alternate" type="text/html" />
    <title>Ctrl-C is deprecated</title>
<content type="html">
            &lt;p&gt;Well, not exactly. But here’s a nice anecdote that will give you pause then next time you sprint for the ^C escape hatch.&lt;/p&gt;


	&lt;p&gt;Yesterday, while compiling Subversion 1.4.3 from source on Ubuntu 6.06, I had invoked the command &lt;code&gt;sudo checkinstall make install-swig-rb&lt;/code&gt; and, thinking it was going to overwrite my previous .deb package for subversion, hit ^C. Now that’s something I’ve done a million times, I’m sure. It’s the panic, “Oh shit, I don’t really want to do that” button. When you realize in a split second that there may be dire consequences from that ill-thought command, it’s a natural reflex.&lt;/p&gt;


	&lt;p&gt;But on that fine day, ^C left me with a root directory that had 700 permissions. The consequence was that nothing except a root shell could spawn. I couldn’t even &lt;code&gt;su &amp;lt;user&amp;gt;&lt;/code&gt; as root. Yeah, that’s right. Insane. And this was on a &lt;span class='caps'&gt;VPS&lt;/span&gt;. Lucky for me, &lt;a href='http://quantact.com'&gt;Quantact&lt;/a&gt; has their Xen &lt;span class='caps'&gt;VPS&lt;/span&gt; setup configured so you can actually access a console remotely without needing to go through your &lt;span class='caps'&gt;VPS&lt;/span&gt;’s networking. Tim at Quantact took a look and suggested that the permissions could be causing the issue. He was right and boy, was I happy that’s all it was.&lt;/p&gt;


	&lt;p&gt;Most likely, something in &lt;code&gt;checkinstall&lt;/code&gt; misbehaved, but needless to say, I didn’t try to reproduce the problem. Now, whenever I head for ^C there will undoubtedly be a microsecond pause to evaluate the relative merits. Hopefully, that won’t result in a &lt;a href='http://en.wikipedia.org/wiki/Buridan\'s_ass'&gt;Buridan’s Ass&lt;/a&gt; dilemma.&lt;/p&gt;
          </content>  <feedburner:origLink>http://blog.brightredglow.com/2007/5/8/ctrl-c-is-deprecated</feedburner:origLink></entry>
  <entry xml:base="http://blog.brightredglow.com/">
    <author>
      <name>brian</name>
    </author>
    <id>tag:blog.brightredglow.com,2007-05-08:4460</id>
    <published>2007-05-08T03:27:00Z</published>
    <updated>2007-05-08T03:29:35Z</updated>
    <link href="http://feeds.feedburner.com/~r/defeulerxcosxisinxend/~3/114953641/the-dev-ilz-in-ur-projects-trackin-ur-changz" rel="alternate" type="text/html" />
    <title>The Dev'ilz in ur projects, trackin' ur changz</title>
<content type="html">
            &lt;p&gt;The &lt;a href='http://devil.brightredglow.com'&gt;Dev’il&lt;/a&gt; is out; get it while it’s hot. What’s that? you’re wondering.&lt;/p&gt;


	&lt;p&gt;This is the story behind it. The &lt;a href='http://rubini.us'&gt;Rubinius&lt;/a&gt; project (where &lt;strong&gt;The Best Ruby VM of All Time&lt;/strong&gt; &amp;trade; is being built) had tried a couple project collaboration tools before &lt;a href='http://blog.fallingsnow.net'&gt;Evan&lt;/a&gt; gave me the ok to try something different. My goal was a project collaboration tool that collected the relevant information in one place, making it easy to access and modify. Communication is key, so I decided to build on the excellent &lt;a href='http://beast.caboo.se'&gt;Beast&lt;/a&gt; forum.&lt;/p&gt;


	&lt;p&gt;The big question is: What is &lt;em&gt;relevant&lt;/em&gt; information? I have some opinions about that. We have a liberal commit bit policy, which encourages a lot of participation. To balance that, we need to always stay on top of what is being committed. In my experience, that means &lt;span class='caps'&gt;RSS&lt;/span&gt; and graphical browsing of Subversion changes. We need tickets to track bugs. However, our tickets are super light. Basically, a ticket has a title, body, and status. A user can &lt;em&gt;take&lt;/em&gt; a ticket to indicate that she is working on it. There are no comments, and no priorities. Tickets are versioned, so a user cannot destroy pertinent information. The ticket body should always be the definitive statement of the problem. No browsing through comments and attachments trying to figure out what is relevant. I’ll be writing more about the design decisions in the &lt;a href='http://devil.brightredglow.com/pages'&gt;Dev’il docs&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;I do owe a big debt to &lt;a href='http://trac.edgewall.org/'&gt;Trac&lt;/a&gt; , &lt;a href='http://collaboa.org'&gt;Collaboa&lt;/a&gt;, &lt;a href='http://software.pmade.com/devalot'&gt;Devalot&lt;/a&gt; , &lt;a href='http://retrospectiva.org'&gt;Retrospectiva&lt;/a&gt;, mostly for showing me (especially Trac) what I did not want to do, which can be a great source of inspiration. The name itself came from a combination of pure frustration working on Devalot and Evan’s quote about rubinius having “a little evil built in”. It was mostly a response to the “alot” in Devalot. I wanted something much lighter and easier to understand and use. Anyway, if you’re offended by the name, it’s very easy to change: drop a file named &lt;code&gt;project.rb&lt;/code&gt; in your lib directory that contains your project name.&lt;/p&gt;


	&lt;p&gt;The project is still under development. I’ve released the source because a few folks were clamoring for it. Drop by the &lt;a href='http://devil.brightredglow.com/forums'&gt;Dev’il forums&lt;/a&gt; for features in the works and to offer up some feedback.&lt;/p&gt;
          </content>  <feedburner:origLink>http://blog.brightredglow.com/2007/5/8/the-dev-ilz-in-ur-projects-trackin-ur-changz</feedburner:origLink></entry>
  <entry xml:base="http://blog.brightredglow.com/">
    <author>
      <name>brian</name>
    </author>
    <id>tag:blog.brightredglow.com,2007-04-12:4266</id>
    <published>2007-04-12T06:30:00Z</published>
    <updated>2007-04-12T07:57:56Z</updated>
    <link href="http://feeds.feedburner.com/~r/defeulerxcosxisinxend/~3/108471088/needmore-designs" rel="alternate" type="text/html" />
    <title>Needmore Designs</title>
<content type="html">
            &lt;p&gt;That pretty much sums up my feelings about the majority of the interactive gadgets I encounter, soft or hardware. So, I’m delighted to have the good fortune of joining the talented folks at &lt;a href='http://needmoredesigns.com'&gt;Needmore Designs&lt;/a&gt;. It’ll be a challenge to keep the code as beautiful as &lt;a href='http://needmoredesigns.com/projects/'&gt;these designs&lt;/a&gt;, but using &lt;a href='http://ruby-lang.org'&gt;Ruby&lt;/a&gt; makes that a delicious challenge indeed.&lt;/p&gt;


	&lt;p&gt;One particularly generous perk for a company this size is that I’ll be able to spend around 20% of my time working on, I like to call them, “personal development” projects. Of course, I plan to contribute that to bettering the Ruby community. In particular, I’ll be spending a good portion on the &lt;a href='http://rubini.us'&gt;Rubinius&lt;/a&gt; project. This alternative Ruby implementation aims to create an accessible, extensible, powerful, and &lt;em&gt;fast&lt;/em&gt; virtual machine. We’re implementing as much as possible in Ruby and we have a lot of very cool things either implemented or in the works.&lt;/p&gt;


	&lt;p&gt;Not only will this project contribute to Ruby being more suitable for a wider variety of computing tasks, but using rubinius will actually be great for the environment, too! Far fetched? Nope. Our continual thirst for more computing power translates to increasing demand for energy. Any type of energy pretty much means some contribution of carbon to the already overloaded atmosphere. So, when rubinius runs your favorite Ruby applications and web 2.0 sites more efficiently, that reduces the required energy and that’s better for the environment. Ok, I’ve never made that pitch before but it’s a great reason join up and help out.&lt;/p&gt;


	&lt;p&gt;So, your moment of zen: not only has &lt;a href='http://needmoredesigns.com'&gt;Needmore&lt;/a&gt; given me this great opportunity to work with talented design professionals, but they’re also contributing to a better environment. And if you treasure the abundance of green that we are privileged to have all around &lt;a href='http://maps.google.com/maps?f=q&amp;hl=en&amp;q=Portland,+OR&amp;layer=&amp;ie=UTF8&amp;z=12&amp;om=1'&gt;Portland&lt;/a&gt;, you know that’s a very cool thing. Around the circle goes.&lt;/p&gt;
          </content>  <feedburner:origLink>http://blog.brightredglow.com/2007/4/12/needmore-designs</feedburner:origLink></entry>
</feed>
