2007-05-17 @ 11:05

Back In Town!

Ya, I suck. I’ve been in back for a while, but haven’t written about my trip. I went to Edinburgh, Scotland a couple weeks ago to visit my friends Angie and Joeseph. They’re the ones who got hitched in Spain. I think that Scotland is probably the best country ever. You can get anything you want deep fried there. I’m pretty sure most of my meals consisted of either meat and potatoes, or something deep fried.

For example:

Deep Fried Mars BarMonster Mash The Good HaggisScotch Egg

That is a deep fried mars bar, sausage, potatoes, gravy, haggis, and a scotch egg. All delicious!

We also visited many historic sites including an underground tour where we learned about two serial killers that sold the bodies of their victims. Burke and Hare, and you can read about them here. Basically they would lure people to their bed and breakfast, kill them, then take them through the under ground tunnels, and sell the bodies to the Edinburgh University Medical department. They were caught, and one of them was hanged and dissected.

I also saw Dolly the cloned sheep, and went on a scotch tour. There was a lot more stuff, but I’m tired of writing.

IMG_0141.JPGIMG_0079.JPG

read more »

2007-05-22 @ 08:47

More ECMA Awesomeness

I’ve been adding more tender loving javascript features to RKelly (my Javascript to Ruby converter). You can now call to_ruby on an RKelly object and get back your Javascript as Ruby. For example:

1
2
3
4
5
6
7
8
puts RKelly.process(<<END
function c() {
  alert('asdfasdf');
}
var a = {};
foo['b'] = c;
END
).to_ruby

And that will out put the following ruby code:

1
2
3
4
5
6
7
8
9
10
11
12
def c
  alert("asdfasdf")
end
a = lambda do
  s = OpenStruct.new
  return s
end.call
class << foo
  def b
    alert("asdfasdf")
  end
end

Implicit object declaration is now supported too:

1
2
3
4
5
6
7
puts RKelly.process(<<END
var s = {
  x: function () { alert("blh"); },
  y: "foo"
};
END
).to_ruby

Which will output this:

s = lambda do
  s = OpenStruct.new
  class << s
    def x
      alert("blh")
    end
  end
  s["y"] = "foo"
  return s
end.call

One thing I’ve found while implementing RKelly is that javascript tends to pass around function pointers a lot. I will probably have to convert RKelly to declare lambdas for all functions instead of actual functions. The problem is that I’ll need to get it so the lambdas will be executed in the context of the object, but I’m sure that will be pretty easy.

read more »

2007-05-26 @ 10:09

One more update

I totally forgot to mention that Stacy made this awesome birthday cake with two naked girls mud wrestling:

IMG_0262.JPG

Wolf is lucky to have a girlfriend like Stacy! I can’t wait to see what my birthday cake will be like this year…..

read more »

2007-05-26 @ 10:04

Punched in the Penis

While you were all at RainsConf, I was busy getting punched in the penis. I also made some beef jerky.

I met Pam, Stacy, Sabrina, and Wolf at the war room right after making beef jerky. The place was totally packed, and we were going to go up the stairs to the roof. I was leading the way, and waited for this guy and what I think was is girlfriend to move off the stairs. Then I watched his girlfriend punch him in the penis. It wasn’t a hard punch, so the guy wasn’t hurt or anything, but it was weird. The guy saw me see him get punched, and he just stood there in my way. I was just waiting there for him to get out of the way, and he punched me in the penis. He didn’t punch me hard, so I was just really confused. Then he got out of the way, and I went upstairs. I couldn’t believe what had happened! Everyone else was behind me, so they didn’t get to see it, but I told them about it when we got upstairs. Pam said “Who is the penis puncher?”, and I felt like I was in a Seinfeld episode……

The End.

read more »