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
Transcript
23 slides
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?
More Decks by Iuri Fernandes
See All by Iuri Fernandes
Comredis
iurifq
1
130
Phoenix channels introduction
iurifq
0
140
Git - Dicas e boas práticas
iurifq
0
760
Vim
iurifq
1
170
Other Decks in Technology
See All in Technology
要件定義をAIに委任!Claude Codeプラグインで作るPdM × AgentTeams
puku0x
0
100
さようならSSH鍵、こんにちはゼロトラスト ― AIフレンドリーで快適な自宅鯖SSH
atalie2m
14
7.2k
目を覚ませ!僕らの認証情報が何者かに侵略されてるぞ
tkito
2
470
高品質と高スピードを支える品質のシフトレフトのアプローチ
goyoki
4
1.7k
20261113_JAWS_Osaka
takuyay0ne
1
590
2026-11-11 Tamachi.sre#7 PaCにインフラリソースの命を救われました。 / PaC saves the infra resource life
masasuzu
1
210
現地速報! Microsoft Ignite アップデートレポート
kasada
0
260
市販IoT機器や自作IoT機器とHomeAssistantを駆使して家の電気代をできる限り見える化する方法の考案
harutiro
0
390
[関西Kaggler会 20261113] 続・コミュニティコンペのススメ
nejumi
0
150
落とし穴にハマってわかった 開発生産性を測るときに気をつけたいこと
munakata
3
450
AIネイティブ組織の作り方。1人のPOとAIから始める、自社での実験
ama_ch
2
1.2k
マネージャーをエスパーにしない マネジメントされる側から始める、働きやすい現場づくり
comi190327
1
810
Featured
See All Featured
Balancing Empowerment & Direction
lara
6
1.4k
Heart Work Chapter 1 - Part 1
lfama
PRO
11
37k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
1
250
WENDY [Excerpt]
tessaabrams
15
41k
Utilizing Notion as your number one productivity tool
mfonobong
4
650
The browser strikes back
jonoalderson
0
2k
How Software Deployment tools have changed in the past 20 years
geshan
3
35k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
530
AI: The stuff that nobody shows you
jnunemaker
PRO
12
1.3k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
610
Faster Mobile Websites
deanohume
310
32k
WCS-LA-2024
lcolladotor
0
1k