
Show HN: A Javascript library to overcomplicate Five - joezo
http://jackdcrawford.github.io/five/
======
filearts
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.

~~~
morley
var six = five() + five() / five();

~~~
Evgeniuz
var six = function() { return five() + five() / five(); }

Some people may rely on that functionality.

------
jgillich

        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.

~~~
sfeng
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()

------
zaptheimpaler
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.

------
mooreds
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.

------
hacliff
This can't be right, nowhere near enough dependencies

------
talles
Can't wait until it reach version... 5

------
andrey-p
Whoah. The Mongolian word for "five" means "ceiling" in Bulgarian.

~~~
neals
Wake up sheeple!

------
dclowd9901
Really makes me wish you could invoke instance methods on numbers (ala
5.amIFive())

~~~
Softcadbury
You can :)

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

5..amIFive();

~~~
dclowd9901
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.

------
saraid216
AHA! I knew it! ALL THINGS HAPPEN IN FIVES. What _can 't_ you accomplish with
this library?

[http://principiadiscordia.com/book/23.php](http://principiadiscordia.com/book/23.php)

------
timme
finally. shame it's not written in the much more scalable coffeescript.

~~~
oakesm9
Give it a day and someone will have ported it ;-)

~~~
rmrfrmrf
Done. [https://github.com/barretron/five](https://github.com/barretron/five)

~~~
vladharbuz
But but but I did it first! And you didn't even publish it to npm. :C

[https://github.com/vladh/five-coffee](https://github.com/vladh/five-coffee)

~~~
rmrfrmrf
Mine's class-based and compiles to javascript on install. HOLD DAT! ;)

~~~
vladharbuz
oh snap

------
weddpros
Who's gonna write Flappy Five in JS?

------
sramsay
But what good is a five overcomplication library without overly complicated
documentation?

------
assertnotnull
This will be ported to GWT 5.5.0 in a FiveLabel. It would fit nicely.

