Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
A Brief Introduction to Elixir
Search
Iuri Fernandes
March 11, 2016
Technology
120
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
120
Phoenix channels introduction
iurifq
0
130
Git - Dicas e boas práticas
iurifq
0
760
Vim
iurifq
1
160
Other Decks in Technology
See All in Technology
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
1
740
自分で立ててみるLLMサービス
y_sera15
0
150
初対面のメンバーがチームを組み、Claude Codeでゼロからサービスをリリース
mkdev10
1
120
AI駆動開発、viviONの1年 ── うまくいったこと・いかなかったこと
vivion
0
280
全人類(ほぼ)AWS Organizations の上でAWSを利用している、その世界を知る話
htan
1
130
スキルを作る、その前に!複数人で使われるスキルを 作るためのプロセス
junkifurukawa
2
370
自主式軟體工廠
philipz
0
250
使いこなすために知っておきたい Azure SRE Agent アンチパターン
torumakabe
2
440
SREでアラート疲れを 解決しよう!
kairim0
1
220
カンファレンスに参加した後の浮遊感とセルフケア
pauli
0
320
ハードウェアコンペでもAI駆動開発が進んでいる話
iotengineer22
1
660
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
4
1.2k
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
3.2k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
480
A Soul's Torment
seathinner
8
3.7k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
560
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Chasing Engaging Ingredients in Design
codingconduct
0
350
The Mindset for Success: Future Career Progression
greggifford
PRO
0
530
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
42k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
790
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?