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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
oetzi
February 21, 2012
Programming
230
1
Share
Implementing Functional Reactive Programming in Scala - Progress Presentation
A presentation showing the capabilities of my current FRP framework
oetzi
February 21, 2012
More Decks by oetzi
See All by oetzi
Implementing Functional Reactive Programming in Scala - Final Presentation
oetzi
1
99
Implementing Functional Reactive Programming in Scala - Project Proposal
oetzi
1
180
Other Decks in Programming
See All in Programming
AI Agent と正しく分析するための環境作り
yoshyum
1
140
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
350
Firefoxにコントリビューションして得られた学び
ken7253
2
160
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
150
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
2.9k
Building on Bluesky's AT Protocol with Ruby
mackuba
0
110
Structured Concurrency, Scoped Values and Joiners in the JDK 25 26 27
josepaumard
1
150
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
500
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
430
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
390
エラー処理の温故知新 / history of error handling technic
ryotanakaya
7
1.9k
ソースコード→AST→オペコード、の旅を覗いてみる
o0h
PRO
1
130
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
We Have a Design System, Now What?
morganepeng
55
8.1k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Thoughts on Productivity
jonyablonski
76
5.1k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
190
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
350
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Rails Girls Zürich Keynote
gr2m
96
14k
What's in a price? How to price your products and services
michaelherold
247
13k
Designing for Timeless Needs
cassininazir
0
220
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
280
Six Lessons from altMBA
skipperchong
29
4.2k
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!