29
u/chutiyamadarchod May 29 '20
you+me = you+me
32
u/Daeli_Smile May 29 '20
Its a C program
20
→ More replies (7)17
u/jonny_wonny May 29 '20
chars are a single character. And it’s been a while since I’ve used C, but are you sure chars aren’t implicitly casted to int? Under the hood it’s just an 8 bit integer.
→ More replies (2)8
u/FileFighter May 29 '20
They are. I couldn't for the life of me figure out the randomly printed number in a char array, turns out I wrote %d instead of %c in that one specific condition.
2
2.7k
May 29 '20
Error: variable "you" not defined.
Error: variable "me" not defined.
986
u/Mareeck May 29 '20
This is the correct error answer
→ More replies (2)620
u/Goheeca May 29 '20
Not so fast:
* you+me debugger invoked on a UNBOUND-VARIABLE in thread #<THREAD "main thread" RUNNING {10005E85B3}>: The variable YOU+ME is unbound. Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE ] Retry using YOU+ME. 1: [USE-VALUE ] Use specified value. 2: [STORE-VALUE] Set specified value and use it. 3: [ABORT ] Exit debugger, returning to top level. (SB-INT:SIMPLE-EVAL-IN-LEXENV YOU+ME #<NULL-LEXENV>) 0]And after choosing the right restart:
0] 1 Type a form to be evaluated: 'love LOVE *easy peasy.
252
u/LordFarquadOnAQuad May 29 '20
You need to make custom error messages.
"You" da fuck is this?
"Me" da fuck is that?
91
204
May 29 '20
r/ProgrammerHumor is amazing. I often found silly jokes but the comment section often questioning if the joke is actualy making sense in programming stuff. And people seem to made effort to prove the joke. You guys are a unique community.
→ More replies (1)32
→ More replies (2)6
May 29 '20
Hey wait, in what language would '+' be able to be used in a variable name?
→ More replies (12)182
u/anonymonoclonius May 29 '20
Error: Unable to find variable "you" in the local scope.
Trying to rephrase it to sound like they're inviting the other person over...
38
25
May 29 '20
I just wanna calculate you+me but unfortunately,
You're a global variable and I'm just defined locall-y.
mic drop
16
16
→ More replies (5)5
845
May 29 '20
JS: youme
241
u/pimezone May 29 '20
ReferenceError: you is not defined
83
8
May 29 '20
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1)
DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.31
u/libertasmens May 29 '20
JS, Java, C#, Python, PHP... lots of string concat out there.
→ More replies (2)23
u/404_Identity May 29 '20 edited Jun 25 '20
[removed]
9
u/libertasmens May 29 '20
The one thing I liked about that was at least the stringconcat operator was explicit! No room for confusing an addition with a concat.
→ More replies (12)71
9
→ More replies (8)5
u/BobertCanada May 29 '20
Java allows string concat too, as well as many other languages like python
→ More replies (2)
253
433
u/bigfaturm0m May 29 '20
Shouldn't it be "can not implicitly convert string to int"?
107
6
9
u/NM_MAR_ANP May 29 '20
Plus "cannot", not "can not".
6
0
124
u/Ar010101 May 29 '20
C/C++ error code: y̴̰̲͌o̴͈̙̣͂̓͘u̸̱͉͕̘̍́͂ ̷̺͇͖̉̓h̴͔͐̒̑̊͝ͅa̶̫̟͚̓̆͛͊v̷͖̣̦͛͝é̴̛̬͔̉͑ ̶̞͛̾͗̆́s̴͉̥̗̻̀͊̒̀ỉ̶̟͔ͅͅṉ̴͇͓͙̰̓̿ń̸̮͍̣̬̏̓͘e̷̝͇̞͖͆̕ͅd̵̛̙͔́ ̷̻̹̠͓̲̀͐̚c̴̡͍̯̰͚͒́̇̇͝h̵̤͖̋͠i̴͆̾͆͜l̵͖̤͗̂͆d̶̬̍́͑̽͑,̴͉̰̑͌̾ ̷̧̳́e̴̦̼̫̒̒̍͐m̸̡̄̂̆͂̚b̵͎̜̳̽́͌r̶̫̹̲̭̲̂̿̎̂ä̴͇̤́̈́̉͠͝ͅc̴̖͆̂̏́ę̵̗͎̥͉̑̃͝ ̷̡̝̗͎̫̒̾ṯ̷͉̂̾̅̄h̴͙͚͔̺̲̅͠ȩ̴̡̼̥̀̏͑͌͜ ̴͖̥̟̺̠̇͘ṭ̷̈́͠a̴̩̝͇̓̓͐s̵̯̜͉̟͗̇̓t̶̳̯̋͒̾ë̴͚̹͈́͠ͅ ̸͇́̆̅ó̸̰̠̰̒͐́͘͜f̴͉̯̱̳͆̀̽̚ ̷̼̬̿̾d̵̛̻̝̮̞͂ë̵̡̤̥̝̳̅̓̓͘a̶͈͔͛̇t̶̜̝̯̙̣̀̑h̵͙̼̓
81
May 29 '20
Segmentation fault (core dumped)
19
u/writtenbymyrobotarms May 29 '20
C does not scare you with complicated error messages.
42
u/Famous_Profile May 29 '20
Yea lol C just blows up and you get to guess how, why and where. C++ tells you everything one needs to know along with everything one does not need to know about the error.
→ More replies (13)→ More replies (1)5
May 29 '20
yeah, that's valgrind's job
"More than 100000 total errors detected. I'm not reporting any more."
→ More replies (1)2
265
u/Xtrendence May 29 '20
if(you + me === "mammals") {
let like = Discovery.channel;
doIt(like);
}
51
13
u/ensignrad May 29 '20 edited May 29 '20
@@ -1,4 +1,15 @@
if(you + me === "mammals") {
let like = Discovery.channel;
doIt(like);
}
const doItAgainNow = ( youAndMe ) => {
const youAndMeBabyAintNothingButMammals = youAndMe.every( animal => animal.class === "Mammal" );
const theyDo = {
"Discovery Channel": "graphic",
}
if ( youAndMeBabyAintNothingButMammals ) {
let doIt = like( theyDo[ "Discovery Channel" ] );
doItAgainNow( youAndMe );
}
}
→ More replies (3)5
u/sumguy720 May 29 '20
public class Mammal { private String nickname; public Mammal(String nickname) { this.nickname = nickname; } public void doItLike(Channel channel) { channel.they.do(); } } Mammal you = new Mammal("Baby"); Mammal me = new Mammal("Me"); Channel discoveryChannel = new Channel('discovery'); you.doItLike(discoveryChannel); me.doItLike(discoveryChannel);
20
20
May 29 '20
ftfy
"you" + "me"
Error: No operator overload for "+" has been defined for type string
or
you + me
Error: No variable of name "you" has been declared
Error: No variable of name "me" has been declared
Although to be honest most languages would return "youme" if you added strings.
12
18
67
15
21
8
u/Ghyro May 29 '20
Shouldn't it just be youme, since adding strings is a legal operation?
→ More replies (1)18
u/Ghosttalker96 May 29 '20
But you and me are not necessarily strings here.
9
u/Ghyro May 29 '20
Then its just
"Error: you was not declared in this scope.
Error: me was not declared in this scope."
7
6
5
5
5
u/UniqueUsername27A May 29 '20
Since when can you not implicitly convert int to char? Even if you enable the error for doing this via compiler flag, the error is a precision loss error.
3
u/Xarian0 May 29 '20
Going from 4 bytes (or 8 bytes or 2 bytes) to 1 byte is a narrowing conversion. Modern compilers are almost always set by default to flag implicit narrowing conversions as Errors, which is what the OP posted.
There's a little more to a narrowing conversion than simply a precision loss error, especially given that precision doesn't actually have a meaning when referring to integer types (which are all perfectly precise by definition). Narrowing conversions can potentially cause overflows and can commonly cause infinite loops.
Implicit narrowing conversions are almost always unintentional, which is why they are flagged as Errors.
Or did you mean "since when can you not implicitly convert char to int?"?
5
u/maybelieveitsbutter May 29 '20
Shouldn’t have started with 6+9. That comes after you+me if successful
2
4
4
4
u/Ravens_Quote May 29 '20
"BUT THAT'S NOT ALL!
To show you the power of FlexSeal antivirus, we sawed this digital relationship IN HALF!"
Plot twist, bottom message in OP is actually from Phil Swift
"Now watch as we use the power of FlexSeal AV to turn this long-distance breakup into the world's first human love boat!"
Clicks "Repair connection" button. Cut to Phil paddling along in a lake on top of two lovebirds 69'in it so hard they're waterproof in-between
1
u/jdwpt May 29 '20
Which one is char?
2
u/Daeli_Smile May 29 '20
You and me
char you[3]= "You";
char me[2]= "Me";
→ More replies (1)1
1
3
3
3
3
u/matti2o8 May 29 '20
plot twist: This is a QA tester, testing a count-by-text bot and they received an expected outcome
3
3
u/DaperDandle May 29 '20
What did you think was going to happen? You didn't even declare those variables before trying to use them!
5
u/Chakasicle May 29 '20
I don’t get it
16
2
u/CantPickDamnUsername May 29 '20
Program/person adding numbers and replying answers cant understand/operate on "you+me", because it cant be converted to integer.
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
3
u/SenseiRage May 29 '20
anyways 1st the vars you and me have to exist, noone declared them.
ReferenceError: "you" is not defined
2
u/OMG_Abaddon May 29 '20
You already declared + is a valid integer operator, so why are you saying you can't convert to char? It's you+me not "you"+"me". And even if that was the case, most languages out there concatenate using + as operator.
You, sir, are still in pre-alpha stage.
→ More replies (1)
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
u/ejuliol May 29 '20
[-] Variable “you” has not been defined! [-] Variable “me” has not been defined!
1
May 29 '20
You could have not been such a strongly typed asshole and concataneted the strings like a friendly JS bro instead
1
1
1
1
1
1
u/ensignrad May 29 '20
Every language: can not convert from object to a number.
JS: "[object Object][object Object]" PARKOUR
1
1
1
u/brandysimp May 29 '20
I don’t know In older languages (like good old basic) where you aren’t required to declare the variables first it would add them because they would be treated like variables and you get nothing... come to think about it might be a metaphor I itself lol
1
1
1
1
1
1
1
1
May 29 '20
That is the worst way to ask someone out. It doesn't matter if the person being asked out likes the other person. If my crush asked me out like this, my answer would be "not happening" as a natural instinct.
1
u/Luz5020 May 29 '20
Expected a fact!
Here->You+Me
Expression defined as „wish“ which is unrecognized!
1
1
1
1
1
1
1
1
u/theqbit May 29 '20
Error: Unknown variable "you". To get to know "you", please provide phone number.
1
1
1
1
1
1
1
1
May 29 '20
* you+me
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'you' is not defined1
1
1
1
1
1
1
1
1.8k
u/[deleted] May 29 '20
Shouldn't it be the other way around? From char type to int type?