Editing Talk:1537: Types

Jump to: navigation, search
Ambox notice.png Please sign your posts with ~~~~

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 7: Line 7:
 
"+2 appears to be applying a unary + to the number 2" : or it adds the number of the line, 10, to 2 => 12. Also, the eleventh line, "2+2" may add 2 to all the following 2, explaining line 12. (that theory is from a friend of mine) [[User:Seipas|Seipas]] ([[User talk:Seipas|talk]]) 12:17, 12 June 2015 (UTC)
 
"+2 appears to be applying a unary + to the number 2" : or it adds the number of the line, 10, to 2 => 12. Also, the eleventh line, "2+2" may add 2 to all the following 2, explaining line 12. (that theory is from a friend of mine) [[User:Seipas|Seipas]] ([[User talk:Seipas|talk]]) 12:17, 12 June 2015 (UTC)
 
: Also, for the lines 6 and 7, the operation "[1,2,3]+x" may add x to the set [1,2,3] and return true if the operation succeeded or false if not. Adding 2 to the set [1,2,3] returns false because 2 is already in [1,2,3]. [[User:Seipas|Seipas]] ([[User talk:Seipas|talk]]) 12:23, 12 June 2015 (UTC)
 
: Also, for the lines 6 and 7, the operation "[1,2,3]+x" may add x to the set [1,2,3] and return true if the operation succeeded or false if not. Adding 2 to the set [1,2,3] returns false because 2 is already in [1,2,3]. [[User:Seipas|Seipas]] ([[User talk:Seipas|talk]]) 12:23, 12 June 2015 (UTC)
:: I thought it was doing element-wise addition and then comparing "[6] > [3,4,5]" (using the line number in the joke, like in line 10). The problem here is that line 6 should return true and line 7 should return false. [[User:Rand|Rand]] ([[User talk:Rand|talk]]) 15:46, 13 June 2015 (UTC)
 
  
 
Yellowish Blue: http://www.livescience.com/17948-red-green-blue-yellow-stunning-colors.html is NaN! {{unsigned ip|108.162.221.129}}
 
Yellowish Blue: http://www.livescience.com/17948-red-green-blue-yellow-stunning-colors.html is NaN! {{unsigned ip|108.162.221.129}}
Line 35: Line 34:
 
:Because yellow and blue don't make green. [[Special:Contributions/108.162.237.158|108.162.237.158]] 23:33, 12 June 2015 (UTC)
 
:Because yellow and blue don't make green. [[Special:Contributions/108.162.237.158|108.162.237.158]] 23:33, 12 June 2015 (UTC)
 
::It does with my paint kit. Isn't that subtractive mixing. I feel like I've just traveled to a version of [[1268: Alternate Universe]], except I'm the only one here who went to kindergarten. What am I missing? [[User:Djbrasier|Djbrasier]] ([[User talk:Djbrasier|talk]]) 02:28, 13 June 2015 (UTC)
 
::It does with my paint kit. Isn't that subtractive mixing. I feel like I've just traveled to a version of [[1268: Alternate Universe]], except I'm the only one here who went to kindergarten. What am I missing? [[User:Djbrasier|Djbrasier]] ([[User talk:Djbrasier|talk]]) 02:28, 13 June 2015 (UTC)
:::Since this is a Programming language, it must be talking about RGB colors, where green is a base color and yellow is mixed using red and green. So a "yellowish blue" would contain all base colors, resulting in white – and that's propably why Randall's language returns NaN.[[Special:Contributions/141.101.92.42|141.101.92.42]] 08:39, 13 June 2015 (UTC)
 
 
::The only {{w|color wheel}} I know has purple (not blue) opposite yellow and orange (not yellow) opposite blue. If that is incorrect, then wikipedia needs some serious editing. [[User:Djbrasier|Djbrasier]] ([[User talk:Djbrasier|talk]]) 02:31, 13 June 2015 (UTC)
 
