Skip to content

Instantly share code, notes, and snippets.

@ferrix
Last active August 29, 2015 13:56
Show Gist options
  • Save ferrix/9224692 to your computer and use it in GitHub Desktop.
Save ferrix/9224692 to your computer and use it in GitHub Desktop.
Sometimes you have to speak C VERY LOUDLY to Ruby people
program SoooFunny;
begin
writeln('unsigned three = 1;');
end.
# Regular expressions are great in explaining how a joke is dissonance between
# expectation and a surprising twist in the story.
my $expectation = "unsigned three = 3;\n";
my $surprise = $expectation =~ s/3/1/r;
print ($surprise);
# This Gist makes the joke in
# https://github.com/torvalds/linux/blob/d158fc7f36a25e19791d25a55da5623399a2644f/fs/ext4/resize.c#L698
# understandable to those who prefer Ruby.
class ThePunchline
def initialize(number)
@number = number
end
def badumTsih
puts "unsigned three = #{@number};"
end
end
haha = ThePunchline.new("1")
haha.badumTsih
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment