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
98
Implementing Functional Reactive Programming in Scala - Project Proposal
oetzi
1
180
Other Decks in Programming
See All in Programming
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
300
我々はなぜ「層」を分けるのか〜「関心の分離」と「抽象化」で手に入れる変更に強いシンプルな設計〜 #phperkaigi / PHPerKaigi 2026
shogogg
2
810
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
200
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
160
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
440
感情を設計する
ichimichi
5
1.1k
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
250
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
220
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
240
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
2
150
アーキテクチャモダナイゼーションとは何か
nwiizo
15
3.9k
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
180
Featured
See All Featured
The Limits of Empathy - UXLibs8
cassininazir
1
290
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Done Done
chrislema
186
16k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Being A Developer After 40
akosma
91
590k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
200
Claude Code のすすめ
schroneko
67
220k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
410
The Curious Case for Waylosing
cassininazir
0
290
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
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!