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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Iuri Fernandes
March 11, 2016
Technology
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
A Brief Introduction to Elixir
Lightning talk presented in DaWanda
Iuri Fernandes
March 11, 2016
More Decks by Iuri Fernandes
See All by Iuri Fernandes
Comredis
iurifq
1
110
Phoenix channels introduction
iurifq
0
120
Git - Dicas e boas práticas
iurifq
0
760
Vim
iurifq
1
160
Other Decks in Technology
See All in Technology
失敗を資産に変えるClaude Code
shinyasaita
0
470
Android の公式 Skill / Android skills
yanzm
0
130
日本 Fintech 未来予測レポート 2027〜2028年(手動編集版)
8maki
0
1.9k
データサイエンスを価値につなげるプロジェクト設計 〜 DS一年目が現場で得た気づき 〜
ysd113
1
180
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
1.9k
自宅LLMの話
jacopen
1
290
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.9k
社内 AI エージェント Synapse と セマンティックレイヤーの育て方
hiroakis
2
1.7k
非定型業務をAI slackbotで自動化する ~ 社内要望を自動壁打ちするbotを作った ~/automating-ad-hoc-work-with-ai-slackbot
shibayu36
0
610
脆弱性対応、どこで線を引くか
rymiyamoto
0
370
現地で盛り上がった WWDC26 Keynote
zozotech
PRO
1
200
On-behalf-of Token exchange with AgentCore Identity
hironobuiga
2
150
Featured
See All Featured
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
250
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Context Engineering - Making Every Token Count
addyosmani
9
960
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
190
Measuring & Analyzing Core Web Vitals
bluesmoon
9
860
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
65
55k
Building Adaptive Systems
keathley
44
3k
Technical Leadership for Architectural Decision Making
baasie
3
400
My Coaching Mixtape
mlcsv
0
140
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
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?