The Official Funny Stuff Thread™
-
@Rhywden said in The Official Funny Stuff Thread™:
@topspin Yeah, but if you're working with
nullable
types in C#, sometimes you have to do that. If a intermediary property may be null then you need to do the bool check explicitlyif ( Instance.PropertyMayBeNull?.BoolValue == true) { //works [...] } if (Instance.PropertyMayBeNull?.BoolValue) { //does not work [...] }
because here you might have
null
,true
orfalse
and null isn't the same as false, after all. So the compiler will balk at that. Of course, you could do null checks all over the place but that would defeat the purpose of the?
inPropertyMayBeNull?
in the first place.Doesn't C# have the elvis operator? to me, that feels like it'd make the intent more clear.
Something like this.if ( Instance.PropertyMayBeNull?.BoolValue ?: false) { [...]
It explicitly says that if this thing evaluates to null, then it's false.
-
@Rhywden said in The Official Funny Stuff Thread™:
@topspin Yeah, but if you're working with
nullable
types in C#Trigger warning FFS.
-
@MrL said in The Official Funny Stuff Thread™:
@Rhywden said in The Official Funny Stuff Thread™:
@topspin Yeah, but if you're working with
nullable
types in C#Trigger warning FFS.
-
@Rhywden said in The Official Funny Stuff Thread™:
you might have
null
,true
orfalse
Make
FILENOTFOUND
benull
?
-
@topspin said in The Official Funny Stuff Thread™:
@dangeRuss said in The Official Funny Stuff Thread™:
@Rhywden said in The Official Funny Stuff Thread™:
@dangeRuss That's what you get for allowing assignments in
if
statements.That's what you get for not putting the value on the left side.
Horrible hack.
That’s what yougetdeserve for comparing with Boolean constants.It’s
if (foo)
, notif (foo == true)
orif ((foo == true) == true)
.It's not a horrible hack it's good practice in languages like c.
if (true = foo)
will throw an error, so willif (5=foo)
-
But also funny stuff
-
@Rhywden said in The Official Funny Stuff Thread™:
@topspin Yeah, but if you're working with
nullable
types in C#, sometimes you have to do that. If a intermediary property may be null then you need to do the bool check explicitlyif ( Instance.PropertyMayBeNull?.BoolValue == true) { //works [...] } if (Instance.PropertyMayBeNull?.BoolValue) { //does not work [...] }
because here you might have
null
,true
orfalse
and null isn't the same as false, after all. So the compiler will balk at that. Of course, you could do null checks all over the place but that would defeat the purpose of the?
inPropertyMayBeNull?
in the first place.You forgot
FILE_NOT_FOUND
-
-
-
-
@GOG said in The Official Funny Stuff Thread™:
@loopback0 said in The Official Funny Stuff Thread™:
But also funny stuff
I need one of those.
Ale co to jest po-polsku?
-
@BernieTheBernie dafuq is this hyphen
-
@Gustav Orthografistique trolling perhaps?
-
@Carnage said in The Official Funny Stuff Thread™:
@Rhywden said in The Official Funny Stuff Thread™:
@topspin Yeah, but if you're working with
nullable
types in C#, sometimes you have to do that. If a intermediary property may be null then you need to do the bool check explicitlyif ( Instance.PropertyMayBeNull?.BoolValue == true) { //works [...] } if (Instance.PropertyMayBeNull?.BoolValue) { //does not work [...] }
because here you might have
null
,true
orfalse
and null isn't the same as false, after all. So the compiler will balk at that. Of course, you could do null checks all over the place but that would defeat the purpose of the?
inPropertyMayBeNull?
in the first place.Doesn't C# have the elvis operator? to me, that feels like it'd make the intent more clear.
Something like this.if ( Instance.PropertyMayBeNull?.BoolValue ?: false) { [...]
It explicitly says that if this thing evaluates to null, then it's false.
Well, yes, but you still need an operator whereas
if(boolValue) {
doesn't.
-
-
-
@dcon Where'd you find the picture of @tediRuss?
-
@HardwareGeek Facebook, where else?!
-
-
-
-
-
I hired a guy to paint my porch.
A couple of hours later he said "I'm done painting your car, but I should probably tell you, it's not really a Porsche."
-
Apparently things can vary pretty wildly in the multiverse!
-
@Mason_Wheeler sauce?
-
@dangeRuss It's the same two actors. Andy Serkis (bottom-right) provided both the voice and the mocap acting for Gollum.
-
@Mason_Wheeler said in The Official Funny Stuff Thread™:
@dangeRuss It's the same two actors. Andy Serkis (bottom-right) provided both the voice and the mocap acting for Gollum.
Yes, but what movie is on the bottom?
-
@dangeRuss Black Panther
-
-
-
@dangeRuss You! The one that is moving!
-
-
@dangeRuss Uh oh. You could add the shirt to the roster of faces allowed access, but then anyone wearing the same shirt could walk right in.
Damn clever, these Klingons.
-
@da-Doctah Nah, their actual face would not be recognized so the door would stay locked. And that works because no malicious person would ever cover their face so it can't be recognized.
-
-
-
-
-
-
@dcon said in The Official Funny Stuff Thread™:
You can still text your boss the picture as proof, until the day someone says you could have faked it with AI.
Thus signalling the end of the "pics or it didn't happen" era.
-
@da-Doctah said in The Official Funny Stuff Thread™:
You can still text your boss the picture as proof, until the day someone says you could have faked it with AI.
Thus signalling the end of the "pics or it didn't happen" era.Yes, but it's a tell that the minion has
sixfive fingers instead of the expected three
-
snq:
-
@da-Doctah idgi
-
ʇı ʇnoqɐ ʞuıɥʇ
-
-
@Zecc said in The Official Funny Stuff Thread™:
ʇı ʇnoqɐ ʞuıɥʇ
Yeah, I understood the physical state of the crashed vehicle. But I'm not understanding why that's funny.
-
@Tsaukpaetra Dad humor, I guess.
-
@PleegWat said in The Official Funny Stuff Thread™:
@Tsaukpaetra Dad humor, I guess.
I'm close to digging into my "artist impression interpretation" skills at the moment. But most art isn't meant to be funny ha ha....
-
@Tsaukpaetra "snq" looks like the word bus umop apisdn
-
@hungrier said in The Official Funny Stuff Thread™:
@Tsaukpaetra "snq" looks like the word bus umop apisdn
Well, sure, but...
Okay, I suppose I need to wake up Inner Child or something.