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
10
960
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
110
Meltdown & Spectre
jorendorff
0
71
<textarea distributed>: An illustrated intro to CRDTs
jorendorff
0
49
Cabbages, Goat, and Wolf In Two Styles!!
jorendorff
0
45
John Wark — Design Principles for a High School Coding Curriculum
jorendorff
1
110
Teaching Programming
jorendorff
2
100
goto fail; — Challenges and Considerations for Teaching Programming to Kids
jorendorff
1
61
How To Fix Bugs
jorendorff
0
92
Compilers 101: An introduction to programming languages and parsing
jorendorff
3
760
Other Decks in Programming
See All in Programming
今から始めるCursor / Windsurf / Cline
kengo_hayano
0
110
ミリしらMCP勉強会
watany
2
370
ベクトル検索システムの気持ち
monochromegane
30
9k
RailsでCQRS/ESをやってみたきづき
suzukimar
2
1.5k
いまさら聞けない生成AI入門: 「生成AIを高速キャッチアップ」
soh9834
12
3.8k
プログラミング教育のコスパの話
superkinoko
0
120
パスキーのすべて / 20250324 iddance Lesson.5
kuralab
0
130
複数ドメインに散らばってしまった画像…! 運用中のPHPアプリに後からCDNを導入する…!
suguruooki
0
430
CQRS+ES勉強会#1
rechellatek
0
400
安全に倒し切るリリースをするために:15年来レガシーシステムのフルリプレイス挑戦記
sakuraikotone
5
2.3k
AHC 044 混合整数計画ソルバー解法
kiri8128
0
300
Go1.24 go vetとtestsアナライザ
kuro_kurorrr
2
470
Featured
See All Featured
Fireside Chat
paigeccino
37
3.3k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
16
1.1k
We Have a Design System, Now What?
morganepeng
51
7.5k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
How STYLIGHT went responsive
nonsquared
99
5.4k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.4k
Faster Mobile Websites
deanohume
306
31k
Optimising Largest Contentful Paint
csswizardry
35
3.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
135
33k
Building Your Own Lightsaber
phodgson
104
6.3k
GitHub's CSS Performance
jonrohan
1030
460k
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