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
88
Cabbages, Goat, and Wolf In Two Styles!!
jorendorff
0
80
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
90
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
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1k
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
0
930
AI & Enginnering
codelynx
0
110
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
250
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
組織で育むオブザーバビリティ
ryota_hnk
0
170
Data-Centric Kaggle
isax1015
2
760
CSC307 Lecture 07
javiergs
PRO
0
550
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
200
dchart: charts from deck markup
ajstarks
3
990
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
1.1k
Featured
See All Featured
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
300
GitHub's CSS Performance
jonrohan
1032
470k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
98
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
100
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Paper Plane (Part 1)
katiecoart
PRO
0
4k
A Soul's Torment
seathinner
5
2.2k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
320
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
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