IronRuby = (Ruby + .NET)!

IronRuby is out in the open! And I’m digging it!

If you have been reading my most recent posts, you’ll see that I’ve recently started getting into Ruby. Partly that’s due to attending and speaking at eRubyCon but I wouldn’t have gone to that conference had I not been interested in the technologies. I had first seen some of Ruby when I met John Lam at VSLive Toronto in 2006. He did a keynote talking about languages with Ruby being his language of choice. It was a thought provoking talk but I didn’t quite get it. At some point, I started noticing Scott Hanselman start talking about using some of the testing tools in Ruby such as Watir. This intrigued me but I really didn’t start getting interested in Ruby until I met Joe O’Brien when he did a session at CodeMash 2007. I really didn’t have a chance to play with Ruby until I signed up to talk at eRubyCon and deliberately picked a topic that would require that I learn some Ruby. I probably could have just done a talk on Silverlight as a web front end and danced around the interop questions but I wanted to do something a little more substantial. The end result was that I wrote a Ruby on Rails app that serves up a Silverlight front end that then turned around and asked for JSON objects from the Rails back end. This was a cool demo! Ok – I didn’t get a standing ovation but I thought it was fantastic and well received. In the process, I picked up a copy of Dave Thomas’ Agile Ruby on Rails Development (See below) on a suggestion by Joe. it turned out to be a great book that walked through some very practical examples and labs. It was fantastically easy to toss together a site with InstantRails following Dave’s tutorial. (I’m still reserving judgement on Ruby On Rails as a framework. There are some things that I really like about it and some that I really don’t. I need to spend more time looking at it and separate it from Ruby and decide on the framework’s attributes independently of Ruby.)

Glenn VanderburgI was asked this week by a fellow Architect Evangelist what I liked about Ruby as I kept babbling on about it. The easiest thing that I can do is point out Glenn Vanderburg‘s “The Beauty of Ruby”. The whole talk is online. He did a variant of this talk at eRubyCon. He points out a handful of high level things that really make Ruby a fantastic language. Ruby is a fantastic blend between simple elegance and rock your world unbelievable power. It has a very clean but flexible syntax. There is just enough punctuation to make things readable without requiring a lot of extra bits. Another powerful bit that took a while to get my head around is that everything is an object from class declarations to instances to methods to variables to everything. And you can ask just about everything questions about itself, ask it to do stuff or pass it around and into new contexts. I’ve been enamored of .NET’s Reflection with it’s ability to self inspect and dynamically figure out context at runtime but I had no idea how powerful this type of work could be until I saw Ruby’s meta programming layers. The metaphor that I used to explain this to a friend is that you can walk into a dark room and bump into someone and simply by asking them questions, you can turn on all the lights and see what’s around you. That’s the feel that I get from Ruby and it’s extremely powerful self inspection. There are a lot more things that are interesting about Ruby but those two things – the simple but flexible syntax and the extremely powerful meta programming – are the heart of what I like about it right now.

Now that we have an IronRuby implementation that we can start playing with, I’m even more excited about it. This means that I’ll have all the power of .NET at my fingertips with the power of Ruby. This makes for a very attractive package. Being build on top of the DLR (Dynamic Language Runtime) is very important as well because does two things. One, it enhances the Ruby implementation and two it enhances the DLR implementation. Scott Guthrie talks a little bit about the idea of “Dynamic Sites” which is a cashing mechanism from the DLR that IronRuby takes advantage of. However, John Lam talks about on his .NET Rocks episode about the DLR that they found and fixed bugs in the DLR. Through the DLR, we are going to have a fantastic dynamic type system. This type system allows all of the languages of .NET, dynamic and static, to share common types without having to do translations back and forth. There are a number of things that it doesn’t do yet, the most notable being that it doesn’t implement interfaces yet. This is not a big deal to Ruby and Python, but it is a big deal to VB.NET and C#. I know that this is coming – it’s just a matter of time. Jim Hugunin talks a lot about the DLR and the type system on this blog.

What’s missing right now from Ruby is tooling. I’ll admit it, I’m still addicted to my “intelli-crack” and there are not a lot of great IDEs for Ruby that include intellisense. It’s hard to get right because of the dynamic nature. There are some tools that are out there, but not any that really get it right. Most of the people in the Ruby community don’t worry about the tools – in fact there was a huge argument over whether VI or Emacs was a better editor for Ruby (Emacs won…). I’ll be honest – I was a little blown away that this is still a conversation.

RubyForgeOne interesting part of the IronRuby implementation and release is that John has make the decision to release IronRuby on RubyForge rather than CodePlex. Scott Guthrie talks about this on his blog. John decided that there would be a lot more community involvement with IronRuby if he did it on RubyForge than on a Microsoft property. I think this is a smart move that shows some dedication to making this a true community driven initiative. I say bravo John!


