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.6k
HanoiDB - and Other Riak Hacks
krestenkrab
10
2.2k
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
21
2.5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
100
18k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
410
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
Rails Girls Zürich Keynote
gr2m
94
13k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
GitHub's CSS Performance
jonrohan
1030
460k
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