Introduction to Erlang for Python Programmers
-
Upload
python-ireland -
Category
Technology
-
view
937 -
download
1
description
Transcript of Introduction to Erlang for Python Programmers
![Page 1: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/1.jpg)
An Introduction to Erlangfor Python programmers
Paul Barry – Institute of Technology, Carlow in Ireland
PyCon Ireland 2011 - October 2011
![Page 2: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/2.jpg)
2
Grab the slides:
http://paulbarry.itcarlow.ie/ErlangWebcast.pdf
![Page 3: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/3.jpg)
3
Disclaimer
![Page 4: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/4.jpg)
4
What exactly is Erlang?
![Page 5: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/5.jpg)
5
“Erlang is a declarative,dynamically-typed,functional, concurrent, distributed andfault-tolerant programming language
with garbage collection and codehot-swapping built into its runtime.”
Buzz-word city, dude!
![Page 6: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/6.jpg)
6
Scratching an itch inthe early '80s...
![Page 7: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/7.jpg)
7
Why learn Erlang?
![Page 8: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/8.jpg)
8
“Learn a new programminglanguage every year”
![Page 9: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/9.jpg)
9
“Buy at least one newprogramming book every year”
![Page 10: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/10.jpg)
10
So, really, why learn Erlang?
![Page 11: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/11.jpg)
11
A better programmer,you will be...
![Page 12: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/12.jpg)
12
Learn how others solve problems with adifferent language, then apply these new
techniques to your current language
![Page 13: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/13.jpg)
13
Learn what each language is good at,then pick the right tool for the job
![Page 14: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/14.jpg)
14
Works with a really big hammer!
![Page 15: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/15.jpg)
15
What is Erlang good at?
![Page 16: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/16.jpg)
16
What Erlang Wasn't Designed To Do
![Page 17: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/17.jpg)
17
Erlang wasn't designed to...
Run in a browser Process text efficiently Be easy to teach Be easy to learn Build dynamic websites Run on mobile phones Allow non-programmers to program Build GUIs
![Page 18: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/18.jpg)
18
Erlang was designed to buildsoftware systems that never stop
![Page 19: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/19.jpg)
19
What exactly do youmean by “never”?
![Page 20: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/20.jpg)
20http://www.infoq.com/presentations/Systems-that-Never-Stop-Joe-Armstrong
“Never” at Ericsson means “no morethan 4 minutes downtime per year”...
![Page 21: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/21.jpg)
21
Wow! That's 5 ninesavailability!*
* 99.999% uptime
![Page 22: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/22.jpg)
22
Let's build softwarethat's 100% defect free!
![Page 23: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/23.jpg)
23
Let's throw lots and lotsof code at the problem and
it'll go away, eh?
![Page 24: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/24.jpg)
24
There has to be a better way
![Page 25: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/25.jpg)
25
Erlang programmers concentrate oncoding for the correct case
and crashing on failure
Let it crash!
![Page 26: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/26.jpg)
26
Robustness is achieved by havingprogrammers concentrate on processes and the
interactions (or messages) between them
![Page 27: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/27.jpg)
27
Early error detection/recovery and the useof concurrent programming techniqueslets you build fault tolerant systems
![Page 28: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/28.jpg)
28
COP: Concurrency-Oriented Programming
![Page 29: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/29.jpg)
29
The problem is...
![Page 30: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/30.jpg)
30
Erlang is a little weird
The problem is...
![Page 31: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/31.jpg)
31
Consider this code...
-module(hello_server).
-export([hello/0]).
hello() ->
receive
{FromPID, Who} ->
case Who of
robert -> FromPID ! "Hello Robert.";
mike -> FromPID ! "Hello Mike.";
joe -> FromPID ! "Hello Joe.";
_ -> FromPID ! "I don't know you."
end,
hello()
end.
![Page 32: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/32.jpg)
32
Strange punctuation symbols . ; ,
-module(hello_server).
-export([hello/0]).
hello() ->
receive
{FromPID, Who} ->
case Who of
robert -> FromPID ! "Hello Robert.";
mike -> FromPID ! "Hello Mike.";
joe -> FromPID ! "Hello Joe.";
_ -> FromPID ! "I don't know you."
end,
hello()
end.
![Page 33: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/33.jpg)
33
Lots of arrows -> in lots of places
-module(hello_server).
-export([hello/0]).
hello() ->
receive
{FromPID, Who} ->
case Who of
robert -> FromPID ! "Hello Robert.";
mike -> FromPID ! "Hello Mike.";
joe -> FromPID ! "Hello Joe.";
_ -> FromPID ! "I don't know you."
end,
hello()
end.
![Page 34: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/34.jpg)
34
Even stranger symbols - _ !
-module(hello_server).
-export([hello/0]).
hello() ->
receive
{FromPID, Who} ->
case Who of
robert -> FromPID ! "Hello Robert.";
mike -> FromPID ! "Hello Mike.";
joe -> FromPID ! "Hello Joe.";
_ -> FromPID ! "I don't know you."
end,
hello()
end.
![Page 35: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/35.jpg)
35
What's the deal with [] {} and () ?
-module(hello_server).
-export([hello/0]).
hello() ->
receive
{FromPID, Who} ->
case Who of
robert -> FromPID ! "Hello Robert.";
mike -> FromPID ! "Hello Mike.";
joe -> FromPID ! "Hello Joe.";
_ -> FromPID ! "I don't know you."
end,
hello()
end.
![Page 36: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/36.jpg)
36
Functions that call themselves
-module(hello_server).
-export([hello/0]).
hello() ->
receive
{FromPID, Who} ->
case Who of
robert -> FromPID ! "Hello Robert.";
mike -> FromPID ! "Hello Mike.";
joe -> FromPID ! "Hello Joe.";
_ -> FromPID ! "I don't know you."
end,
hello()
end.
![Page 37: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/37.jpg)
37
This is weird...
and there's even more
![Page 38: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/38.jpg)
38
Erlang Culture Shock
![Page 39: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/39.jpg)
39
Shock #1
Erlang's syntax is based on Prolog
-module(howdy).-export([hi/1]).
hi(Name) ->io:format('Hi there, ~p!~n', [Name]).
{person, First, Last} = {person, 'Paul', 'Barry'}.
howdy:hi(Last).
![Page 40: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/40.jpg)
40
Shock #2
Erlang is not object-oriented
![Page 41: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/41.jpg)
41
Shock #3
Everything in Erlang is immutable
Not just tuples and not just strings...
EVERYTHING
![Page 42: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/42.jpg)
42
So... this doesn't work!
X = 10.X = X + 1.
** exception error: no match of right hand side value 11
Y = X + 1.
![Page 43: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/43.jpg)
43
Erlang's troublesome = operator
The “=” operator does not mean “assign”
It means “match” or “bind to”
![Page 44: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/44.jpg)
44
Destructive updates are forbidden
and (as an added twist)
Variables must start with an Uppercase letter:
XPidFunc
No side effects here!
![Page 45: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/45.jpg)
45
Shock #4
There are no built-in looping constructs
No for and no while
![Page 46: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/46.jpg)
46
So... how do you loop?
![Page 47: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/47.jpg)
47
List Comprehensions
Erlang:Alist = [1, 2, 3, 4, 5].Doubled = [X*2 || X <- Alist].
Python:alist = [1, 2, 3, 4, 5]doubled = [x*2 for x in alist]
Note: alist and doubled are mutable; Alist and Doubled are not
![Page 48: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/48.jpg)
48
Shock #5
“Regular” looping is via recursion
![Page 49: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/49.jpg)
49
Spot the loop?
-module(hello_server).
-export([hello/0]).
hello() ->
receive
{FromPID, Who} ->
case Who of
robert -> FromPID ! "Hello Robert.";
mike -> FromPID ! "Hello Mike.";
joe -> FromPID ! "Hello Joe.";
_ -> FromPID ! "I don't know you."
end,
hello()
end.
![Page 50: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/50.jpg)
50
Shock #6
Strings are stored as alist of integers
![Page 51: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/51.jpg)
51
Sweet mother of allthings Erlang! Whose bright
idea was that?
![Page 52: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/52.jpg)
52
Shock #7
There is no
if... then... else...
statement
![Page 53: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/53.jpg)
53
There are if and case expressionsbut... they're kinda weird
![Page 54: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/54.jpg)
54
![Page 55: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/55.jpg)
55
With enough pig-headed persistence,weirdness can be overcome
![Page 56: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/56.jpg)
56
So... who do I call tohelp me learn Erlang?
![Page 57: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/57.jpg)
57
![Page 58: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/58.jpg)
58
![Page 59: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/59.jpg)
59
Erlang is a language you studyas getting up-to-speed with
Erlang takes time
![Page 60: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/60.jpg)
60
Web Resources
http://www.erlang.org Try Erlang:
http://www.tryerlang.org/ “Learn Some Erlang For Great Good!”:
http://learnyousomeerlang.com/ The Erlang Factory:
http://erlang-factory.com/ InfoQ:
http://www.infoq.com
![Page 61: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/61.jpg)
61
Some Unique “Characteristics”
![Page 62: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/62.jpg)
62
Banned by Ericsson in 1998 for “not being open enough”
![Page 63: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/63.jpg)
63http://video.google.com/videoplay?docid=-5830318882717959520
![Page 64: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/64.jpg)
64
![Page 65: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/65.jpg)
65
This is all great, but...how exactly do I use
Erlang to build afault-tolerant system?
![Page 66: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/66.jpg)
66
Learn Three Things
Create an Erlang process with spawn()
Send a message to a process with !
Process a message with receive
![Page 67: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/67.jpg)
67
Remember this code?%% Saved in 'hello_server.erl'.
-module(hello_server).
-export([hello/0]).
hello() ->
receive
{FromPID, Who} ->
case Who of
robert -> FromPID ! "Hello Robert.";
mike -> FromPID ! "Hello Mike.";
joe -> FromPID ! "Hello Joe.";
_ -> FromPID ! "I don't know you."
end,
hello()
end.
![Page 68: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/68.jpg)
68
Create the hello() process
Pid = spawn(fun hello_server:hello/0).
<0.38.0>
![Page 69: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/69.jpg)
69
Send a message to a process with !
Pid ! robert.
robert
![Page 70: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/70.jpg)
70
A little twist
Pid ! {self(), robert}.
{<0.31.0>,robert}
![Page 71: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/71.jpg)
71
Messages sent to a process with !are received by receive
![Page 72: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/72.jpg)
72
Can you spot the pattern match?%% Saved in 'hello_server.erl'.
-module(hello_server).
-export([hello/0]).
hello() ->
receive
{FromPID, Who} ->
case Who of
robert -> FromPID ! "Hello Robert.";
mike -> FromPID ! "Hello Mike.";
joe -> FromPID ! "Hello Joe.";
_ -> FromPID ! "I don't know you."
end,
hello()
end.
![Page 73: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/73.jpg)
73
The {FromPID, Who} tuple matches%% Saved in 'hello_server.erl'.
-module(hello_server).
-export([hello/0]).
hello() ->
receive
{FromPID, Who} ->
case Who of
robert -> FromPID ! "Hello Robert.";
mike -> FromPID ! "Hello Mike.";
joe -> FromPID ! "Hello Joe.";
_ -> FromPID ! "I don't know you."
end,
hello()
end.
![Page 74: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/74.jpg)
74
Send a message back...%% Saved in 'hello_server.erl'.
-module(hello_server).
-export([hello/0]).
hello() ->
receive
{FromPID, Who} ->
case Who of
robert -> FromPID ! "Hello Robert.";
mike -> FromPID ! "Hello Mike.";
joe -> FromPID ! "Hello Joe.";
_ -> FromPID ! "I don't know you."
end,
hello()
end.
![Page 75: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/75.jpg)
75
spawn, send (!) then receive
Pid = spawn(fun hello_server:hello/0),Pid ! {self(), robert},receive
Response ->Response
end.
"Hello Robert."
![Page 76: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/76.jpg)
76
Things get really interestingwhen the processes are
linked together with spawn_link()and the trap_exit signal
![Page 77: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/77.jpg)
77
Processes that are linked together can react appropriately to EXIT messages from
each other... and what happens next iscontrolled by the programmer
![Page 78: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/78.jpg)
78
Distributed Erlang
pbmac.itcarlow.ie
I need to spawnhello/0
on glasnost...
glasnost.itcarlow.ie
hello/0 isregistered
as 'hr'
![Page 79: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/79.jpg)
79
Pid = spawn(fun hello_server:hello/0),
becomes
Pid = spawn(‘[email protected]’, hello_server, hello, []),
![Page 80: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/80.jpg)
80
Over time, you'll end up repeatinga lot of your process management code...
![Page 81: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/81.jpg)
81
![Page 82: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/82.jpg)
82
OTP is the jewel in Erlang's crown
![Page 83: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/83.jpg)
83
So... if Erlang's socool, how come no one
is using it?
![Page 84: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/84.jpg)
84
The TIOBE Index
![Page 85: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/85.jpg)
85
![Page 86: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/86.jpg)
86
Erlang in Telecoms
![Page 87: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/87.jpg)
87
Erlang in Data
![Page 88: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/88.jpg)
88
Erlang on the Web
![Page 89: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/89.jpg)
89
Erlang in Gaming
“…Mochi Media is the world's largest browser-based games network, with more than 140 million monthly active users and 15,000 games on nearly 40,000 publisher websites…”
Check out Bob Ippolito’s Erlang-Factory talks!
![Page 90: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/90.jpg)
90
More Erlang in Gaming
Thanks to Malcolm Dowse (of DemonWare, Dublin) for permission to use these images, which were first delivered as part of Malcolm's talk to Erlang Factory London 2011.
![Page 91: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/91.jpg)
91
So... is Erlangworth learning?So... is Erlang
worth learning?
![Page 92: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/92.jpg)
92
Yes
![Page 93: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/93.jpg)
93
Lots more to discover...
Fun with fun Bit-strings and bit syntax
ETS and DETS “Live” code updating
The Mnesia Distributed Database The Standard Library
CEAN
![Page 94: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/94.jpg)
94
Friendly Community
erlang-questions mailing list
![Page 95: Introduction to Erlang for Python Programmers](https://reader034.fdocuments.us/reader034/viewer/2022052218/555a2f0ed8b42a900d8b4e98/html5/thumbnails/95.jpg)
95
Questions?