Monthly Archives: November 2011

timing-convenience, a Haskell package

I’ve been working on packages to make it easier to write in my favorite scripting language, Haskell. The first to make it on Hackage is timing-convenience. Install as usual: Then you can get the time three days ago: (See why I call it a scripting language? I’d like to see Perl be that obtuse!) I […]

Dynamic Class Methods in Ruby

Rails has a whole slew of class methods that really should be instance methods. The most notable of these methods is ActiveModel::Naming‘s model_name, which is a class method that is expected on every ActiveModel object (for example, it is expected by form_for). This code uses that as an example, but the pattern applies anywhere. If […]