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
0
140
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
Tweet
Share
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
90
Introduction to Dokku
eljojo
1
150
Baruco 2014: How I Built My Own Twitch-Plays-Pokémon
eljojo
0
920
Introduction to Docker
eljojo
0
240
Other Decks in Programming
See All in Programming
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
1
570
すべてのコンテキストを、 ユーザー価値に変える
applism118
2
1.1k
ペアプロ × 生成AI 現場での実践と課題について / generative-ai-in-pair-programming
codmoninc
0
230
datadog dash 2025 LLM observability for reliability and stability
ivry_presentationmaterials
0
420
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
1
600
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
460
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
530
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
4
1k
WindowInsetsだってテストしたい
ryunen344
1
220
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
620
WebViewの現在地 - SwiftUI時代のWebKit - / The Current State Of WebView
marcy731
0
110
ニーリーにおけるプロダクトエンジニア
nealle
0
710
Featured
See All Featured
Side Projects
sachag
455
42k
GitHub's CSS Performance
jonrohan
1031
460k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.9k
Gamification - CAS2011
davidbonilla
81
5.3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
5
230
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
800
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
The World Runs on Bad Software
bkeepers
PRO
69
11k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
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