In the interest of full disclosure, here is the same trinity for my beloved #Perl.
Tabs (and any string that can’t be read as a number) are *numerically* equal to 0 and "0" because they don’t have any value in numeric context. If you want string equality or inequality, use eq or ne, respectively: https://perldoc.perl.org/perlop#Equality-Operators
(Boolean context is a separate thing, which is why most defined, non-empty and non-zero values are considered “true.”)
-ne and -eq are used for numerical comparison; and == and != are used for string comparison.So symmetrical, yet so insane.
@jernej__s @malwareminigun / \p{Quotation_Mark} solved \p{Quotation_Mark} /x #Perl #regex
(Note that doesn’t work with software using the #PCRE Perl “Compatible” #RegularExpression library because its #Unicode support is worse: https://www.pcre.org/current/doc/html/pcre2unicode.html#:~:text=Only%20the%20short%20names%20for%20properties%20are%20supported)
I wonder why mathematicians haven't picked up enochian glyphs yet.
@RefurioAnachro @cstross @mjgardner
Well that's something new that I've just learned. Thanks.
Fun indeed, right? I got the tip from the incredible @cstross's fabulous Laundry Files series, in which he mixes maths, occultism and commentary on organizational structures into one delightful reading experience, which I may be enjoying much more than I probay should. Oh, and lovecraftian horrors, because of course that's what happens, if you toss all of the above in one hot cauldron.
@mjgardner
I did not know that.
But it doesn't really surprise me that theologians have off by one errors too.
@mjgardner oh, this is sublime
If we could make a rock-paper-scissors version of that graph, which way would the arrows run?
The Javascript people were playing hooky when equivalence relations were taught in second year discrete mathematics.
If [] == 0 is true, and 0 == "\t" is true, but [] == "\t" is not true, the == operator isn't a form of equivalence. It is missing the transitive property.
Is that when the "unholy trinity" was cemented in place already?
This is what makes time travel possible.Doc Brown Leaning inside the DeLorean, Doc Brown pointed to a particular centerpiece unit. "Get a picture of this on tape," he said. / Marty pointed the camera at the strange-looking object. Moving his head next to it so that he could be seen on camera and describe its workings at the same time, Doc Brown continued in his professional tone. "This is what makes time travel possible — the flux capacitor." / "Flux capacitor, huh?" Marty repeated. "Is that its