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
1k
9
Share
Functional Reactive Programming
Slides for a talk by Wilkes Joiner at Nashville Code Co-op Talk Day.
Jason Orendorff
March 30, 2013
More Decks by Jason Orendorff
See All by Jason Orendorff
Aristotle's Topics
jorendorff
0
170
Meltdown & Spectre
jorendorff
0
130
<textarea distributed>: An illustrated intro to CRDTs
jorendorff
0
99
Cabbages, Goat, and Wolf In Two Styles!!
jorendorff
0
95
John Wark — Design Principles for a High School Coding Curriculum
jorendorff
1
140
Teaching Programming
jorendorff
2
180
goto fail; — Challenges and Considerations for Teaching Programming to Kids
jorendorff
1
100
How To Fix Bugs
jorendorff
0
140
Compilers 101: An introduction to programming languages and parsing
jorendorff
3
830
Other Decks in Programming
See All in Programming
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
220
AI時代のUIはどこへ行く?その2!
yusukebe
19
6.5k
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
270
dRuby over BLE
makicamel
2
300
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
1.3k
AIとRubyの静的型付け
ukin0k0
0
530
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
240
tsserverとは何だったのか、これからどうなるのか
nowaki28
1
440
ビジネスモデルから紐解く、AI+型駆動開発
hirokiomote
2
5.2k
LLM Plugin for Node-REDの利用方法と開発について
404background
0
160
Migrations : C'est une question d'hygiène !
vinceamstoutz
0
3.2k
今さら聞けないCancellationToken
htkym
0
220
Featured
See All Featured
Exploring anti-patterns in Rails
aemeredith
3
390
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Navigating Weather and Climate Data
rabernat
0
210
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
Accessibility Awareness
sabderemane
1
130
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
The untapped power of vector embeddings
frankvandijk
2
1.7k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
600
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Side Projects
sachag
455
43k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
160
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