Originally published at: https://boingboing.net/2017/10/16/you-can-do-everything-in-javas.html
…
You can do everything in binary with two characters: 01
I’m not seeing how to program in only 2 characters. P’’ seems about as small as it gets.
https://en.wikipedia.org/wiki/P′′ I’d be interested how to do it in only 2.
Oh sweet Goddess! I can’t wait 'til someone replaces js.node with the JSFuck version. Epic pwnage when someone’s website tries to get you to download a 20 gig javascript file that is just there for analytics.
2 characters, not two instructions.
Should I be alarmed that my browser displayed a dialog that said “good luck and good night” when I viewed this article? Does Internet Explorer 4 do that too? Maybe I should upgrade.
AND and NOT should be enough
You know where this leads, don’t you?
"JavaScript … imperfections … sterilize … "
It seems like more work.
One thing you can’t do with only six characters: write readable code.
Bah. The only serious esoteric language is Piet, which does all that in six colors.
Okay, three shades each of six colors. Plus black and white. Point being, it’s prettier so it’s better.
I can do everything in your username with 5 characters.
I’m filing away the obvious “your mom” variant of that diss for future use.
It is like trying to break into a computer in Fallout
You can do everything in assembler.
Isn’t that true of regular JS as well?
MAPPING is full of win.
't': '(true+"")[0]',
'u': '(undefined+"")[0]',
'v': '(+(31))["to"+String["name"]](32)',
'w': '(+(32))["to"+String["name"]](33)',
'x': '(+(101))["to"+String["name"]](34)[1]',
'y': '(NaN+[Infinity])[10]',
'z': '(+(35))["to"+String["name"]](36)',
'A': '(+[]+Array)[10]',
'B': '(+[]+Boolean)[10]',
'C': 'Function("return escape")()(("")["italics"]())[2]',
'D': 'Function("return escape")()([]["fill"])["slice"]("-1")',
'E': '(RegExp+"")[12]',
'F': '(+[]+Function)[10]',
'G': '(false+Function("return Date")()())[30]',
'H': USE_CHAR_CODE,
'I': '(Infinity+"")[0]',
I think I see a pattern!
I can name that tune in zero notes, Jim.
I interviewed the creator (discoverer?) of JSFuck, Martin Kleppe, about this and his other projects here