::The only {{w|color wheel}} I know has purple (not blue) opposite yellow and orange (not yellow) opposite blue. If that is incorrect, then wikipedia needs some serious editing. [[User:Djbrasier|Djbrasier]] ([[User talk:Djbrasier|talk]]) 02:31, 13 June 2015 (UTC)
 
:::You're talking about the {{w|RYB color model}}, whereas most programming languages work in the {{w|RGB color model}}, where yellowish blue is undefined. [[Special:Contributions/188.114.97.151|188.114.97.151]] 23:30, 29 December 2015 (UTC)
 
 
:It's a lot simpler than that. Perceptually there is no yellowish-blue, one would never describe a blue as being yellowish. If you add yellow to blue you get greenish-blue, add more and you get green, then yellowish-green, then greenish-yellow. At no point would you describe the colour as either yellowish-blue or bluish-yellow. This is why it's the equivalent of NaN, you can use the language to tell the machine you want the result of "2/0", or you want the result of "blue with a yellowish tinge", but in either case it is not possible to represent the result. {{unsigned ip|141.101.98.154}}
 
  
 
line 4: I read NaP as Not a Problem. [[Special:Contributions/141.101.104.12|141.101.104.12]] 17:00, 12 June 2015 (UTC)
 
line 4: I read NaP as Not a Problem. [[Special:Contributions/141.101.104.12|141.101.104.12]] 17:00, 12 June 2015 (UTC)
 
: So did I.  [[User:Xynariz|Xynariz]] ([[User talk:Xynariz|talk]]) 23:12, 12 June 2015 (UTC)
 
: So did I.  [[User:Xynariz|Xynariz]] ([[User talk:Xynariz|talk]]) 23:12, 12 June 2015 (UTC)
: To me, the (2/0) looks like a person curled up on bed with the +2 as the Z's indicating sleeping which I believe was the intention on top of 'P' being 2 chars more than 'N'
 
  
 
Line 3 is missing its prompt.  There does not appear to be any relevance to the joke, nor has anyone yet explained why it should be missing. Typo? [[Special:Contributions/108.162.221.183|108.162.221.183]] 17:10, 12 June 2015 (UTC)
 
Line 3 is missing its prompt.  There does not appear to be any relevance to the joke, nor has anyone yet explained why it should be missing. Typo? [[Special:Contributions/108.162.221.183|108.162.221.183]] 17:10, 12 June 2015 (UTC)
 
