Canva was proud to host Frontend Engineering Sydney for the third time earlier this month. Kyle Simpson, open web evangelist and author of “You Don’t Know JS”, Cathy Lill of Data61 and Canva’s own Damon Oehlman spoke about different aspects of functional programming for frontend development.
Kyle Simpson - FPO and fasy
Kyle began his talk with the “world’s quickest functional programming primer”, covering pure functions, higher order functions and closure, partial application and currying, composition and iterations in five slides. He then talked about two Functional libraries he has written, FPO and fasy.
FPO (pronounced eff-poh) stands for “functional programming in object style”, and allows you to name arguments instead of juggling argument order. Fasy (pronounced like “Tracy”) allows you to apply functional programming concepts like map and reduce to asynchronous programming. Both were initially written as teaching tools, but Kyle and many others have since used them in production code.
Cathy Lill - Intro to Reflex FRP
Damon Oehlman - Pull Streams
Canva front end engineer Damon Oehlman took us through an “unloved but extremely useful” piece of technology, pull streams. Pull streams are a reinvention of node streams, as Damon describes:
Picture yourself drinking from a bubbler - you turn the bubbler on, and you drink from it as fast as the water comes out. That’s like getting data from a traditional node stream. Pull streams are more like drinking from a straw. You can determine the pace that you consume the data at.
Damon took us through the basic structure of pull streams and the top-level logic of a couple of examples he wrote, including a demo that pulls images from Flickr.
Many thanks to everyone who attended! Keep an eye on @canvatech on Twitter for details of the next Frontend Engineering Sydney event, and remember to tag #frontendsyd.