Two Cool Ruby packages: R-Bus and ActiveResource
I came across two Ruby packages today that got me interested today. Every time I go on RubyForge, I find something cool.
Ruby finally gets on the Bus
Until recently, there has been no way for Ruby to use D-Bus; the bindings someone had previously written were badly out-of-date. Fortunately though, Kristoffer Lundén took up the challenge and wrote a decent binding called R-Bus. This means that Ruby can use all of the system services, from receiving hardware notifications to changing the media track in Rhythmbox.
ActiveResource – like ActiveRecord for Web APIs
I was always wondering why using web APIs in Ruby wasn’t as easy as it could be, but 37Signals fixed that right up: I tried out the Highrise API and it’s great. Dump your entire Highrise contacts in human-readable format in two lines (assuming you use the irb call described in the Highrise API docs:
Highrise::Person.each { |x| puts x.to_yaml }
It doesn’t get any better than that. I’m pretty sure if Ruby fixes its runtime problems (like green threads + blocking IO) it will be the best programming language on the planet, at least in terms of lack of developer pain.