Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
95
Phoenix channels introduction
iurifq
0
110
Git - Dicas e boas práticas
iurifq
0
740
Vim
iurifq
1
140
Other Decks in Technology
See All in Technology
5分で知るMicrosoft Ignite
taiponrock
PRO
0
340
非CUDAの悲哀 〜Claude Code と挑んだ image to 3D “Hunyuan3D”を EVO-X2(Ryzen AI Max+395)で動作させるチャレンジ〜
hawkymisc
1
170
Rubyで楽して タスクを書きたい!
ahogappa
0
100
Playwright x GitHub Actionsで実現する「レビューしやすい」E2Eテストレポート
kinosuke01
0
580
AWS CLIの新しい認証情報設定方法aws loginコマンドの実態
wkm2
6
710
RAG/Agent開発のアップデートまとめ
taka0709
0
160
GitHub Copilotを使いこなす 実例に学ぶAIコーディング活用術
74th
3
2.7k
LLM-Readyなデータ基盤を高速に構築するためのアジャイルデータモデリングの実例
kashira
0
240
手動から自動へ、そしてその先へ
moritamasami
0
300
A Compass of Thought: Guiding the Future of Test Automation ( #jassttokai25 , #jassttokai )
teyamagu
PRO
1
260
エンジニアとPMのドメイン知識の溝をなくす、 AIネイティブな開発プロセス
applism118
4
1.2k
SSO方式とJumpアカウント方式の比較と設計方針
yuobayashi
7
600
Featured
See All Featured
Music & Morning Musume
bryan
46
7k
Facilitating Awesome Meetings
lara
57
6.7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Docker and Python
trallard
47
3.7k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Why Our Code Smells
bkeepers
PRO
340
57k
Become a Pro
speakerdeck
PRO
31
5.7k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
The Cost Of JavaScript in 2023
addyosmani
55
9.3k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.4k
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?