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
The Language of Interfaces
destraynor
154
24k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
The Invisible Side of Design
smashingmag
298
50k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
For a Future-Friendly Web
brad_frost
175
9.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Faster Mobile Websites
deanohume
305
30k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
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