Here’s how to get a free “to_json” method in every object you write. Just extend from a common introspective base class: use MooseX::Declare; class BaseObject { use signatures; use JSON::XS; has ‘id’ => (isa => ‘Int’, is=>’ro’, writer => ‘_id’); # and more … sub to_json($self) { my $result = {}; foreach my $attr (__PACKAGE__->meta()->get_all_attributes()) [...]
Archive for the ‘Uncategorized’ Category
Theory: All good business strategy can be learned from computer games. (A) You must get your base in order before you to go war. (B) You must consistently invest in tech upgrades or you will get clobbered by more advanced units. (C) You can’t concentrate on giving orders to all of your units at once. [...]
Perl OO The Way It Should Be Done — How Fast Or Slow Is Moose?
Posted: August 5, 2010 by mpdehaan in UncategorizedMoose is a really impressive object system for Perl (mixins! traits! AOP! all optional fancy stuff!). MooseX::Declare is even more impressive, because it adds a clean Python/Ruby style syntax for methods, but also allows type checking. It’s pretty awesome. Though, there’s some perception that it’s slow. Is it? (edit — work in progress) ‘function’ above [...]
Previously on this blog I’ve posted a lot about Open Source Software Development. I have determined that, while in many ways, while OSS has benefits, in general this is not what I liked about OSS. Primarily I used OSS to supplant an actual local team, formal Q/A, budget, and marketing at a certain OS vendor. [...]
Today, I found some time to play with my new Monomachine for more than 30 minutes. By which, I mean, about an hour. This was done in song mode, and then recorded straight through Reaper, with no external effects. I’ll get to something more deliberately composed (and longer) later — I really want to crank [...]
For future reference, seeing the OS X GUI tools aren’t too clear about this, here’s how to create a case-sensitive 5 GB volume using command line tools: hdiutil create -megabytes 5000 -fs “Case-sensitive Journaled HFS+” -volname SomeName ~/SomeFileName For encrypted volumes, add: -encryption -stdinpass
The Kindle (or app) has a nice feature where it can save quotes from books. Here’s some extracted quotes and randomness from a few books. I’ve read a lot of other things in the meantime, but for some reason I find Card and Herbert more quotable than most. Herbert perhaps too much so in a [...]
Here are some pictures from the last Boston trip: Notice I do not take pictures of people giving keynotes and tech presentations. Why? Because no one likes looking at those pictures (The last two in the set are from two years ago)
This last vacation was more of a vacation from the camera than anything else. While Atlantic Beach now lacks a miniature golf course with proper gorillas (RIP Jungle Land), it was otherwise a good trip. I also bought this really awesome fossil of some 350 million year old snails. Yeah, I like snails. Snails rock. [...]
NC Museum of Art Open / 1st Panasonic GF-1 Shots
Posted: April 24, 2010 by mpdehaan in UncategorizedRather overcast today, so that led to my photos leaning more on the weird/minimal/introspective/depressing side of things than they normally are. Still, loving the output of the GF-1. Depth of field again in a reasonably sized camera! (Of course, this existed before, it was called… I think… film). Not so much loving the new art [...]