30 comments

[ 3.2 ms ] story [ 58.4 ms ] thread
finally. shame it's not written in the much more scalable coffeescript.
Give it a day and someone will have ported it ;-)

    five.tooSlow = function() {
        var returnIn = new Date(new Date().valueOf() + 555);

        do {} while(new Date() < returnIn);

        return five();
    };
Finally a way to escape callback hell. I think somebody should write a jQuery.ajax plugin that calls the function repeatedly until a request is finished.
That actually wouldn't work, as the response from the request would never be processed while you were looping.

You can make synchronous requests already though:

    req = new XMLHttpRequest
    req.open("some/url", "GET", false);
    req.send()
I'm a little disappointed the test doesn't verify correctness addition, subtraction, multiplication or division.

Sigh. I suppose I'll have to submit an issue and pull request.

(comment deleted)
Who's gonna write Flappy Five in JS?
Thanks for sharing, but in my app I really need five to be six. If you could address this one small issue I'm sure your lib would see much more use.
var six = five() + five() / five();
var six = function() { return five() + five() / five(); }

Some people may rely on that functionality.

You can get 6 with `(five() + (five()/five()))`
Whoah. The Mongolian word for "five" means "ceiling" in Bulgarian.
Wake up sheeple!
But what good is a five overcomplication library without overly complicated documentation?
Really makes me wish you could invoke instance methods on numbers (ala 5.amIFive())
You can :)

Number.prototype.amIFive = function(){ return this.valueOf() == 5; }

5..amIFive();

Ah, so you have to have two dots... I suppose the first one denotes the floating point value, and the second denotes the prototype accessor. Very clever.
This can't be right, nowhere near enough dependencies
Can't wait until it reach version... 5
This will be ported to GWT 5.5.0 in a FiveLabel. It would fit nicely.
I poked around at the source code and this really doesn't seem to be web scale at all. Please look into mongodb to store the five, maybe throw in Redis to cache five in memory, and consider using a real-time processing framework like Storm to implement mapping and reducing five.

Until then I'm afraid this is just far too slow to consider using seriously in my web-scale project. This probably cant even handle 100M+ requests/second. Right now, its just me and grandma so I need 2 requests/sec, but this really doesn't seem scalable.

(comment deleted)