Just python being sus:
>>> chr(sum(range(ord(min(str(not()))))))'ඞ'
Just python being sus:
>>> chr(sum(range(ord(min(str(not()))))))@Ollivdb @ar I think that's thanks to all numbers in JS being floats, that said both Perl and Python refuse 1.0/0.0 so that's… interesting, I might be wrong there, been ages since I've looked into IEEE floats.
JS, where you can devide by zero....
@lanodan @ar
Something like that. But JS is sometimes simply a huge fu* up 🤷♂️
@lanodan @Ollivdb meanwhile ruby:
[1] pry(main)> 1.0/0.0but here's the kicker: it's allowed by ieee-754
or, to be more specific: you can trap on operations which produce problematic results, but you don't have to.
Every math teacher will execute you for that with a wooden square root of a pine tree 🙂
Well...but no.
An exception would make sense, in ALL languages. Maybe you can have some "experimental" math library for the math pros, where they can check for new theories. But not for the common programmer dude.
@Ollivdb @ar Well control over the floating point exceptions is a thing C allows (fesetexceptflag(3)) but I think should be kept well defined and static in languages like JS. (Specially JS in fact, due to it's sort of complete opposite to typing)
@a1ba @ar format c: (don't run this on MS-DOS/NT) but under layers of obfuscation.
@Ollivdb @soc @ar Yeah, only way to somewhat get integers in JS is to cast with |0, like 0.5|0 instead of 0.5.
Something we got since asm.js. And not to be confused with wasm which is actual bytecode while asm.js is backwards-compatible JS but leaning on modern JIT compilers recognising those explicit casts to get performance gains (integer operations being *much* faster).
@soc @lanodan @ar I don't see a float there. But maybe JS handles all numbers as floats internally. Don't know
@Ollivdb @lanodan @ar That seems to be exactly what the standard specifies:
https://en.wikipedia.org/wiki/IEEE_754#Special_values
It gets even weirder 😂
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.