Archive for December, 2008

Peace on Earth, good will toward Ruby web framework programmers

Tuesday, December 23rd, 2008

I’m reading the news on Twitter that a remarkable and wonderful thing has happened in the world of Ruby web developers: Rails and Merb are going to merge. Here are announcement posts from DHH and Yehuda Katz. And here is the requisite humorous site tracking whether the two are combined. As Matz says (by way of bryanl), “Love matters. It’s the greatest reason behind Ruby.”

Besides being encouraging to see two camps of alpha-geeks put ego aside for the common good, I think the rapprochement is tremendously good for the Ruby world and for web developers. The two camps are agreeing to take what’s best about each platform and put it in the new one. As a Rails developer, I get the Merb team’s improvements and advancements without having to choose a different platform. Merb developers get to practice their techniques within the Rails juggernaut and become Rails performance experts in the process. 2009 is already looking better.

Implementing SICP-style streams in Clojure

Thursday, December 11th, 2008

Many people approaching a new language, particularly a new Lisp, often explore the new language by attempting to implement examples and exercises from canonical Lisp texts. Paul Graham’s On Lisp, Peter Siebel’s Practical Common Lisp, and Abelson and Sussman’s SICP are ususal suspects. I’m not going to attempt any large-scale “translation” of SICP into Clojure, but I do think the section 3.5, on streams, sheds a lot of light on the lazy sequences in the new language.


Hash#collect, Hash#inject, and Ruby’s remarkable Enumerable module

Thursday, December 4th, 2008

I haven’t posted about Ruby in a while, in part because I’m excited about learning Clojure and (possibly) Haskell with a bunch of fellow language geeks (er, software professionals). But I do >50% of my daily work in Ruby, and I do think about it a lot. Today I was reminded about how much useful knowledge and mastery lies hidden in the corners of constructs one may think one knows well. The reminder came to me courtesy of Hash#collect, which returns an array, not a hash. Needing a hash from an operation on a hash, it was time to do a little digging and a little learning.