Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Functional Reactive Programming
Search
Jason Orendorff
March 30, 2013
Programming
1k
9
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
180
Meltdown & Spectre
jorendorff
0
140
<textarea distributed>: An illustrated intro to CRDTs
jorendorff
0
110
Cabbages, Goat, and Wolf In Two Styles!!
jorendorff
0
110
John Wark — Design Principles for a High School Coding Curriculum
jorendorff
1
160
Teaching Programming
jorendorff
2
190
goto fail; — Challenges and Considerations for Teaching Programming to Kids
jorendorff
1
120
How To Fix Bugs
jorendorff
0
150
Compilers 101: An introduction to programming languages and parsing
jorendorff
3
850
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
230
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
250
The Rails Doctrine Decade
koic
2
250
Agents on Rails - Rails at Scale 2026
irinanazarova
0
140
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
410
新卒PdEのリアル
ryu1013
1
510
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
2.5k
Java 27新機能 / Java 27 new features
kishida
2
150
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
300
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
8k
アクセシビリティから考える情報設計
high_g_engineer
0
380
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
430
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
530
The Art of Programming - Codeland 2020
erikaheidi
57
14k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
Between Models and Reality
mayunak
4
460
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
For a Future-Friendly Web
brad_frost
183
10k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
380
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
560
Designing for humans not robots
tammielis
254
26k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
710
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