Edit: Also where are the unit tests?
That's what makes this a "small" JavaScript library for managing asynchronicity. And when you're using it for things like choosing which ads to display, etc (like some of the examples) you really don't want your JS load overhead to be very high.
[1] https://github.com/douglascrockford/RQ/commits/master [2] https://github.com/petkaantonov/bluebird/commits/master?page...
Favourite function description quote: "RQ.parallel does not add parallelism to JavaScript. It allows JavaScript programs to effectively exploit the inherent parallelism of the universe."
Favourite variable name: untilliseconds
afterilliseconds sincilliseconds againilliseconds beforilliseconds pollilliseconds intervilliseconds
(I may start using intervilliseconds, just to drive some people crazy.)
He didn't like class keyword, thought typing (TypeScript etc) is a wrong direction. This (albeit it began 2013, but it was just updated) library does not mention ES6 Promises, proposal for async await, or the yield hack.
seems like some NIH thinking in crockford land
I'm sure every early node person here has one, even if they didn't push it to github.
Looking back at it, I'm suddenly feeling a bit nostalgic for those days.
I was hoping one day Javascript could support "deep" coroutines, so we can keep on programming "sequentially" as we did before while still using asynchronous mechanisms.
Perhaps there exist languages that compile to Javascript, that offer deep coroutines (?)
Babel already enables them.
fs = require 'fs'
mojo = fs.readFile 'mojo.txt' 'utf-8' ^!
console.log (mojo)
(note that if readFile returned a promise you wouldn't need to use the ^)[1]: Well, based on comments on HN and Reddit. Not sure about hard numbers, but it certainly gets talked about a lot.
Promise.any([newTimeout(1000), otherPromise])
where:
newTimeout :: Milliseconds -> Promise
If the combination of these two isn't already in Promise implementations, it should be.
Bluebird already has the timeout function with similar semantics.
https://github.com/petkaantonov/bluebird/blob/master/API.md#...