-
Recent Posts
Projects
Archives
Categories
Meta
Category Archives: Asynchronous JavaScript
Bringing async/await to life in JavaScript
My dream has come true this week. I can now write clean asynchronous code in JavaScript: no callbacks, no intrusive control flow library, no ugly preprocessor. Just plain JavaScript! This is made possible by a new feature of JavaScript called … Continue reading
Posted in Asynchronous JavaScript, Uncategorized
43 Comments
Harmony Generators in streamline.js
Harmony generators have landed in a node.js fork this week. I couldn’t resist, I had to give them a try. Getting started If you want to try them, that’s easy. First, build and install node from Andy Wingo’s fork: $ … Continue reading
Posted in Asynchronous JavaScript, Uncategorized
Leave a comment
Node.js stream API: events or callbacks?
Last year, I wrote a blog post about events and node streams. In this post, I proposed an alternative API for streams: callback-oriented rather than event-oriented. For readable streams, the proposal was to have a simple read(cb) call, where cb … Continue reading
Posted in Asynchronous JavaScript, Uncategorized
6 Comments
node.js for the rest of us
Simple things should be simple. Complex things should be possible. Alan Kay I published streamline.js 18 months ago but did not write a tutorial. I just took the time to do it. The tutorial implements a simple search aggregator application. … Continue reading
Posted in Asynchronous JavaScript, Uncategorized
3 Comments
Asynchronous JavaScript with Generators – An Experiment
I have recently added a third blade to my little asynchronous programming swiss army knife: the generator blade. Looks sharp! Here are some details. Generators Generators are JavaScript’s flavor of coroutines. They solve one of computer science’s most important problems: … Continue reading
Posted in Asynchronous JavaScript, Uncategorized
5 Comments
Fibers and Threads in node.js – what for?
I like node.js, and I’m not the only one, obviously! I like it primarily for two things: it is simple and it is very fast. I already said it many times but one more won’t hurt. Before working with node, … Continue reading
Posted in Asynchronous JavaScript, Uncategorized
59 Comments
Yield – Resume vs. Asynchronous Callbacks – An Equivalence
I introduced streamline.js about four months ago and I never took the time to explain the theory (if it can be called a theory) behind it. I’ll try to do it in this post. The material that follows is a … Continue reading
Posted in Asynchronous JavaScript, Uncategorized
19 Comments
Asynchronous episode 3 – Adventures in event-land
From callbacks to events This is my third post on asynchronous Javascript. In the first one, I explored callbacks and I explained how I ended up creating streamline.js, a tool that simplifies programming in callback-land. In the second one, I … Continue reading
Posted in Asynchronous JavaScript, Uncategorized
3 Comments
Currying the callback, or the essence of futures…
Wow, this one is not for dummies!!! I decided to play it pedantic this time because I posted a layman explanation of this thing on the node.js forum and nobody reacted. Maybe it will get more attention if I use … Continue reading
Posted in Asynchronous JavaScript
28 Comments
Asynchronous Javascript – the tale of Harry
Catching Up Before telling you about Harry, I’ll start with a short account of what I went through recently so that those who know me from long ago can understand how I ended up being involved in asynchronous Javascript development, … Continue reading
Posted in Asynchronous JavaScript
73 Comments