It’s August 19th, the day we remember why the lucky stiff’s poignant departure from the internet. ruby-jokes would hate to part with the Whyday tradition of hacking on something just for fun and releasing it into the wild.
So it’s with great ambivalence we announce whynot, a gem that does irresponsible things because… why not?
whynot is for when you really just don’t care. It started as a single monkey-patch
maybe takes a block, and may or may not yield the
result. So for instance:
1 2 3 4
About half the time, this will return
6. The other half,
About three minutes after I pushed whynot to Github, Micah Gates
added some kernel methods that allowed for a little more specificity:
which will execute your code about 2/3 of the time, and
has about a 1 in 5 chance of actually executing your code.
But wait, there’s more!
Just in time for the 0.0.4 release this afternoon, I decided sometimes, the truth
doesn’t matter. Or, at least, you just don’t care. So I added
true, sometimes false, whatever. When you really don’t care, just do this:
I really wanted to create a global value like
false that was neither
truthy nor falsey, but I’m not sure whether that’s possible, and I have a feeling
it would require some C-extension hackery if it is.
Perhaps for a future release?
As always, pull requests are welcome, and use at your own risk.