True love.
It means to be one with one another.
Being one with another means to lose yourself.
Are you prepared, to give up who you are?
2008-01-08
Dragons
class Numeric
def dragons?
nil
end
end
class Float
def dragons?
"here be dragons!"
end
end
Don't worry if you don't understand it.
2007-10-19
Obituary
Burli, my beloved pet and fellow died today, in the high age of over 5 years, exceeding the life expectancy of a gerbil.
He was a lovely gerbil. When he first met Buschu - my single female gerbil I had at that time - he easily made friends with her. At first, she always ran away from him, he ran around a bit and ran towards her again. That went on for about half an hour, when I decided to put them into the transport box, so she couldn't run away. In the transport box, he slowly approached her, his head bent down. He put his nose under her snote, flattening himself completly. She started to sniff around his snote and inspected him. About a minute he let it go on, then rose back up.
From that moment on, they've been together. Ten very lovely young gerbils were soon after the result of that bond, 4 of which I kept.
From what I can tell, he was a good father to them. At least for instance I one day found him and his sons and daughters happily sitting on my bed, chewing on my bedding. He escaped his cage many more times. He was an outright expert at escaping. But never to run away, he always came back.
Another day, I walked into my room, at the moment I opened the door I heard my mom squeal, a second after something whooshed between my legs. Apparently burli had escaped once again from his cage and made it to my mothers working room (which at the time was the room besides my bedroom) and couldn't go back because I had closed the door. I don't know how, but he must have noticed that the door was opened and ran back.
One morning I found him waiting besides the cage. He - of course - was escaped from it, but as it seemed couldn't get back in. So he had waited by the cage until I put him back in. He didn't make any attempt to run away when I grabbed him.
He also very much loved crackling things. In my new apartment he was often allowed to run around freely. When there was a plastic bag or some piece of paper you'd often hear him playing around with it.
Amazingly he once made it into my laundry basket. NB, the basket is about 70cm (28 inches) high, there was nothing next to it to climb. I still don't know how he managed that.
And now he's gone.
Dear burli, beloved pet, fellow and friend
I hope you rest in peace and are reunited with your children and wife
He was a lovely gerbil. When he first met Buschu - my single female gerbil I had at that time - he easily made friends with her. At first, she always ran away from him, he ran around a bit and ran towards her again. That went on for about half an hour, when I decided to put them into the transport box, so she couldn't run away. In the transport box, he slowly approached her, his head bent down. He put his nose under her snote, flattening himself completly. She started to sniff around his snote and inspected him. About a minute he let it go on, then rose back up.
From that moment on, they've been together. Ten very lovely young gerbils were soon after the result of that bond, 4 of which I kept.
From what I can tell, he was a good father to them. At least for instance I one day found him and his sons and daughters happily sitting on my bed, chewing on my bedding. He escaped his cage many more times. He was an outright expert at escaping. But never to run away, he always came back.
Another day, I walked into my room, at the moment I opened the door I heard my mom squeal, a second after something whooshed between my legs. Apparently burli had escaped once again from his cage and made it to my mothers working room (which at the time was the room besides my bedroom) and couldn't go back because I had closed the door. I don't know how, but he must have noticed that the door was opened and ran back.
One morning I found him waiting besides the cage. He - of course - was escaped from it, but as it seemed couldn't get back in. So he had waited by the cage until I put him back in. He didn't make any attempt to run away when I grabbed him.
He also very much loved crackling things. In my new apartment he was often allowed to run around freely. When there was a plastic bag or some piece of paper you'd often hear him playing around with it.
Amazingly he once made it into my laundry basket. NB, the basket is about 70cm (28 inches) high, there was nothing next to it to climb. I still don't know how he managed that.
And now he's gone.
Dear burli, beloved pet, fellow and friend
I hope you rest in peace and are reunited with your children and wife
2007-09-17
Crybabies
Ruby2 is at the doors, bringing many presents in form of welcome changes. But then there is the one change I consider a bowdown to stupidity, ignorance and lazyness:
String#[] with a single argument will no longer return the ASCII value of the char at that position.
I wonder why? We have that functionality already, twice even, str[x,1] does it and str[x..x] too.
It seems it's a kneejerk reaction to continuos whining of stupid people and those who can't be bothered with RTFM.
Some percentage of the coders considers it unintuitive, that str[x] returns the ASCII code. Now that part is perfectly fine.
But I wonder what happens when you encounter that. I'd expect anybody with at least a little bit of brain to consult the documentation at that point, where you can clearly read how String#[] behaves. When you do that you commit to memory that str[x] will return the ASCII value and - depending on how often you use it - you'll use it wrongly once, twice or maybe three times.
So who would possibly want it to change and in turn duplicate existing and perfectly fine behaviour, dropping a different behaviour that becomes more difficult to get that way?
My conclusion: whiny stupid bitches (is there a matching male form of bitch?).
String#[] with a single argument will no longer return the ASCII value of the char at that position.
I wonder why? We have that functionality already, twice even, str[x,1] does it and str[x..x] too.
It seems it's a kneejerk reaction to continuos whining of stupid people and those who can't be bothered with RTFM.
Some percentage of the coders considers it unintuitive, that str[x] returns the ASCII code. Now that part is perfectly fine.
But I wonder what happens when you encounter that. I'd expect anybody with at least a little bit of brain to consult the documentation at that point, where you can clearly read how String#[] behaves. When you do that you commit to memory that str[x] will return the ASCII value and - depending on how often you use it - you'll use it wrongly once, twice or maybe three times.
So who would possibly want it to change and in turn duplicate existing and perfectly fine behaviour, dropping a different behaviour that becomes more difficult to get that way?
My conclusion: whiny stupid bitches (is there a matching male form of bitch?).
2007-09-11
Simple higher order methods
Sometimes there's an itch that you just have to scratch. One of them hit me today, luckily I already had the matching scratch ready. My itch was, that while Ruby has that very nice module Enumerator, it only works with classes that provide a .each method. So you can have enum.map { ... }, which operates on each. But what if you have a class that can iterate over various things? E.g. a String could iterate over bytes, chars, words or lines. A directory could iterate over files, directories or all entries.
My solution to the problem: Iterator.
With that you can enable a method to return an Iterator with a single statement, which in turn allows you to do things like: dir.entries.select { ... }, where dir.entries returns an Iterator.
Example use:
My solution to the problem: Iterator.
class Iterator
include Enumerable
class Iteration
def initialize(&block)
@block = block
end
def yield(*args)
@block.call(*args)
end
end
def initialize(&iterator)
@iterator = iterator
end
def each(&block)
@iterator.call(Iteration.new(&block))
end
end
With that you can enable a method to return an Iterator with a single statement, which in turn allows you to do things like: dir.entries.select { ... }, where dir.entries returns an Iterator.
Example use:
def each_custom
if block_given? then
@custom.each { |element| yield(element) }
else
Iterator.new { |iter| @custom.each { |element| iter.yield(element) } }
end
end
2007-09-10
Progress
"Progress doesn't come from early risers - progress is made by lazy men looking for easier ways to do things."
Robert Heinlein
Robert Heinlein
2007-09-07
‘No Longer Joe Cool’
This article nails it quite well...
The immaturity of consumers (or “I want a refund!”)
(via daringfireball.net)
The immaturity of consumers (or “I want a refund!”)
(via daringfireball.net)
Subscribe to:
Comments (Atom)