You ever have one of those moments when you just put 2 and 2 together, and also that you should have had that realization many years ago?
I just realized what NaN stands for...
This must be what people who get told "you can just wait for the shower water to warm up before hopping in" feel like.
54 0 ReplyThe elephant and rope parable rings its bell of sound morals!
Not so much the realizing what NaN means; that's more relevant to that XKCD which I probably don't need to describe here.
3 0 Reply
"That makes it free, right?"
24 0 ReplyNot only that, it makes your entire purchase free due to NaN arithmetic.
9 0 ReplyBut as you mention, NaN propagates.
So at checkout, your wallet will become NaN, as the shops money balance. Then it will spread to your bank account and before you realize what happens the whole banking-district is in flames.6 0 Replyno, it costs NaN, now remove NaN from your account...
...oh no
2 0 Reply
Technically it has a pricetag, so...
3 0 Reply
0*(NaN)... So does that mean the price IS a number?
21 0 ReplyIsn't any math operation involving NaNs also a NaN? At least that's my gut feeling.
25 0 ReplyBased on my frequent exploding and vanishing gradients, that would be a yes.
14 0 ReplyGood point.
4 0 Reply
I suppressed most of my former js knowledge but I guess it's a string now.
10 1 ReplyIn JS, it's just NaN if my browser's console is to be believed. I suspected it would probably be
{object}
for no clear reason8 0 Replyfor no clear reason
JS That's the reason. The language has an awful type system.
7 0 Reply
0*NaN = NaN
2 0 Reply
dirty onanists spilling their seed
19 0 ReplyLennin died, with him died lenninism. Stalin died, with him died stalinism. Grandpa Onan, don't die!
3 1 ReplyWhat is spilled cannot die
1 0 Reply
18 0 ReplyIn my language, onanování is masturbating. And onan is a mild insult insinuating that someone wanks a lot.
16 0 ReplyIt's onanism in English. And it's rather stupid to call it that because Onan didn't masturbate, he used the pull out method to avoid getting his sister-in-law pregnant with his brother's kid. (yes, I know that sounds weird but that's the story)
6 0 ReplyOnanieren in German
4 0 ReplyOnani in Swedish, which this image is from.
1 0 Reply
related: https://en.wikipedia.org/wiki/Some_Thoughts_on_the_Science_of_Onanism
by Mark Twain, btw. short read, and hilarious
9 0 Reply...spilled his arithmetic overflow on the ground.
3 0 Reply
I like how the code adds a 0 at the start.
9 0 ReplyThe code probably checks if the following number is greater than 10 (which fails for NaN) and otherwise adds a 0 in front.
13 0 Reply
It's priceless
5 0 ReplyOnani!
4 0 Replycost = "arm" + "leg";
3 0 Reply3 0 Replylidl quality
3 1 ReplyOoo na na...
1 0 Reply