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
Docコメントで始める簡単ガードレール
keisukeikeda
1
110
Ruby x Terminal
a_matsuda
7
590
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
170
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1k
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
130
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
130
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
200
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
500
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
230
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
830
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
710
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
490
Featured
See All Featured
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
350
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Google's AI Overviews - The New Search
badams
0
930
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
240
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
670
The Pragmatic Product Professional
lauravandoore
37
7.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
The SEO Collaboration Effect
kristinabergwall1
0
390
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Exploring anti-patterns in Rails
aemeredith
2
290
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!