Hello, Joe. Hello, Mike;
Hello, Robert.1
A Hello World Style Lighting Talk on Erlang.
1. From Erlang the Movie (https://archive.org/details/ErlangTheMovie)
Hello, Erlang.
Erlang and OTP was designed for building
distributed, asynchronous, highly-concurrent, fault
tolerant applications with high availability.
Hello, Erlang.
Erlang and OTP was designed for building
distributed, asynchronous, highly-concurrent, fault
tolerant applications with high availability.
#BuzzwordBingo
Hello, Telecom.
Hello, Telecom.
• 100s of Thousands, if not Millions, of calls
happen at the same time
Hello, Telecom.
• 100s of Thousands, if not Millions, of calls
happen at the same time
• Your phone line has to always be available
Hello, Telecom.
• 100s of Thousands, if not Millions, of calls
happen at the same time
• Your phone line has to always be available
• My call cannot corrupt your call
Hello, Déjà vu
Hello, Déjà vu
• Sound Familiar?
Hello, Internet!
Hello, Failure.
Hello, Failure.
• In the Real World things fail. Embrace it.
Hello, Failure.
• In the Real World things fail. Embrace it.
• “Let It Crash” philosophy
Hello, Failure.
• In the Real World things fail. Embrace it.
• “Let It Crash” philosophy
• Immutability
Hello, Failure.
• In the Real World things fail. Embrace it.
• “Let It Crash” philosophy
• Immutability
• No Shared State
Hello, Failure.
• In the Real World things fail. Embrace it.
• “Let It Crash” philosophy
• Immutability
• No Shared State
• Isolated Processes Communicate Through Message Passing
(Actor Model)
Hello, Failure.
• In the Real World things fail. Embrace it.
• “Let It Crash” philosophy
• Immutability
• No Shared State
• Isolated Processes Communicate Through Message Passing
(Actor Model)
• Supervision Hierarchy
Hello, Failure.
• In the Real World things fail. Embrace it.
• “Let It Crash” philosophy
• Immutability
• No Shared State
• Isolated Processes Communicate Through Message Passing
(Actor Model)
• Supervision Hierarchy
• Live code reloading
Hello, C10k Problem.
Hello, C10k Problem.
Hello, C10k Problem.
–Alan Kay
I thought of objects being like biological cells
and/or individual
 computers on a network, only able to
communicate with messages […].2
Hello, OOP.
2. http://userpage.fu-berlin.de/~ram/pub/pub_jf47ht81Ht/doc_kay_oop_en
Hello, “Weaknesses”.
Hello, “Weaknesses”.
• No strings as a data type
Hello, “Weaknesses”.
• No strings as a data type
• List of Integers or Binary types
Hello, “Weaknesses”.
• No strings as a data type
• List of Integers or Binary types
• Not super performant for string manipulation, but good enough for most
scenarios
Hello, “Weaknesses”.
• No strings as a data type
• List of Integers or Binary types
• Not super performant for string manipulation, but good enough for most
scenarios
• Not great for GUIs
Hello, “Weaknesses”.
• No strings as a data type
• List of Integers or Binary types
• Not super performant for string manipulation, but good enough for most
scenarios
• Not great for GUIs
• Not going to be run on your mobile device;
Hello, “Weaknesses”.
• No strings as a data type
• List of Integers or Binary types
• Not super performant for string manipulation, but good enough for most
scenarios
• Not great for GUIs
• Not going to be run on your mobile device;
• but great for you mobile device backend.
Hello, “Weaknesses”.
• No strings as a data type
• List of Integers or Binary types
• Not super performant for string manipulation, but good enough for most
scenarios
• Not great for GUIs
• Not going to be run on your mobile device;
• but great for you mobile device backend.
• WhatsApp anyone?
Hello, “Weaknesses”.
• No strings as a data type
• List of Integers or Binary types
• Not super performant for string manipulation, but good enough for most
scenarios
• Not great for GUIs
• Not going to be run on your mobile device;
• but great for you mobile device backend.
• WhatsApp anyone?
• Not insanely fast
Hello, “Weaknesses”.
• No strings as a data type
• List of Integers or Binary types
• Not super performant for string manipulation, but good enough for most
scenarios
• Not great for GUIs
• Not going to be run on your mobile device;
• but great for you mobile device backend.
• WhatsApp anyone?
• Not insanely fast
• "There's no such thing as fast, only fast enough" ~ Joe Armstrong
Hello, FizzBuzz.
Hello, fizzbuzz.erl
-module(fizzbuzz).
-export([fizzbuzz/1]).
fizzbuzz(N) ->
Translations = lists:map(fun translate/1, lists:seq(1, N)),
lists:foreach(fun(Item) -> io:format("~s~n", [Item]) end, Translations).
translate(N) when N rem 3 =:= 0 andalso N rem 5 =:= 0 ->
'FizzBuzz';
translate(N) when N rem 3 =:= 0 ->
'Fizz';
translate(N) when N rem 5 =:= 0 ->
'Buzz';
translate(N) ->
integer_to_list(N).
Hello, fizzbuzz.ex
defmodule FizzBuzz do
def fizzbuzz(n) do
1..n
|> Enum.map(&translate/1)
|> Enum.join("n")
|> IO.puts
end
def translate(n) when rem(n, 3) == 0 and rem(n, 5) == 0, do: :FizzBuzz
def translate(n) when rem(n, 3) == 0, do: :Fizz
def translate(n) when rem(n, 5) == 0, do: :Buzz
def translate(n), do: n
end
Hello, fizzbuzz.lfe
(defmodule fizzbuzz
(export (fizzbuzz 1)))
(defun fizzbuzz (n)
(lists:foreach
(lambda (term) (lfe_io:format "~p~n" `(,term)))
(translate-upto n)))
(defun translate-upto (n)
(let ((numbers (lists:seq 1 n)))
(lists:map
(lambda (n) (translate n (rem n 3) (rem n 5)))
numbers)))
(defun translate
([_ 0 0] 'FizzBuzz)
([_ 0 _] 'Fizz)
([_ _ 0] 'Buzz)
([n _ _] n))
Hello, Demo.
Hello, Proctor.
• http://www.proctor-it.com
• @stevenproctor
• steven.proctor@gmail.com
• @fngeekery
• http://www.functionalgeekery.com
• @dfwerlang
• http://www.meetup.com/DFW-Erlang-User-Group/
• @planeterlang
• http://www.planeterlang.com

Hello, Joe. Hello, Mike; Hello, Robert.

  • 1.
    Hello, Joe. Hello,Mike; Hello, Robert.1 A Hello World Style Lighting Talk on Erlang. 1. From Erlang the Movie (https://archive.org/details/ErlangTheMovie)
  • 2.
    Hello, Erlang. Erlang andOTP was designed for building distributed, asynchronous, highly-concurrent, fault tolerant applications with high availability.
  • 3.
    Hello, Erlang. Erlang andOTP was designed for building distributed, asynchronous, highly-concurrent, fault tolerant applications with high availability. #BuzzwordBingo
  • 4.
  • 5.
    Hello, Telecom. • 100sof Thousands, if not Millions, of calls happen at the same time
  • 6.
    Hello, Telecom. • 100sof Thousands, if not Millions, of calls happen at the same time • Your phone line has to always be available
  • 7.
    Hello, Telecom. • 100sof Thousands, if not Millions, of calls happen at the same time • Your phone line has to always be available • My call cannot corrupt your call
  • 8.
  • 9.
    Hello, Déjà vu •Sound Familiar?
  • 10.
  • 11.
  • 12.
    Hello, Failure. • Inthe Real World things fail. Embrace it.
  • 13.
    Hello, Failure. • Inthe Real World things fail. Embrace it. • “Let It Crash” philosophy
  • 14.
    Hello, Failure. • Inthe Real World things fail. Embrace it. • “Let It Crash” philosophy • Immutability
  • 15.
    Hello, Failure. • Inthe Real World things fail. Embrace it. • “Let It Crash” philosophy • Immutability • No Shared State
  • 16.
    Hello, Failure. • Inthe Real World things fail. Embrace it. • “Let It Crash” philosophy • Immutability • No Shared State • Isolated Processes Communicate Through Message Passing (Actor Model)
  • 17.
    Hello, Failure. • Inthe Real World things fail. Embrace it. • “Let It Crash” philosophy • Immutability • No Shared State • Isolated Processes Communicate Through Message Passing (Actor Model) • Supervision Hierarchy
  • 18.
    Hello, Failure. • Inthe Real World things fail. Embrace it. • “Let It Crash” philosophy • Immutability • No Shared State • Isolated Processes Communicate Through Message Passing (Actor Model) • Supervision Hierarchy • Live code reloading
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
    Hello, “Weaknesses”. • Nostrings as a data type
  • 25.
    Hello, “Weaknesses”. • Nostrings as a data type • List of Integers or Binary types
  • 26.
    Hello, “Weaknesses”. • Nostrings as a data type • List of Integers or Binary types • Not super performant for string manipulation, but good enough for most scenarios
  • 27.
    Hello, “Weaknesses”. • Nostrings as a data type • List of Integers or Binary types • Not super performant for string manipulation, but good enough for most scenarios • Not great for GUIs
  • 28.
    Hello, “Weaknesses”. • Nostrings as a data type • List of Integers or Binary types • Not super performant for string manipulation, but good enough for most scenarios • Not great for GUIs • Not going to be run on your mobile device;
  • 29.
    Hello, “Weaknesses”. • Nostrings as a data type • List of Integers or Binary types • Not super performant for string manipulation, but good enough for most scenarios • Not great for GUIs • Not going to be run on your mobile device; • but great for you mobile device backend.
  • 30.
    Hello, “Weaknesses”. • Nostrings as a data type • List of Integers or Binary types • Not super performant for string manipulation, but good enough for most scenarios • Not great for GUIs • Not going to be run on your mobile device; • but great for you mobile device backend. • WhatsApp anyone?
  • 31.
    Hello, “Weaknesses”. • Nostrings as a data type • List of Integers or Binary types • Not super performant for string manipulation, but good enough for most scenarios • Not great for GUIs • Not going to be run on your mobile device; • but great for you mobile device backend. • WhatsApp anyone? • Not insanely fast
  • 32.
    Hello, “Weaknesses”. • Nostrings as a data type • List of Integers or Binary types • Not super performant for string manipulation, but good enough for most scenarios • Not great for GUIs • Not going to be run on your mobile device; • but great for you mobile device backend. • WhatsApp anyone? • Not insanely fast • "There's no such thing as fast, only fast enough" ~ Joe Armstrong
  • 33.
  • 34.
    Hello, fizzbuzz.erl -module(fizzbuzz). -export([fizzbuzz/1]). fizzbuzz(N) -> Translations= lists:map(fun translate/1, lists:seq(1, N)), lists:foreach(fun(Item) -> io:format("~s~n", [Item]) end, Translations). translate(N) when N rem 3 =:= 0 andalso N rem 5 =:= 0 -> 'FizzBuzz'; translate(N) when N rem 3 =:= 0 -> 'Fizz'; translate(N) when N rem 5 =:= 0 -> 'Buzz'; translate(N) -> integer_to_list(N).
  • 35.
    Hello, fizzbuzz.ex defmodule FizzBuzzdo def fizzbuzz(n) do 1..n |> Enum.map(&translate/1) |> Enum.join("n") |> IO.puts end def translate(n) when rem(n, 3) == 0 and rem(n, 5) == 0, do: :FizzBuzz def translate(n) when rem(n, 3) == 0, do: :Fizz def translate(n) when rem(n, 5) == 0, do: :Buzz def translate(n), do: n end
  • 36.
    Hello, fizzbuzz.lfe (defmodule fizzbuzz (export(fizzbuzz 1))) (defun fizzbuzz (n) (lists:foreach (lambda (term) (lfe_io:format "~p~n" `(,term))) (translate-upto n))) (defun translate-upto (n) (let ((numbers (lists:seq 1 n))) (lists:map (lambda (n) (translate n (rem n 3) (rem n 5))) numbers))) (defun translate ([_ 0 0] 'FizzBuzz) ([_ 0 _] 'Fizz) ([_ _ 0] 'Buzz) ([n _ _] n))
  • 37.
  • 38.
    Hello, Proctor. • http://www.proctor-it.com •@stevenproctor • steven.proctor@gmail.com • @fngeekery • http://www.functionalgeekery.com • @dfwerlang • http://www.meetup.com/DFW-Erlang-User-Group/ • @planeterlang • http://www.planeterlang.com