News for hackers. Stuff that matters.
Re:Evil.js: A JavaScript library for thwarting hot-linkers by hrjet on Monday March 31, 2014 @11:35PM (#7506028)
I stand corrected; I am not that familiar with python. Though I remember reading somewhere that JSON can be evaled in both JS and Python. Perhaps the python bit is not true.
Re:Evil.js: A JavaScript library for thwarting hot-linkers by kibibu on Monday March 31, 2014 @11:50PM (#7506082)
JSON looks more-or-less like a Python dict, but you still wouldn't be able to parse {"x": NaN} or {"x": Infinity}
Re:Evil.js: A JavaScript library for thwarting hot-linkers by derefr on Tuesday April 01, 2014 @12:47AM (#7506225)
Oddly, there's actually no language that I know of that has NaN and Infinity constants. Many languages pretty-print those float values that way, but none of the parsers can interpret them back in.
Re:Evil.js: A JavaScript library for thwarting hot-linkers by GeneralMayhem on Tuesday April 01, 2014 @01:56AM (#7506424)
...do you mean other than JavaScript? They're not actually parser-level constants, they're just defined as globals/on the window object, but they work.