rad polyfill © me
['Int','Float'].map(t=>'parse'+t).map(n=>[window[n],n]).map(([f,n])=>Math[n]=window[n]=(s,r)=>f(s.replace(/
/g,'100'),r))
-
-
-
a frightening number of people seem to be unable to detect that this was a goof
- 1 more reply
New conversation -
-
-
Here's a little babel plugin to fix that, for the giggles: http://astexplorer.net/#/gist/cee34dd1dbe83b763c6898300d895e4a/d7048db2bbfdd95124e89cca61acaa5b5cb3dd8a …
-
rad! I’ve been meaning to learn how to (ab)use Babel plugins for a while
didn’t know there was an online REPL for doing so! -
I've only dabbled a bit. But the REPL makes it really easy to see what you're doing and explore the AST. Hoping to do something useful next.
-
neat, a bit of fiddling later and it works on the window, global and Math versions of parseInt and parseFloat! https://astexplorer.net/#/gist/e2e72008c2be7cc355dfe36527391f1b/20e373a1efc41497f2e97e52f3711765200a5932 …

-
I mean I did build postcss-stronk, so maybe
@gidztech’s Babel plugin idea isn’t too far fetched…
https://astexplorer.net/#/gist/e2e72008c2be7cc355dfe36527391f1b/20e373a1efc41497f2e97e52f3711765200a5932 …
End of conversation
New conversation -
-
-
so what is the correct behaviour here? the 100 character symbolises the integer "100" but character code (u+1f4af) is 128175 as integer...
-
the correct behaviour is this behaviour; this is a joke
-
yes, I understood that. I was perpetuating the humorous overtones with suggested behaviour alterations.
-
in that case, here’s my proposal: https://twitter.com/ticky/status/883046326585262080 …

-
excellent! that deserves being made into an NPM package, depended upon by the universe, then you need to unpublish it to watch Rome burn :-D
End of conversation
New conversation -
-
-
I guess my polyfill should handle this! Haha
End of conversation
New conversation -
-
Thanks. Twitter will use this to make your timeline better. Undo
-
-
-
No radix???
-
- End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Rad software maker
Aspiring nomad
avatar by
