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
Docker and Python
trallard
40
3.1k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Into the Great Unknown - MozCon
thekraken
32
1.5k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
KATA
mclloyd
29
14k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
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