the time is out of joint: o cursed spite, / that ever i was born to set it right!

22
The time is out of joint: O cursed spite, That ever I was born to set it right! Simon.Belak@hekovnik.si @sbelak WebCamp Ljubljana, 26. 4. 2014

Upload: simon-belak

Post on 23-Jan-2015

353 views

Category:

Technology


4 download

DESCRIPTION

Managing state and time is hard, but that is more due to the mess in our heads than difficulty inherent in the problem. In this talk I will explore functional programming, and its offshoot functional reactive programing, from the perspective of how it handles (and help us think about) values, identity and time. May contain traces of Clojure and React.

TRANSCRIPT

Page 1: The time is out of joint: O cursed spite, / That ever I was born to set it right!

!

The time is out of joint: O cursed spite, That ever I was born to set it right!

[email protected] @sbelak

WebCamp Ljubljana, 26. 4. 2014

Page 2: The time is out of joint: O cursed spite, / That ever I was born to set it right!

The future is a function of the past,

it doesn’t change it

Page 3: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Things don’t change in place*

* time is just a dimension

Page 4: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Concurrency =

multiple intersecting timelines

Page 5: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Action is sequential, perception is parallel

Page 6: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Value!an immutable quantity or composition thereof

Time!relative ordering of casual values

State!value of an identity at a point in time

Identity!entity we associate with a series of states over time

Page 7: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Functional programming

Page 8: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Persistent data structures

Page 9: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Action is sequential, perception is parallel

Page 10: The time is out of joint: O cursed spite, / That ever I was born to set it right!

map/reduce

Page 11: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Concurrency models

sharedisolated

asynchronous

synchronous

coordinated

autonomous

Page 12: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Concurrency models

sharedisolated

asynchronous

synchronous

coordinated

autonomous

Page 13: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Concurrency models

sharedisolated

asynchronous

synchronous

coordinated

autonomous

Page 14: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Concurrency models

sharedisolated

asynchronous

synchronous

coordinated

autonomous

Page 15: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Propagating change

Page 16: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Reactive programming

Inversion of control

Page 17: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Functional Reactive

programming

Page 18: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Action is sequential, perception is parallel

Page 19: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Code = data

Page 20: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Call graph + log

Page 21: The time is out of joint: O cursed spite, / That ever I was born to set it right!
Page 22: The time is out of joint: O cursed spite, / That ever I was born to set it right!

Questions