Verbose Logging

software development with some really amazing hair

T + S G I F R

Archives for 9/2011

Proc, Block, and Two Smoking Lambdas

· Posted in Programming
Ruby 1.9 has 4 different ways to deal with closures. Cue music Proc Procs are the weird ones of the bunch. Technically, all of these things I'm going to describe are Procs. By that I mean, if you check the class, it's a Proc. A Proc is made by using Proc.new and passing a block, Proc.new { |x| x }, or by using the proc keyword, proc { |x| x }. A return from inside exits completely out of the method enclosing the Proc. A Proc doesn't care about t…

Rubygems Beyond The Thunderdome

· Posted in Editorial
Stop me if you’ve heard this one before. You get into some new tech over the weekend. With enough excitement to kill a horse, you whip up a ruby gem and put it on Github. You get a few hits, some people using it over the next little while. A few bugs get reported, and you fix them. A few features get requested, and you implement them. A few pull requests get submitted too, and you merge them. You’re using it yourself, so you’re finding your own …