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
Adopting Functional
Search
Kresten Krab Thorup
September 15, 2012
2
200
Adopting Functional
Keynote for the CUFP conference 2012 in Copenhagen by Kresten Krab Thorup.
Kresten Krab Thorup
September 15, 2012
Tweet
Share
More Decks by Kresten Krab Thorup
See All by Kresten Krab Thorup
Erjang - inside Erlang on the JVM
krestenkrab
3
1.5k
HanoiDB - and Other Riak Hacks
krestenkrab
10
2.2k
Featured
See All Featured
Navigating Team Friction
lara
183
15k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
GitHub's CSS Performance
jonrohan
1030
460k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.7k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
The Cost Of JavaScript in 2023
addyosmani
46
7.2k
Scaling GitHub
holman
459
140k
Practical Orchestrator
shlominoach
186
10k
BBQ
matthewcrist
85
9.4k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Building Your Own Lightsaber
phodgson
104
6.2k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Transcript
Adopting Functional Kresten Krab Thorup CTO, Trifork @drkrab
An “Object Head” in Erlang Land Kresten Krab Thorup CTO,
Trifork @drkrab
identity properties mutable state specialize/ generalize whole/part
None
None
Java gets boring after a while...
Anthropology Class
Group Dynamics The discouraging truth about
Constant Innovation
The 10% rule
Teach It! To really learn something:
Why did objects succeed?
Ole-Johan Dahl & Kristen Nygaard
“...each Smalltalk object is a recursion on the entire possibilities
of the computer. Thus its semantics are a bit like having thousands and thousands of computers all hooked together by a very fast network.” Alan Kay, HOPL 1993
Objects are interpreters
(“booh!”, ...) -> object -> (result, ...)
object.method(args, ...) vs. method(object, args, ...)
set.size() vs. size(set)
set.intersect(anotherSet) set.includes?(element) vs. intersect(set, anotherSet) includes?(set, element)
Conceptual modeling
Thinking Tools
Connect the solution to the problem
T ☠ THREADS & LOCKS AHEAD SINCE JAVA 1996
$! $ % * method method method method data
*# (%# * ()* % * &(%(# ) +(
""+)*(*) $! $ % * method method method method data /%+4, ,( *!" $/ !$ % +"* &(%(##$ &(%"# *4) (%+&) % +$*%$) ** -%(! %$ &(*+"( !$ % *1#&"* 2% *%($* &(%(##$ #!) *) +$*%$ (%+&) .&"* (%+& (*( *$ *) %#&%$$*) %$"/ -/ *% $ % *4) * * / %#$$ %* )** $ ,%( $ )$" +$* $ % * %# (""/ ) (*( *$ * )+# % *) &(*) $ % * ) !$ % )")+ %,( )& +$*%$" ( * $ &"/ +""" #%+"( (%" !& *%($* *(#$%"%/ ,() (%# "$+ *% " $)* % % *%($* &(%(##$ ) *% %#$ )** *1$ "," +$* $ # $ *% , * "$+ )+&&% $ * )*(+*+( ** )(,) *%) +$*%$) +$*%$) ( ") % *) * )*(+*+( ( *) "# %!" #*%) *# (%# * ()* % * &(%(# ) +( ""+)*(*) $! $ % * method method method method data /%+4, ,( *!" $/ !$ % +"* &(%(##$ &(%"# (%+&) % +$*%$) ** -%(! %$ &(*+"( !$ % *1#&" *%($* &(%(##$ #!) *) +$*%$ (%+&) .&" *1$ "," +$* $ # $ * )*(+*+( ** )(,) *% ") % *) * )*(+*+( ( *) " *# (%# * ()* % * &(% $! $ % * method method method method data /%+4, ,( *!" $/ !$ % (%+&) % +$*%$) ** -%(! %$ & *%($* &(%(##$ #! (%+& (*( *$ *) %#&%$$*) / %#$$ %* )** $ , (""/ ) (*( *$ * )+# % *) & %,( )& +$*%$" ( * $
Function + Data State Containment Process + Message
Function + Data State Containment Process + Message
Software as Infrastructure
Enter: Erlang
Not a functional concurrent programming language Erlang is...
System for Reliable Computing Erlang is...
FP Language “OS for code” Erlang is...
Your favorite OS BEAM Emulator Your Erlang Program OTP Framework
BEAM BIFs
Java Virtual Machine Your favorite OS ERJANG Your Erlang Program
OTP Framework BEAM JVM BIFs
“...each Smalltalk object is a recursion on the entire possibilities
of the computer. Thus its semantics are a bit like having thousands and thousands of computers all hooked together by a very fast network.”
“...each Erlang process is a recursion on the entire possibilities
of the computer. Thus its semantics are a bit like having thousands and thousands of computers all hooked together by a very fast network.”
Except in Erlang, each “computer” is programmed with FP
Interactive Coordination Messaging + processes Want to understand! Concurrency Parallelism
Functional Computation Utilize hardware Want to NOT understand
None
None
Post-Mainstream
“The Right Tool for the Job” Post-Mainstream Tech Mesh Conference
London, December 2012
Interactive Systems
Thanks @drkrab