You can do everything in Javascript with six characters: []()!+

Originally published at: https://boingboing.net/2017/10/16/you-can-do-everything-in-javas.html

1 Like

You can do everything in binary with two characters: 01

15 Likes

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.

7 Likes

2 characters, not two instructions.

1 Like

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.

3 Likes

AND and NOT should be enough

2 Likes

You know where this leads, don’t you?

"JavaScript … imperfections … sterilize … "

2 Likes

It seems like more work.

1 Like

One thing you can’t do with only six characters: write readable code.

4 Likes

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.

3 Likes

I can do everything in your username with 5 characters.

4 Likes

I’m filing away the obvious “your mom” variant of that diss for future use.

1 Like

It is like trying to break into a computer in Fallout

2 Likes

You can do everything in assembler.

1 Like

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!

1 Like

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

1 Like

Yeah, but you can use those characters to find someone to write readable code.

5 Likes