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
what is this elixir thing everyone is talking a...
Search
José Tomás Albornoz
September 16, 2016
Programming
150
0
Share
what is this elixir thing everyone is talking about
some of my fav features of elixir
lightning talk for CodeDaze.io on September 16th, 2016
José Tomás Albornoz
September 16, 2016
More Decks by José Tomás Albornoz
See All by José Tomás Albornoz
Things I learned when working on a small startup
eljojo
0
98
Introduction to Dokku
eljojo
1
170
Baruco 2014: How I Built My Own Twitch-Plays-Pokémon
eljojo
0
1.1k
Introduction to Docker
eljojo
0
250
Other Decks in Programming
See All in Programming
ふつうのFeature Flag実践入門
irof
6
3.2k
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
1
1.3k
色即是空、空即是色、データサイエンス
kamoneggi
1
200
New "Type" system on PicoRuby
pocke
1
300
3Dシーンの圧縮
fadis
1
450
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
230
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
180
AIエージェントと協働するCLI開発 — BunとOpenClawで学んだこと
yoshikouki
1
220
CSC307 Lecture 17
javiergs
PRO
0
260
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.1k
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
1.5k
JavaDoc 再入門
nagise
0
190
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
150
A Tale of Four Properties
chriscoyier
163
24k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
140
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
390
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
290
How to build a perfect <img>
jonoalderson
1
5.5k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
70
39k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
240
Transcript
what is this elixir thing everyone's talking about by jojo
what is elixir
elixir is a functional language
created by José Valim
that runs on the erlang vm
pattern matching iex(1)> [first, second] = [1, 2] [1, 2]
iex(2)> first 1
pattern matching iex(2)> [first, second] = [1,2,3] ** (MatchError) no
match of right hand side value: [1, 2, 3]
pattern matching iex(1)> payload = %{username: "eljojo", stuff: true} %{stuff:
true, username: "eljojo"} iex(2)> %{username: name} = payload %{stuff: true, username: "eljojo"} iex(3)> name "eljojo"
function overloading def make_sound(:cow) do IO.puts "MOOOOOOOOO" end def make_sound(:cat)
do IO.puts "MEEEOOWW" end def make_sound(_) do IO.puts "¯\_(ϑ)_/¯" end
function overloading def make_sound(%{animal: :cow}) do IO.puts "MOOOOOOOOO" end def
make_sound(%{animal: :cat}) do IO.puts "MEEEOOWW" end def make_sound(%{animal: name}) do IO.puts "not sure how to #{name} ¯\_(ϑ)_/¯" end
we also got guards def page_ops(downtime) when downtime < 10
do IO.puts "¯\_(ϑ)_/¯" end def page_ops(downtime) when downtime >= 10 do PagerDuty.notify(whatever) end
pipe operator def add_one(number), do: number + 1 def multiply_by_three(number),
do: number * 3 multiply_by_three(add_one(1)) # => 6
pipe operator def add_one(number), do: number + 1 def multiply_by_three(number),
do: number * 3 1 |> add_one |> multiply_by_three # => 6
processes + messages current_process = self() spawn_link(fn -> send(current_process, {:msg,
"hello world"}) end) receive do {:msg, contents} -> IO.puts contents end
processes + messages # machine one receive do {:msg, contents}
-> IO.puts contents end # machine two process_name = "$MACHINE_ONE" spawn_link(fn -> send(process_name, {:msg, "yo!"}) end)
what is phoenix
A productive web framework that does not compromise speed and
maintainability.
it's basically rails for elixir, but cooler
validations def changeset(struct, params \\ %{}) do struct |> cast(params,
[:email_address, :first_name]) |> validate_required([:email_address]) end def changeset_after_signup(struct, params \\ %{}) do changeset(struct, params) |> validate_required([:first_name]) end
we're hiring!
@eljojo