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
A Brief Introduction to Elixir
Search
Iuri Fernandes
March 11, 2016
Technology
0
100
A Brief Introduction to Elixir
Lightning talk presented in DaWanda
Iuri Fernandes
March 11, 2016
Tweet
Share
More Decks by Iuri Fernandes
See All by Iuri Fernandes
Comredis
iurifq
1
97
Phoenix channels introduction
iurifq
0
120
Git - Dicas e boas práticas
iurifq
0
740
Vim
iurifq
1
150
Other Decks in Technology
See All in Technology
Autonomous Database - Dedicated 技術詳細 / adb-d_technical_detail_jp
oracle4engineer
PRO
5
11k
2025年の医用画像AI/AI×medical_imaging_in_2025_generated_by_AI
tdys13
0
190
[Data & AI Summit '25 Fall] AIでデータ活用を進化させる!Google Cloudで作るデータ活用の未来
kirimaru
0
4.1k
Microsoft Agent Frameworkの可観測性
tomokusaba
1
120
意外と知らない状態遷移テストの世界
nihonbuson
PRO
1
320
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
1
2.1k
SQLだけでマイグレーションしたい!
makki_d
0
1.2k
さくらのクラウド開発ふりかえり2025
kazeburo
2
1.2k
202512_AIoT.pdf
iotcomjpadmin
0
160
AWSに革命を起こすかもしれない新サービス・アップデートについてのお話
yama3133
0
520
ECS_EKS以外の選択肢_ROSA入門_.pdf
masakiokuda
1
110
AIBuildersDay_track_A_iidaxs
iidaxs
4
1.5k
Featured
See All Featured
A designer walks into a library…
pauljervisheath
210
24k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
350
A Tale of Four Properties
chriscoyier
162
23k
Why Our Code Smells
bkeepers
PRO
340
58k
Designing Powerful Visuals for Engaging Learning
tmiket
0
190
Technical Leadership for Architectural Decision Making
baasie
0
190
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
94
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.8k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.4k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
150
Transcript
Iuri Fernandes A Brief Introduction to Elixir
Elixir! • Runs on Erlang VM • Cool language •
But before…
The problem • Telecommunications • Fast • Fault tolerant •
Distributed
Erlang and Telecom • Designed for telecom problems • OTP(Open
Telecom Platform)
Slide from José Valim’s presentations
Slide from José Valim’s presentations
BEAM • Erlang VM • Processes are units of computation
• Message passing FTW
Image from “Learn you some Erlang for great good” licensed
under Creative Commons Messages
OTP • Framework • Concurrent and distributed applications • Models
behaviors for processes • And much more …
OTP Examples Image from “Learn you some Erlang for great
good” licensed under Creative Commons
Image from “Learn you some Erlang for great good” licensed
under Creative Commons OTP Examples
Image from “Learn you some Erlang for great good” licensed
under Creative Commons OTP Examples
Elixir • Created in 2012 by José Valim • Functional
(Immutability) • Dynamically typed • Metaprogramming • Fresh life to Erlang ecosystem • BEAM VM
Drops of Elixir defmodule MyModule do def increment(argument) do argument
+ 1 end end defmodule PatternMatching do def head([]), do: nil def head([head | _]), do: head end
Drops of Elixir defmodule MyModule do def increment(x) when is_integer(x)
do x + 1 end end defmodule PatternMatching do def head([]), do: nil def head([head | _]), do: head end
Drops of Elixir parent = self() # Spawns an Elixir
process (not an operating system one!) spawn_link(fn -> send parent, {:msg, "hello world"} end) # Block until the message is received receive do {:msg, contents} -> IO.puts contents end
Drops of Elixir defmodule Stack do use GenServer # Callbacks
def handle_call(:pop, _from, [h|t]) do {:reply, h, t} end def handle_cast({:push, item}, state) do {:noreply, [item|state]} end end
Drops of Elixir # Start the server {:ok, pid} =
GenServer.start_link(Stack, [:hello]) # This is the client GenServer.call(pid, :pop) #=> :hello GenServer.cast(pid, {:push, :world}) #=> :ok GenServer.call(pid, :pop) #=> :world
Applications • Chat web app with Phoenix • Embedded systems
with Nerves • Pusher app replacement with Poxa
https://github.com/doomspork/elixir-companies Who uses it
None
None
Questions?