$30 off During Our Annual Pro Sale. View Details »
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
980
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
140
Meltdown & Spectre
jorendorff
0
98
<textarea distributed>: An illustrated intro to CRDTs
jorendorff
0
78
Cabbages, Goat, and Wolf In Two Styles!!
jorendorff
0
70
John Wark — Design Principles for a High School Coding Curriculum
jorendorff
1
120
Teaching Programming
jorendorff
2
140
goto fail; — Challenges and Considerations for Teaching Programming to Kids
jorendorff
1
83
How To Fix Bugs
jorendorff
0
110
Compilers 101: An introduction to programming languages and parsing
jorendorff
3
800
Other Decks in Programming
See All in Programming
これならできる!個人開発のすゝめ
tinykitten
PRO
0
100
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
270
JETLS.jl ─ A New Language Server for Julia
abap34
1
400
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
130
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
3
720
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
110
【CA.ai #3】Google ADKを活用したAI Agent開発と運用知見
harappa80
0
310
【Streamlit x Snowflake】データ基盤からアプリ開発・AI活用まで、すべてをSnowflake内で実現
ayumu_yamaguchi
1
120
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
390
関数実行の裏側では何が起きているのか?
minop1205
1
690
SwiftUIで本格音ゲー実装してみた
hypebeans
0
370
Giselleで作るAI QAアシスタント 〜 Pull Requestレビューに継続的QAを
codenote
0
190
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Speed Design
sergeychernyshev
33
1.4k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Raft: Consensus for Rubyists
vanstee
141
7.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.1k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
How to Ace a Technical Interview
jacobian
280
24k
Building Applications with DynamoDB
mza
96
6.8k
It's Worth the Effort
3n
187
29k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Fireside Chat
paigeccino
41
3.7k
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