Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Functional Reactive Programming
Search
Jason Orendorff
March 30, 2013
Programming
9
990
Functional Reactive Programming
Slides for a talk by Wilkes Joiner at Nashville Code Co-op Talk Day.
Jason Orendorff
March 30, 2013
Tweet
Share
More Decks by Jason Orendorff
See All by Jason Orendorff
Aristotle's Topics
jorendorff
0
150
Meltdown & Spectre
jorendorff
0
110
<textarea distributed>: An illustrated intro to CRDTs
jorendorff
0
89
Cabbages, Goat, and Wolf In Two Styles!!
jorendorff
0
81
John Wark — Design Principles for a High School Coding Curriculum
jorendorff
1
130
Teaching Programming
jorendorff
2
150
goto fail; — Challenges and Considerations for Teaching Programming to Kids
jorendorff
1
92
How To Fix Bugs
jorendorff
0
120
Compilers 101: An introduction to programming languages and parsing
jorendorff
3
810
Other Decks in Programming
See All in Programming
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
190
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
300
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
200
浮動小数の比較について
kishikawakatsumi
0
340
iOSアプリでフロントエンドと仲良くする
ryunakayama
0
120
要求定義・仕様記述・設計・検証の手引き - 理論から学ぶ明確で統一された成果物定義
orgachem
PRO
1
390
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
210
あなたはユーザーではない #PdENight
kajitack
4
270
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
190
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
2k
CSC307 Lecture 11
javiergs
PRO
0
580
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
2
170
Featured
See All Featured
エンジニアに許された特別な時間の終わり
watany
106
230k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
200
Practical Orchestrator
shlominoach
191
11k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
110
How to Ace a Technical Interview
jacobian
281
24k
Faster Mobile Websites
deanohume
310
31k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
74
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Color Theory Basics | Prateek | Gurzu
gurzu
0
210
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
130
Transcript
Functional Reactive Programming
“Everything flows, nothing stands still.” Heraclitus
Streams of Events
Streams of Events • Fire and forget events are relatively
easy to create.
Streams of Events • Fire and forget events are relatively
easy to create. • UIs
Streams of Events • Fire and forget events are relatively
easy to create. • UIs • Ajax posts
Streams of Events • Fire and forget events are relatively
easy to create. • UIs • Ajax posts • Messaging queues
Processing Events
Processing Events • A little trickier
Processing Events • A little trickier • difficult to compose
Processing Events • A little trickier • difficult to compose
• lots of plumbing
Processing Events • A little trickier • difficult to compose
• lots of plumbing • Callback Hell
“We’re going to need a bigger boat.”
FRP • A model for values that vary over time
• Originates from Haskell Community • Several different implementation styles • We are focusing on Microsoft’s ReactiveExtenions style
Observable
Observable • A marriage of Iterables and the Observer Pattern
Observable • A marriage of Iterables and the Observer Pattern
• Typical Sequence functions - Map, Filter, Reduce, Take
Observable • A marriage of Iterables and the Observer Pattern
• Typical Sequence functions - Map, Filter, Reduce, Take • Subscribe/OnNext
Observable • A marriage of Iterables and the Observer Pattern
• Typical Sequence functions - Map, Filter, Reduce, Take • Subscribe/OnNext • Error Handling
Observable • A marriage of Iterables and the Observer Pattern
• Typical Sequence functions - Map, Filter, Reduce, Take • Subscribe/OnNext • Error Handling • Timing function - Delay
Observable • A marriage of Iterables and the Observer Pattern
• Typical Sequence functions - Map, Filter, Reduce, Take • Subscribe/OnNext • Error Handling • Timing function - Delay • Buffering - Last N events
Observable • A marriage of Iterables and the Observer Pattern
• Typical Sequence functions - Map, Filter, Reduce, Take • Subscribe/OnNext • Error Handling • Timing function - Delay • Buffering - Last N events • Composable - SelectMany/FlatMap
Marble Diagrams
A Marble Diagrams
A Marble Diagrams
A B Marble Diagrams
A B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
A B A.merge(B Marble Diagrams
Autocomplete • On Keyup • Get the value of the
field • Only values of length 3 or more • Make remote call • Filter out bad response • Display results
Autocomplete in reality • On Keyup • Get the value
of the field • Throttle to 500ms • Only values of length 3 or more • Skip duplicates • Make remote call • Filter out bad response • Display results
Demo Source code: https://github.com/Cicayda/yolk-examples