Is your local hardware store owner on the no-fly list?
In the process of remodeling our basement, we found part a March 1959 issue of the Deseret News and Telegraph stuffed up in the ceiling. I could go on and on about some of the fascinating parallels with content you'd find in any major newspaper of 2008 -- some things really never change. But this hilarious post-McCarthy-era comic took the cake for me:
The late '50s also appears to be one of those periods when everybody wanted good mileage from their vehicles -- most every car ad prominently displayed a MPG rating. Did you know that the 1958 Renault 4-door sedan got 40 MPG?
On Desolation Trail, near Salt Lake City. We saw the biggest rattlesnake I've ever seen, I'm kicking myself for not getting a photo before it got out of view.
Phun finally has an OS X port! Playing with this game brings back memories of the first time I threw away the Lego instructions and decided to build what I wanted to build.
Neo4j, a database storage engine that operates on nodes and "relationships" (edges). Designed for fast traversals of the network.
Greek Iced Coffee (Frappe)
- prep time: 2 minutes
- ingredients:
- 2 tsp Nescafé instant coffee granules
- 1 tsp sugar
- 1/2 cup milk
directions:
comments:
Apparently this has become something of a national drink in Greece over the last 50 years. I was skeptical about using instant coffee, but it works really well in this recipe. You wouldn't get the same kind of foam on top with normal coffee grounds. It's a great summer alternative to iced latte if you don't have an espresso machine. My next experiment will be to pick up some irish creme or vanilla flavoring and try adding that.
Each of those pixels is a 2-inch square of heavy paper, cut out by hand. We apparently have way too much free time.
In The Beginning There Was: Pong
Requires Mac OS X 10.5 (Leopard) and Apple Safari. Yeah.
Download Source
Hard-coding the velocities and limiting the animation rate to 30 frames per second has not worked all that well (not surprising, locking the logic rate to the rendering frame rate is always asking for trouble). You can see how the speed of the ball and paddles isn't consistent. So fixed rate logic is out. Delta-based animation is in for the next project.
Kenta Cho's Mu-cade for OS X
An awesome snake-like shooter, now for Mac OS X 10.4.
Mu-cade for OS X.
The Physics Centipede Invasion.
Smashup waggly shmup, 'Mu-cade'.
(download)
patch file if anybody wants to build it themselves.
Update: I tried the game on a PowerPC Mac, and while it loads and runs just fine, it's not playable. There's probably some endian issues in the game's internal data structures. If I get some time I'll look into it, but for now this release is Intel-only. :'(
Mozy Deathmatch II
We're putting on another coding deathmatch this month, April 14th. We've got $20,000 in prizes to give away this time and all it takes is a few hours on a Saturday to participate, so if you live in Utah give it a shot!
Further #to_proc Abuse
Everybody loves to abuse #to_proc. The Symbol#to_proc extension has even been baked in to Ruby 1.9.
Why not continue the duck typing abuse? Let's build a cheap ActiveRecord knock-off for Enumerable:
my_peeps.find_all(&{:last_name => "Palmer"}) appointments.find_all(&{:description => /billable/i, :time => (start_time..end_time)}) my_socks.any?(&{:status => 'washed'})
The implementation is simple.
class Hash; def to_proc proc { |obj| self.inject(true) { |m,(k,v)| m && v === obj.send(k) } } end; end
Of course, I wouldn't try to argue that it's as useful as Symbol#to_proc. Fun to play with, though. I'm using it in a RubyOSA script that I'm building for Colleen. For completeness, this version performs a little better if the hash has many terms and a lot of records will be filtered out:
class Hash; def to_proc proc { |obj| self.inject(nil) { |_,(k,v)| v === obj.send(k) || (break false) } } end; end
Comments? Feedback? Drop me a line.



Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.