Recently, I was writing some simple statistical calculation software running tests on small data sets with a floating sample “window” through the data. Basically, this becomes a O(n^2) over Mann-Whitney U. It was fast enough for small data sets — that is until I was asked to scale the data size by about an order of magnitude.
What to do? We had plenty of hardware and I was developing on a quad-core Xeon (!!!) so why not throw more hardware at it. I was only using one core. So how do I get to the other three? Enter Rinda — a Ruby implementation of Linda.Entries Tagged 'Ruby' ↓
Rinda or “Hardware is Cheap So Let’s Use More of it!”
February 25th, 2008 — Ruby
MediaWiki Film lookup gem
February 9th, 2008 — Ruby
After far too much goofing off, I’ve finally gotten off of my tuckus (metaphorically only
) in order to write some code. In a few short hours of work, I’ve almost finished a first pass at my Wikipedia film gem. It’s sole purpose is to help me automate the download of movie synopses and posters for movies stored on iTunes for display on our AppleTV.
I’d left this project fallow for at least a half a year now. It was amusing to return to it later, with far better Ruby chops, and get it working. Now that the unit tests pass and the movie lookup driver seems to handle the majority of the bizarre errors that can occur as a result of the imperfect taxonomy used by Wikipedia, I’ll probably post a link in the next few days.
Extremely excited about OmniFocus’ web application
December 18th, 2007 — Ruby, Ruby on Rails
Lo and behold, Omni Group’s OmniFocus beta used to have a web application built in to allow folks to, say, expose a web server via dynamic DNS that provides web access to their OmniFocus’ projects and contexts.
That app is written in, you guessed it, Ruby on Rails!
The current version of the web application is available here.
Oh, and I just double-checked with Omni: they’re AOK with starting a project up on RubyForge to maintain the OmniFocus web application under an MIT license.
I know what I’m going to be playing with for the next several days/weeks/months now….
A time to revisit old gunk
October 31st, 2007 — Ruby, RubyOSA
Steven Bristol noted that the posted version of my “Change IM Status” script doesn’t work in Leopard. That may be as I’ve tweaked the heck out of it over the past several months but never posted the updates.
Hell, this is the first that I’ve heard of anyone else using the little beast. Cool!
What I really want to do with my IM/messaging apps is selectively block contacts programatically. This would let me build an “I’m Working” state where I could block out the world except for my immediate colleagues, for instance. Being somewhat ADD-ish (show me a developer who isn’t!) and a nearly-compulsive checker of incoming e-mail/IMs, this would be huge for me. I’m DYING for this.
Sadly, neither app seems to provide that level of event to OSA such that I could “veto” an incoming chat. I’m probably SoL regarding Skype but perhaps not so with Adium. I taught myself Objective-C for shits and giggles a few months ago after a chat with uber-hacker Marcel Molina. Maybe the Adium folks would be amenable to a new feature?
I’d still prefer for an event-based architecture where I could register my app for OSA events from Skype/Adium and use them to effect Skype/Adium.
Hrm. I wonder if iChat provides a more robust OSA model? Worth a looksy.
P.S. I’m ticked that the “Current Application” -> “Show Menu Items” feature of Quicksilver seems to be broken in Leopard. I loved this feature for blog posting from TextMate…
Ruby East
October 1st, 2007 — Ruby
Ruby East, on the whole, was a fine conference. I, and several other conference attendees, noted that the local Ruby conferences seem to be just that: Ruby conferences. They seem to eschew addressing Rails and prefer to discuss a wide range of topcs.
I really like this.
I was among many who expressed disappointment with the high level of abstraction in the RailsConf ‘07 talks. Very few of them got into the weeds, talked about the code, and challenged the listener technically. I’m not sure about the (extremely few) rest of you but I go to these conferences to hear what my peers are doing, why, and determine if I should consider trying new technologies and techniques. For that to occur, I need to obtain at least a certain minimum depth of technical knowledge of a topic. Hoedown (especially) and Ruby East proved satisfying in that regard.
And, of course, there was Werewolf. Travel to exciting conferences, meet new and interesting people, and lynch and/or eat them. Who would imagine that a game involving argument, bluffing, and outright coercion could be such a team building exercise? It was a pleasure meeting, eviscerating, and being eviscerated by everyone.
Anyhow, below are my notes from Ezra’s Ruby East talk — far and away my favorite talk. For more notes from Ruby East, see Giles Bowkett’s notes on Pastie.
NovaRUG: BDD with RSpec
September 20th, 2007 — NovaRUG, Ruby
Yesterday evening, I gave a presentation on the macro level of Behavior Driven Development and the basics of RSpec to the Northern Virginia Ruby User’s Group. Sadly, either the group was either unhip to LOLCats or simply was not amused by my sense of humor. O, the humanity.
In any events, PDFs of the slides are linked below.
Incidentally, here are some links to Heckle and rcov that are referenced within the presentation (and easily supported from RSpec).
Building RMagick on OS X
September 9th, 2007 — Mac OS X Software, Ruby
I’d always heard that building RMagick was supposed to be just this side of Hell. However, some intrepid soul (I’m sorry, I lost the original post), listed several steps for building RMagick. I put these steps together into a single bash script that downloaded everything that I needed and built RMagick with only a few complaints and what seems to be a working final product. Just beware that the script is nothing fancy, i.e., it is hard-coded to what I believe are the current versions of the RMagick dependencies.
Follow the link for the script.
RubyOSA presentation to Northern Virginia Ruby Users Group
August 22nd, 2007 — NovaRUG, Ruby, RubyOSA
This evening’s NoVaRUG was a good time. Rodney Degracia spoke first about RubyCLR, which provides a dynamically generated bridge between a Ruby VM and the RubyCLR. If I ever need to get at .NET internals again, now I know how I’m going to do it. In fact, I dropped an e-mail to a colleague in the office about it — except that his assembly is executed from Python. A quick Google turned up “Python for .NET” as an option.
Then it was my turn to talk to RubyOSA and RB-AppScript. Admittedly, after using both, I’m strongly biased toward RubyOSA. I have the distinct feeling that, after my presentation, the audience felt the same way.
Well, the Mac users in the audience.
Out of twenty or so people in the room, it turned out that I was really presenting to perhaps five or six Mac users. I suppose that RailsConf is in no way representative of your average Right Coast Ruby developer. However, oddly, nearly everyone stayed for my presentation. I even fielded several good questions. All in all, I had a blast.
When Xandy asked for topics for next time, I asked if someone would present on RSpec. His next words were, “Thanks for volunteering, Evan.”
Time to learn RSpec…
Slides available here: OS X Scripting with Ruby
Three words: “Ruby on iPhone”
August 19th, 2007 — Ruby, iPhone
Yes, that’s right, ladies and gents. Thanks the hackery of a great many individuals (no, I am not among them), just this evening, I ran the following on my iPhone:
ruby -e “10.times { puts ‘foo’ }”
You can guess what happened.
Here’s how you do it, in short order, with minimal agony: Use the unofficial Installer.app developed by some folks at NullRiver. That’s it! From there, install the “Community Sources”, install “Ruby”, the BSD extensions, and “Mobile Terminal” and then go rubify yourself.
Ironically, this is not officially a product of theirs — more than likely because it is unwise to declare third party software for the iPhone as an official product at this tenuous time.
I wonder how long it will be before some intrepid Ruby coder works out a way to get to UIKit easily from Ruby and gens up some rdoc for it. I wonder if SWIG would help here?
Just for giggles, I tried:
ruby -e ’start=Time.now;a=1;b=1;1000000.times {a=a+b};puts a;puts “time: #{Time.now - start}”‘”
On my 2.16 Ghz Core Duo Macbook Pro, this took 0.280763 seconds. On the iPhone, this took 10.060393 seconds.
Looks like a speed difference of a factor of 50 for this simple computation.
Update: Um, ok, maybe it’s closer to 36 than 50.
More RailsConf 2007 Material
June 20th, 2007 — Ruby
Here are recordings for the following sessions:
- respond_to :voice - Jonathan Palley - Possibly the single coolest demo and most enabling new technology out of RailsConf. Let’s see you write jajah in 15 lines of code.
- RESTful Development - F. Morgan Whitney
- Video and Rails - Jonathan Dahl
Also, here are Andrea O.K. Wright’s slides from her respond_to code walkthrough presentation. This was one of the most technical and in-depth code walkthroughs other than the “Rails Way” walktrhough. Enjoy!




