Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Implementing Functional Reactive Programming in...
Search
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
Workers Cache を知る
syumai
0
340
自サークルのIdPからログアウトできるようになるまで
taiseiue
0
110
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
160
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
450
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
140
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
270
Java 27新機能 / Java 27 new features
kishida
2
200
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.5k
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
4.9k
JRuby: Past, Present, and Future
headius
0
220
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
450
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
350
Featured
See All Featured
Building an army of robots
kneath
307
47k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
76k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
590
First, design no harm
axbom
PRO
2
1.3k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
GraphQLとの向き合い方2022年版
quramy
50
15k
A Modern Web Designer's Workflow
chriscoyier
699
190k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
540
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
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!