More popular than stellar consumer credit you cash advance cash advance your car get your mortgage.

Archive for August, 2006

George Washington

Wednesday, August 16th, 2006

He was one of the coolest dudes around. Don’t take my word for it, see for yourself.

Really the point of this post is to test if I can embed youtube in my blog, which I can, so you will be getting a lot of random crap from now on.

Powerset in Ruby

Friday, August 11th, 2006

Now for a real post in a very cool language that is on the rise. Currently my favorite language to write, Ruby.

Simple PowerSet implementation, pretty straight-forward.

class Array
  def powerSet!
    return [[]] if empty?()
    f = shift()
    rec = powerSet!
    return rec + rec.collect {|i| [f] + i }

  def powerSet
    return clone().powerSet!

Note, I added this directly to the Array class. In ruby, classes are left open, so you can add to them later. It is a very dynamic language, and there are hooks for just about everything, so you could have some behavior run when a method is added to your class. Now that Array has a new method, you can just call


Now let’s write it using inject, because inject is awesome. (inject is known as reduce in python, and they are removing it from the next version. It’s a shame they are removing it, but it makes sense because python doesn’t sweet sweet blocks like ruby.)

array = [1,2,3]
array.inject([[]]) { |acc, you|
  ret = []
  acc.each { |i|
    ret << i
    ret << i + [you]

The best part about inject is that once you get your head around it, it is pretty clear and also that this expression can be smashed to 50 chars if that is what gets you going.


I am number 1

Wednesday, August 9th, 2006

I am now the coolest John Carrino. All the search engines say so. Even the crappy ones. Bam!

Look! It’s a Lemur.

Lemur Lemur

Tuesday, August 8th, 2006

Yippie. I finally got a domain after missing out on all the good carrino-dot domains. I even missed

Originally, I was too cheap to buy dns hosting, so I just had the park page redirect to my 2nd level domain from dyndns, I finally got dns for free from dennis and it works great.

Also, I made this blog my redirect from / instead of gallery. That is probably how you got to this horrible thing. If you need to get away, the gallery, is always there.

And in summary, here are some pictures from my vacation last week.

WaterfallRobin with crab legPacific OceanChipmunkWildflowers

My Parents Visit Seattle

Monday, August 7th, 2006

So my parents visited my place beginning last wednesday and staying for 10 days through yesterday. We had a pretty good time hitting up all the things to see. Pictures can be found here.

Parents with rainier

Parents with rainier

Mom and I on space needle

Lake Quinalt

Lake Quinalt