Playing rubberboot!
Apparently rubberboot is a song some instructor at the popacademy taught his/her students. This is a video of me playing the chords and a little improvisation in between together with my brother Wander on the bass and his friend Jesse on the drums:
Playing with ruby: Currying, Higher Order Methods
Today I felt a bit ill, so I sat back and played some games.. with Ruby ofcourse :P
First I helped some dude with merging two hashes:
That made me think about how it would be nice to be able to do: [first_value, second_value].any.is_a? Array
So I implemented that:
The HigherOrderMethod class was first called LazyIterator, because I didn’t know what it was. Apeiros enlightened me so I renamed it. I pasted that code to some friends and we started discussing about wether Ruby was ugly or not. Someone asked if Ruby supported currying, I didn’t know what it was, so they explained it to me. At first I thought ruby didn’t support it, so I implemented it:
But afterwards I found out that Ruby 1.9 has Proc#curry, so it is possible, but not with default lambda’s and procs.
So that was a friday afternoon/night well wasted :)
Setting up a blog
Hi there,
I’m just testing out this blog software, so stand by!