programmer_humor·Programmer HumorbyRagdoll X if 1: return TrueSoy 0 got truthmogged by chad 1 😎View original on sh.itjust.works588Comments27
IILikeBoobies replylemmy.cahttps://en.wikipedia.org/wiki/Ternary_computer Think of the fun we'd have, still no 2 though.25
ZZILtoid1991 lemmy.world4Hide 4 repliesNow get ready for fuzzy logic! -1.0 = false 0.0 = neutral 1.0 = true Also now you know more about AI than most AI bros on the internet.32
kkubica replyfedia.io1Hide 1 replyThe not so funny thing is that if you try this in scripting languages -1 and 1 are both truthy so...1
ZZILtoid1991 replylemmy.worldBecause you need to infer the fuzzy boolean as a type (I personally plan to make one that works between -127 and 127, on integers instead of floats), and then write an interpreter to use the values accordingly.1
jjaybone replylemmy.zip2Hide 2 repliesAnd it’s an error code from a library call, because false means the call succeeded.23
SScrath replylemmy.dbzer0.comI used to use enums for my return codes. Then I got pissed I had to add my enum definition to every project I worked on. I now return integers based on errno1
A_norny_mousse replypiefed.zip1Hide 1 replyI'd just like to interject for a moment. What you're refering to as Bash, does in fact apply to all UNIX-like shells.6
Scoopta replyprogramming.devYes I know, I was gonna say "shell is confused" but it just didn't feel like it had the same ring to it1
zzero_spelled_with_an_ecks replyprogramming.devUse perl exec to run a bash script. Now you're confused, too. And not just about why you're using perl.5
massive_bereavement fedia.ioI think some memes should have a sign that says: "You must be this high to ride".12
GGlenRambo jlai.luNew Drake meme format? Orange jacket guy, for those that don't know. https://knowyourmeme.com/memes/drakeposting/photos and now you know.2
I think I saw a 2...
Go back to bed bender, there's no such thing as a 2
https://en.wikipedia.org/wiki/Ternary_computer
Think of the fun we'd have, still no 2 though.
Fake news. There's no such thing as a 2.
Nah you're just reading the voltage instead of its logical representation
Now get ready for fuzzy logic!
Also now you know more about AI than most AI bros on the internet.
Laughs in VHDL
Laughs in SystemVerilog
The not so funny thing is that if you try this in scripting languages -1 and 1 are both truthy so...
Because you need to infer the fuzzy boolean as a type (I personally plan to make one that works between -127 and 127, on integers instead of floats), and then write an interpreter to use the values accordingly.
C be like "this shit is true af" and it's the number 6396128.
And it’s an error code from a library call, because false means the call succeeded.
This is the way. Exceptions are overrated.
I used to use enums for my return codes.
Then I got pissed I had to add my enum definition to every project I worked on.
I now return integers based on errno
Bash would be confused
I'd just like to interject for a moment. What you're refering to as Bash, does in fact apply to all UNIX-like shells.
Yes I know, I was gonna say "shell is confused" but it just didn't feel like it had the same ring to it
Use perl exec to run a bash script. Now you're confused, too. And not just about why you're using perl.
if (true) return BIG;
Bool me once, shame on thee. Bool me twice, shame on me.
Bool or bool not, there's no twice.
I think some memes should have a sign that says: "You must be this high to ride".
I think that this couldn't be any funnier.
True.
1.00 is so real
New Drake meme format?
Orange jacket guy, for those that don't know. https://knowyourmeme.com/memes/drakeposting/photos and now you know.