:I haven't noticed it until I saw your comment. It seems deliberate to me. Hard not to notice that when writing the fourth line. [[Special:Contributions/108.162.221.48|108.162.221.48]] 19:24, 13 June 2015 (UTC)BK201
 
 
::Although I agree the context makes the mistake a hard one to have failed to be spotted, [http://explainxkcd.com/wiki/index.php/915 I still think there's not much sense in it being deliberate]. [[Special:Contributions/188.114.97.151|188.114.97.151]] 23:30, 29 December 2015 (UTC)
 
  
 
Note that some programming languages avoid the problem of overloaded '+' operator between operands of vividly different types by using other symbols for string concatenation (be it "a"~"b" or "a"."b") and numerical addition.  The real WTF is abusing '+' for string concatenation, which has very different properties from numerical addition, not being symmetrical for example: concat("aa", "bb") == "aabb", while concat("bb", "aa") == "bbaa" != "aabb". --[[User:JakubNarebski|JakubNarebski]] ([[User talk:JakubNarebski|talk]]) 17:38, 12 June 2015 (UTC)
 
Note that some programming languages avoid the problem of overloaded '+' operator between operands of vividly different types by using other symbols for string concatenation (be it "a"~"b" or "a"."b") and numerical addition.  The real WTF is abusing '+' for string concatenation, which has very different properties from numerical addition, not being symmetrical for example: concat("aa", "bb") == "aabb", while concat("bb", "aa") == "bbaa" != "aabb". --[[User:JakubNarebski|JakubNarebski]] ([[User talk:JakubNarebski|talk]]) 17:38, 12 June 2015 (UTC)
Line 68: Line 57:
  
 
The joke on line [10] really doesn't seem to be a Chinese/Japanese language joke. We can see that the language interacts much more directly with line numbers from the inter-line joke between lines [11] and [14], where line [12] becomes [14] because the value of 2 has become 4. This is provable by observing that the line after [14] is [13], showing that the previous line really is still line [12], it simply displays as [14] because the value of 2 has changed. This absurdly direct interaction between the code and its line number makes the joke on line [10] make a lot more sense, as a Chinese/Japanese language joke here seems much too contrived and out-of-place considering the nature of the other jokes in the comic. Not to mention, if the joke on line [10] was really concerning the code's interaction with its line number, it would set up nicely for introducing the inter-line joke between lines [11] and [14].[[Special:Contributions/188.114.106.89|188.114.106.89]] 03:35, 13 June 2015 (UTC)
 
The joke on line [10] really doesn't seem to be a Chinese/Japanese language joke. We can see that the language interacts much more directly with line numbers from the inter-line joke between lines [11] and [14], where line [12] becomes [14] because the value of 2 has become 4. This is provable by observing that the line after [14] is [13], showing that the previous line really is still line [12], it simply displays as [14] because the value of 2 has changed. This absurdly direct interaction between the code and its line number makes the joke on line [10] make a lot more sense, as a Chinese/Japanese language joke here seems much too contrived and out-of-place considering the nature of the other jokes in the comic. Not to mention, if the joke on line [10] was really concerning the code's interaction with its line number, it would set up nicely for introducing the inter-line joke between lines [11] and [14].[[Special:Contributions/188.114.106.89|188.114.106.89]] 03:35, 13 June 2015 (UTC)
 
:Mostly agreed, but still it's an amusing coincidence. [[Special:Contributions/188.114.97.151|188.114.97.151]] 23:30, 29 December 2015 (UTC)
 
 
As a speaker of Japanese, the explanation "[In the Japanese number system] the plus sign is instead the symbol 十" sounds even more absurd than if someone said that English speakers use the small letter "t" as an addition symbol. "十" (ten) and "+" (full-width plus) are different glyphs and using them interchangeably would certainly not be useful. Although depending on language skill and display font they may visually seem more equal than they're supposed to. 08:28, 13 June 2015 (UTC)
 
 
* #5—I'm surprised we've missed the obvious joke: quotations within quotations.  the double-quatation "I think so." gets single-quoted within another quotation: "He said, 'I think so.'"
 
* The word is "complements", not "opposites", on the colour wheel.  I think the joke is likely that most people think of "yellowish blue" as "green"—as it would be on an artists' colour wheel.  Regardless, complements on an RGB colour wheel should not result in NaN—it would result in a mix of yellow (255, 255, 0) and blue (0, 0, 255), which is white (255, 255, 255).
 
* [[Special:Contributions/108.162.226.174|108.162.226.174]] 12:23, 13 June 2015 (UTC)
 
 
Is it bad that all I understood at first was the last one?{{unsigned|LuigiBrick}}
 
 
"yellowish blue" is actually parsed in HTML to be a red colour: #e00000 which is between pure red and "chucknorris".  See here: http://randomstringtocsscolor.com/ [[Special:Contributions/162.158.3.12|162.158.3.12]] 00:55, 15 June 2015 (UTC)Martin
 
 
In response to the comment above that  a mix of yellow (255, 255, 0) and blue (0, 0, 255) would be white (255, 255, 255): you could just as easily claim that the result would be black (0, 0, 0) ;-)  [[Special:Contributions/162.158.3.12|162.158.3.12]] 00:59, 15 June 2015 (UTC)Martin
 
 
And now I just wait for an implementation of this language to show up on GitHub. /grab popcorn [[User:Ralfoide|Ralfoide]] ([[User talk:Ralfoide|talk]]) 06:16, 15 June 2015 (UTC)
 
 
hmm i was thinking NaP could be Not a Problem? what do u guys think [[Special:Contributions/172.70.134.47|172.70.134.47]] 22:31, 13 September 2021 (UTC)Bumpf
 

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)

Templates used on this page: