Live data from Hacker News

You Can't JavaScript Under Pressure

toys.usvsth3m.com

41–50 of 110 posts

Re: You Can't JavaScript Under Pressure

#41
post #2

Oh! Hello. This is my thing I made for usvsth3m.com. Hope y'all like it. HTML5 Webworkers made it possible - sandboxing user-submitted JavaScript so an accidental while(1) or document.write can't kill everything. Do have a look at the source code. Oh, and try turning up your speakers and typing in the Konami code...

If you alert() something inside an infinite loop it doesn't seem to be able to detect it (nor does it show an alert box!)

Nothing like figuring out another way to kill your browser :)

Re: You Can't JavaScript Under Pressure

#42
It's problems like 5 that make me sad that IE
    return i.reduce(function(prev, next) {
        if (typeof(next) == "object" && next.length) { return arraySum(next) + prev; }
        if (typeof(next) == "number") { return next + prev; }
        return prev;
    }, 0);
Something that simple needs to be shimmed on earlier IEs. In fact, I had to look up Array.prototype.reduce for this since I usually use Underscore's. Javascript problems...

Re: You Can't JavaScript Under Pressure

#43

Earlier quoted context omitted.

Because of your comment, HN will have a dozen "I am so disappointed in all of you" posts in the coming week declaring how mean everyone here is, and how it is no longer like it "once was". I hope you are happy.

I love how you're mocking HN and the parent post at the same time!

I'm actually not mocking either the post or HN. If I am being a little snarky, it is towards the thin skinned who zero in on any comment they don't like and then launch a tirade in hopes of, essentially, group bullying. It happens with increasing regularity.

Re: You Can't JavaScript Under Pressure

#48
post #16

Fun little puzzles. First 4 went pretty quickly (~8:00) and then the last one took ~7 minutes Googling around for this so I could test if a variable was an integer... n===+n && n===(n|0) Wish I could see my answers after the fact though! Edit: Read the initial requirements of the puzzle, it says sum all the integers , not all the numbers . People using (typeof i[x] == 'number') just got lucky because the test-cases d…

    n % 1 == 0
Post reply on HN