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
Implementing Functional Reactive Programming in...
Search
oetzi
February 21, 2012
Programming
1
230
Implementing Functional Reactive Programming in Scala - Progress Presentation
A presentation showing the capabilities of my current FRP framework
oetzi
February 21, 2012
Tweet
Share
More Decks by oetzi
See All by oetzi
Implementing Functional Reactive Programming in Scala - Final Presentation
oetzi
1
98
Implementing Functional Reactive Programming in Scala - Project Proposal
oetzi
1
180
Other Decks in Programming
See All in Programming
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.1k
「ブロックテーマでは再現できない」は本当か?
inc2734
0
960
2026年 エンジニアリング自己学習法
yumechi
0
130
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
190
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
540
CSC307 Lecture 07
javiergs
PRO
0
550
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
dchart: charts from deck markup
ajstarks
3
990
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
270
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
160
Architectural Extensions
denyspoltorak
0
280
Featured
See All Featured
Making Projects Easy
brettharned
120
6.6k
Odyssey Design
rkendrick25
PRO
1
490
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
200
Measuring & Analyzing Core Web Vitals
bluesmoon
9
750
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
99
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
57
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Exploring anti-patterns in Rails
aemeredith
2
250
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
110
Transcript
Implementing Functional Reactive Programming in
Remember this?
Behaviour[T] = Time => T
Event[T] = Stream[(Time, T)]
Lets use them...
val beh = new Behaviour(time => Color.red)
beh.at(now)
beh.at(now) def now = System.currentTimeMillis
beh.map(val => val.toString)
val event = new Event[Boolean]
beh.until(event, beh1)
“Hi!”.toggle(event, “Bye!”)
“Hi!”.toggle(event, “Bye!”) ?
implicit def lift[T](value : T) = { new Behaviour(time =>
value) }
implicit def lift[T](value : T) = { new Behaviour(time =>
value) }
So Far:
So Far: - Core FRP: Behaviour/Event
So Far: - Core FRP: Behaviour/Event - UI Framework
So Far: - Core FRP: Behaviour/Event - UI Framework -
I/O Framework
Everything: http://github.com/oetzi/echo
An example...
None
val playButton = Button(button => "Play".toggle(button.click, "Pause"))
val slider = Slider()
val playing = false.toggle(playButton.click, true) val song = new Song(file,
playing, slider.value)
val anim = song.volume.map1(width) { (v, w) => math.min(v *
(w / 50F), w) } val bouncer = Block(anim, height - 70, Color.green)
val frame = Frame(width, height, List( bouncer, slider, playButton ))
What if something goes wrong?
class Dangerous extends Breakable { dangerous { () => break_everything()
} }
class Dangerous extends Breakable { dangerous { () => break_everything()
} } val danger = new Dangerous() val err : Event[Exception] = danger.errors
DOING IT LIVE
Thank You!