Reactive Programming in Perl 6

Reactive Programming in Perl 6

By Jonathan Worthington (‎jnthn‎)
Date: Not scheduled yet.
Duration: 40 minutes
Language: English
Tags: async perl6 reactive


We're all used to arrays. But what about when we don't want to produce all of the values at once, or there might be an infinite number of them? This is where we turn to iterators, or enumerators, or lazy lists, or generators - all of which boil down to the a single design pattern: the iterator pattern.

Iterators are great. We ask them for a value, and they go off and work on producing one for us. However, that also means that iterators are synchronous and blocking. They're less ideal when it comes to lists of things that are produced asynchronously: file system change notifications, user interaction, tweets, and so forth.

Enter reactive programming, a paradigm derived from the exciting category-theoretic realization that the iterator pattern and the observer pattern are dual!

"Huh?" "Category..dual...what?"

Thankfully, you don't need to learn category theory to put reactive programming to use. Here's the bottom line: all of the familiar list operators (map, grep, zip, concat, etc.) can be sanely defined on asynchronously produced streams of values too. This, happily, means you can use your existing knowledge of a bunch of language constructs in order to deal with asynchronous data.

Come along, and learn how to grep the future!


Sponsors

Partners

Social Sites

PetaMem on LinkedIn
PetaMem on Facebook
PetaMem on Twitter