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
220
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
94
Implementing Functional Reactive Programming in Scala - Project Proposal
oetzi
1
180
Other Decks in Programming
See All in Programming
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
110
Go1.25からのGOMAXPROCS
kuro_kurorrr
1
810
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
230
既存デザインを変更せずにタップ領域を広げる方法
tahia910
1
240
High-Level Programming Languages in AI Era -Human Thought and Mind-
hayat01sh1da
PRO
0
560
Select API from Kotlin Coroutine
jmatsu
1
190
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
330
iOSアプリ開発で 関数型プログラミングを実現する The Composable Architectureの紹介
yimajo
2
220
たった 1 枚の PHP ファイルで実装する MCP サーバ / MCP Server with Vanilla PHP
okashoi
1
200
プロダクト志向なエンジニアがもう一歩先の価値を目指すために意識したこと
nealle
0
110
WebViewの現在地 - SwiftUI時代のWebKit - / The Current State Of WebView
marcy731
0
100
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
4
990
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
35
6.7k
How to Ace a Technical Interview
jacobian
277
23k
The Straight Up "How To Draw Better" Workshop
denniskardys
234
140k
Facilitating Awesome Meetings
lara
54
6.4k
Building an army of robots
kneath
306
45k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
4 Signs Your Business is Dying
shpigford
184
22k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Adopting Sorbet at Scale
ufuk
77
9.4k
Thoughts on Productivity
jonyablonski
69
4.7k
Visualization
eitanlees
146
16k
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!