Archive for March, 2009

“Sehr geehrter Herr NN,
der CPU-Lüfter hatte sich aus der Halterung gelöst und war nicht mehr auf der CPU,
dadurch ist der Server abgestürzt. Ich habe nun alles wieder richtig befestigt,
die Probleme sollten damit behoben sein.
Mit freundlichen Grüßen”


Rails dynamic streaming doesn’t work. At least sometimes. While the Rails documentation, and all the euphoric comments in the community feature code examples along the lines of

# Renders “Hello from code!”
render :text => proc { |response, output|
output.write(“Hello from code!”) }

But this just doesn’t work as not-really-advertised. [...]


This is the third and final part of a series about Erlang.

Part 1: Processes
Part 2: Messages and Pattern matching
Part 3: Lists, Strings, Binaries, Tuples

Erlang/OTP didn’t come out of thin air. Quite the opposite – seldom you see a language and a platform where the implementation mirrors the intention that closely.

Lists, Strings, Binaries, Tuples: what is [...]


Bummer

18Mar09

~ > rake
(in /Users/eno/)
Rails requires RubyGems >= 1.3.1 (you have 1.3.0). Please `gem update –system` and try again.
~ > gem update –system
Updating RubyGems
Nothing to update
~ > gem -v
1.3.1


This is part 2 of a series about Erlang. The final part 3 will be published next week here.

Part 1: Processes
Part 2: Messages and Pattern matching
Part 3: Lists, Strings, Binaries, Tuples

Erlang/OTP didn’t come out of thin air. Quite the opposite – seldom you see a language and a platform where the implementation mirrors the intention [...]


This is part 1 of a series about Erlang. Parts 2 and 3 will be published in the next weeks here.

Part 1: Processes
Part 2: Messages and Pattern matching
Part 3: Lists, Strings, Binaries, Tuples

Erlang/OTP didn’t come out of thin air. Quite the opposite – seldom you see a language and a platform where the implementation mirrors [...]


With just that small addition:

class Symbol
alias_method :old_eeq, :”===”

def ===(obj)
(obj.respond_to?(self) && obj.send(self)) ||
old_eeq(obj)
end
end

you can do things like

case current_user
when :admin? then “admin”
when :regular? then “something_for_regulars”
when :guest? then “do_guest_stuuff”
else “huh”
end

Isn’t that cool much more readable?