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
How GitHub (no longer) Works
holman
311
140k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
1.9k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
The Cult of Friendly URLs
andyhume
78
6k
Designing for Performance
lara
604
68k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
KATA
mclloyd
29
13k
Making the Leap to Tech Lead
cromwellryan
132
8.9k
Fontdeck: Realign not Redesign
paulrobertlloyd
81
5.2k
Teambox: Starting and Learning
jrom
132
8.7k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
4 Signs Your Business is Dying
shpigford
180
21k
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