addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramlinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Beyond the Callback: Yield Control with Javascript Generators

Meetup starts at 6:30pm, with 30 minutes of social time. Beginning at 7pm, Darren Cruse will present Beyond the Callback: Yield Control with Javascript Generators.

“A big part of JavaScript programming is its single-threaded control flow that never blocks. The result is that programs are written in ‘continuation passing style’ where functions don’t return values, they ‘call back’ instead.

“Functions can return promises, but promises themselves resolve through callbacks... so the non-blocking control flow remains. Generators are about to change that!

Generators were designed for iterating over infinite sequences of items, but they can also be used for writing code that 'appears to block’ (while remaining single-threaded). This restores the usefulness of simple functions, which take arguments and return values.

“This talk will explore these ideas in depth, explain what generators are and how they work, and survey some ‘polyfill’ libraries that use them to provide ‘pseudo blocking’ control flow. I will also look at the ES7 async/await proposal (similar functionality – different syntax), and consider how generators can be used today. Lastly, I'll look at what (if any) performance costs come from using generators.

“By the end, I hope you will come away with an understanding of what generators are and how they can be useful to you as a JavaScript developer, and that you will have the confidence to pick up and use a generators library.”

-------

Starting about 8:30pm, we'll move into a hacking session to experiment with the material that's been presented, and with JavaScript and Node.js in general.

Sovereign Technologies will be providing complementary pizza and beverages, so come hungry, come thirsty, bring your laptop and be ready to code!

Join or login to comment.

  • Darren C.

    Just fyi I loaded the slides on slideshare at http://www.slideshare.net/darrencruse/beyond-the-callback-yield-control-with-javascript-generators

    I also uploaded the code examples here in the files section (under "More" above).

    4 · July 21, 2015

  • Andrew U.

    Thanks for another interesting presentation and thoughtful discussion! Thanks also to the sponsors for making it possible!

    1 · July 17, 2015

  • Jeff B.

    Darren and all, I'm sorry I will miss you tonight. I know it will be a great presentation. Will catch up with you all soon.

    July 16, 2015

  • A former member
    A former member

    During the hacking session, if anyone is interested in learning the equivalent with Clojurescript, I'd love to show you the work I've been doing. My startup switched to Clojure three months ago, and we haven't looked back.

    1 · July 15, 2015

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy