Merb on Rubinius

May 10th, 2008

Now that we have working OpenSSL support, we can run Merb:
fastness ➞ merbinius -a webrick
 ~ Loaded DEVELOPMENT Environment...
 ~ Compiling routes...
 ~ Using 'share-nothing' cookie sessions (4kb limit per client)
 ~ Using Webrick adapter
 ~ WEBrick 1.3.1
 ~ ruby 1.8.6 (05/07/2008) [i686-apple-darwin9.2.2]
 ~ TCPServer.new(0.0.0.0, 4000)
 ~ Rack::Handler::WEBrick is mounted on /.
 ~ WEBrick::HTTPServer#start: pid=61939 port=4000
 ~ accept: 127.0.0.1:59883
 ~ Rack::Handler::WEBrick is invoked.
 ~ Request: 
 ~ Routed to: {:action=>"index", :controller=>"hello"}
 ~ Params: {"action"=>"index", "controller"=>"hello"}
 ~ {:after_filters_time=>1.8e-05, :before_filters_time=>3.1e-05, 
     :dispatch_time=>0.069112, :action_time=>0.068106}

This question cropped up in #rubinius today, and I'll toss the answer out there because Google wasn't particularly helpful at the time.

There are several common ways to search for a commit message in git, but in this case, we are looking for a piece of text that will only appear in the full diff.

Since you already know the string you are searching for, paging through all the changes in a particular file seems wasteful.

I am (now) aware of two ways to do this with git:

  • git log -S'some_string'
  • git whatchanged -p (after the pager comes up, type '/' and then 'some_string')

If you know of a better trick, feel free to post a comment.

Captured On Video

February 18th, 2008

InfoQ just posted a video interview they recorded with me at the last RubyConf. I haven’t been brave enough yet to watch it, but you could check it out and then come tell me how badly I embarrassed myself.

Click here to unveil the terror

Implementing define_method

September 17th, 2007

A walkthrough of how 'define_method' is implemented in Rubinius
Read the rest of this entry

Lame Code Considered Harmful

December 28th, 2006

In this chapter, our intrepid hero writes slightly-more-tolerable code. Read the rest of this entry

Making a mockery of ActiveRecord

December 22nd, 2006

A code walkthrough; specifying the behavior of an ActiveRecord model 'mock-first'... Read the rest of this entry