February 2012
1 post
This tumblog is dead-is-dead-is-dead
You’ll now find me at regretful.ly Same infrequent posts, same lack of attention, same adoration of all impractical, but now with a newer, sadder name. Win win!
Feb 4th
1 note
December 2011
1 post
Decomposition through exposition towards eventual...
Decomposition through exposition towards eventual composition or Why FP? Why FP Simple to reason about inputs yield outputs data and behavior are the same Simple to decompose functions are truly first class when everything is composed of functions/data powerful patterns of abstraction become available currying Simple to compose partial application | a function without all...
Dec 3rd
October 2011
1 post
The problem with blogging is blogging
There are two things that immediately strike me as problematic when trying to talk to you (dear reader audience), and those are as such: ego and confidence. Perhaps with more concision that could be said as solely confidence.  I need to feel good about what I’m saying to you personally, which I seldom do. I often reflect fondly upon things I’ve done or said or created in the past, but...
Oct 23rd
2 notes
March 2011
1 post
3 tags
An exploration of the Maybe Monad in Ruby
A (perhaps crude) exploration of the Maybe Monad in Ruby. I realize this is somewhat treaded turf, however it was done for my own learning, and I think came out pretty clean!  Needs tests and could be made more flexible, yada yada. Usage: nil.maybe { |n| n + 2 + 3 } => nil Which is essentially the same as nil.try(:+, 1).try(:+, 2).try(:+, 3) If the result is nil anywhere in the...
Mar 17th
13 notes
October 2010
1 post
1 tag
Object.antialias_method
I doubt I’d actually do this, but the pattern of defining a method, only to have it return the inverse of another method is common enough. ie: def unregistered? !registered end But alas… stupid ruby things are fun. So there. edit:  Oh, hey common lisp, whatup? complement!
Oct 23rd
August 2010
1 post
1 tag
Ruby Debug in Ruby 1.9.2
Currently, ruby-debug19 head is broken in ruby 1.9.2 in your Gemfile, have you happily debugging again.  Thanks to abuiles for finding this solution :) (og thread)
Aug 23rd
June 2010
1 post
2 tags
Easy Parallelism in Ruby
Last week, @voxdolo and I were faced with a problem: our application needed to make 3 API calls at once, and while two of the services were ok (finishing in three seconds or so), the third would take up to 8 seconds to retrieve it’s data.  When done synchronously this meant on a good day we’d get out in 14 seconds, which is simply unacceptable. After deciding we didn’t want to...
Jun 2nd
14 notes
May 2010
1 post
1 tag
May 6th
2 tags
Enumerable ! methods and Mongoid
One should be aware when using ! methods (slice!, map!, etc!) on the collections returned from Mongoid queries ie:  foos does not have foo1..3 shifted from the array as you’d expect, it’s state has not been mutated. I’m not sure if this is by design or otherwise (it most certainly is a by-product of the lazily evaluated nature of Mongoid queries, but for the time...
May 1st
8 notes
April 2010
2 posts
1 tag
Install RubyCocoa on RVM
I’ve been using RVM (and gemsets) to manage my Rubies lately, to much success. I however ran into the issue today of trying to install rspactor (think autotest on ‘roids) which depends on RubyCocoa to monitor changes to the filesystem. As it would turn out, when you vanilla install a Ruby via RVM, RubyCocoa is unsupported. To enable installation of RubyCocoa you’ll need to set...
Apr 28th
5 notes