Additional Reading:

John Lam, who is the architect of Iron Ruby who wrote A First Look at IronRuby

Scott Guthrie, who has a nice sample on using IronRuby with WPF

Jason Zander, on working with the open source community

Miguel de Icaza, for an outside perspective of our changes as a company


eRubyCon Day 3 – Recap

eRubyCon wrapped up yesterday.

First talk of the morning – I heard Muness Alrubaie and Dan Manges, both from ThoughtWorks, talking about Ruby and Agile on a large project with ThoughtWorks. They have 30 people working on a single app – all at one war table in a conference room in Atlanta for 10 hours a day 4 days a week. They pair with the guy next to them. They shift pairs on every iteration. They move extremely quickly. It was interesting to hear them talking about the challenges of working an agile project with that many people. One of the small changes was that they had to formalize the format of their story cards, estimation and such. On smaller teams, they could be a touch looser because people all knew each other and each others styles. They standardized on the desktop setup, toolset that they are going to use, configuration of the tools such as colors in the editors and other things that are usually personalized per developer or at least on a pair level. The big thing that would have been fantastic to see would have been a ton more on the gotchas and pitfalls to watch out for. These are hard to verbalize but important. Some of these can be inferred from the things that they had to alter for the the larger group. They didn’t go into detail on issues that they had with integration which I’m sure that they had with that many pairs making extraordinarily aggressive changes a language that’s a compact as Ruby is. That has to lead to stomping on each other occasionally. It was a fantastic talk – I just always want more. One thing is for sure – they are proving that agile can work in large projects.

Josh HolmesThen I got to talk! This was a ton of fun. I’ll be honest, it was daunting to be speaking at eRubyCon and especially after so many fantastic speakers. My session was an introduction to Silverlight for Ruby programmers. My big demo was that I wrote a simple rails app that served up a Silverlight front end and then the Silverlight front end communicated back to the server via JSON. That was cool. I’ll be posting my slide deck here in a little bit. It’s not all my deck, I stole a lot of it from Scott Barnes and adapted it to work with my style and such. I did video the talk and plan on posting it at some point in the near future – but that’s going to take some work and time. I really wish that I had been able to show IronRuby off, but I don’t have any bits as they are supposed to drop next week. To quote John Lam, I had an “unfortunate timing issue” as the team is putting something out publicly next week.

After that I got to listen to Glenn Vanderburg with the closing keynote of the conference. He talked about a lot of the things that I’ve been talking (I need to blog a lot of this) about recently with IT as a cost center and how that’s dangerous. He had some great points about the implications of cost centers. In short, cost centers lead to wanting to cut down on the costs which leads to wanting to build things fast, cheaply and have them last for 30 years and are easy to update and change constantly to meet new requirements and regulations. He quoted Scott Bellware quite a bit and talked about the process of “Software Creationalism”. In short, Scott’s (and Glenn’s) contention is that the vast majority of tools and frameworks out today are all about the point of creation of software and don’t have nearly enough focus on the ongoing survivability and maintenance of the application. That results in “The creation of software is easy but the changing of software is hard”. I strongly agree that this is the current state of the discipline. Obviously, his conclusion is that what the enterprise needs is agile development. “To make it easier to change software, then built it by changing it”.

Another great quote – “If that’s not a one line change, then we need to refactor until it is.” – Glenn Vanderburg, eRubyCon 2007.

Software Creationalism – Scott Bellware [MVP]

erubycon – Columbus, Ohio 7/16-7/18

I’m speaking at eRubyCon next week (7/16-7/18) joining the other speakers such as Neil Ford, Justin Gehtland, Jim Weirich and Joe O’Brien among many others. It’s going to be an exciting conference. I’m speaking on Silverlight (keep scrolling down – it’s about halfway down). Here’s the Abstract:


Introduction to Silverlight

Silverlight is the latest in the continuum of technologies from Microsoft to help you create differentiated user experience in the supplemented web space. Based on XAML (eXtensible Application Markup Language) for its UI and backed by a number of different options for logic including C#, JavaScript, Visual Basic, IronPython or IronRuby (once it’s released) – it’s a exciting new tool in the back of tricks for any web developer. It brings with it a rich networking stack, fantastic media support, scalable vector graphics and much more on both Windows and the Mac in all of the major browsers including IE, FireFox, Safari and Opera. In this session, we will explore the boundaries of Silverlight, see the integration points and hosting options between Ruby and Silverlight and talk some about what’s coming with IronRuby.


I gotta say, it’s been a ton of fun putting together this session (not implying that I’m done). I’m playing with so many new technologies and ideas that I’m sure that I’m doing things exactly wrong but it’s fun and I’ve got a cool demo working. I wish that I had IronRuby bits, but the IronRuby bits are to be released at Oscon the following week according to John Lam

erubycon – Columbus, Ohio