News for hackers. Stuff that matters.
Re:A Javascript journey with only six characters by qwertyuiop924 on Saturday October 08, 2016 @08:48AM (#12666782)
I'm a fan of Javascript. It has proper lambdas, true lexical scope, will soon have TCO, and is a really flexable language.

But it's not without its warts, and this is one of the worst. Although it's sometimes fun to mess with, nonetheless.

To see this taken to one of its logical extremes, check out If Hemmingway Wrote Javascript's entry for Douglas Adams:

  // Here I am, brain the size of a planet, and they ask me to write JavaScript...
  function kevinTheNumberMentioner(_){
    l=[]
    /* mostly harmless --> */ with(l) {
 
      // sorry about all this, my babel fish has a headache today...
      for (ll=!+[]+!![];ll<_+(+!![]);ll++) {
        lll=+!![];
        while(ll%++lll);
        // I've got this terrible pain in all the semicolons down my right hand side
        (ll==lll)&&push(ll);
      }
      forEach(alert);
    }
 
    // you're really not going to like this...
    return [!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]];
  }
Re:A Javascript journey with only six characters by digi_owl on Saturday October 08, 2016 @09:20AM (#12666861)
That reads like a close cousin of brainfuck...
Re:A Javascript journey with only six characters by qwertyuiop924 on Saturday October 08, 2016 @09:30AM (#12666884)
exactly
Re:A Javascript journey with only six characters by djsumdog on Saturday October 08, 2016 @02:27PM (#12667995)
For those of you too lazy to open up a Javascript console, it's a function that returns "42".
Re:A Javascript journey with only six characters by qwertyuiop924 on Saturday October 08, 2016 @03:08PM (#12668149)
It also alerts all the primes between 0 and its arg.
Re:A Javascript journey with only six characters by MyNameIsFred on Sunday October 09, 2016 @12:56PM (#12672021)
Or too lazy to work it out in your head. Jeez.
Re:A Javascript journey with only six characters by frostymarvelous on Sunday October 09, 2016 @09:35AM (#12671124)
For those not in the know or too lazy to Google, that's "the answer to life the universe and everything"
Re:A Javascript journey with only six characters by z3t4 on Saturday October 08, 2016 @03:23PM (#12668263)
Lexical scope with async closures makes it very easy to write async code for example events in a gui or handling multiple clients in a server. Its a big deal.