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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
oetzi
February 21, 2012
Programming
240
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
100
Implementing Functional Reactive Programming in Scala - Project Proposal
oetzi
1
180
Other Decks in Programming
See All in Programming
AWS Transform Customによる Spring Boot 2.xから4.xへのVerUp
satoshi256kbyte
2
100
FastAPI の並行処理モデルを完全に理解する
hoto17296
8
2.9k
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
280
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
170
AIの中の人になってみる
htkym
0
120
仕様駆動開発の消費期限
watany
20
8.9k
Oxlintはいいぞ(続)
yug1224
1
430
Building a Meta Ray-Ban display app
akkeylab
0
180
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
280
書籍「プロフェッショナルAI駆動開発」紹介スライド
juntaromatsumoto
0
490
私のClaude Code活用法 (個人開発編) - PHPerKaigi mini #4(2026/08/24)
panda_program
1
160
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
720
Featured
See All Featured
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
440
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Unsuck your backbone
ammeep
672
58k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.9k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3k
Building an army of robots
kneath
306
46k
Chasing Engaging Ingredients in Design
codingconduct
0
280
Statistics for Hackers
jakevdp
799
230k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
560
Faster Mobile Websites
deanohume
310
32k
Deep Space Network (abreviated)
tonyrice
0
270
Producing Creativity
orderedlist
PRO
348
40k
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!