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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
96
Introduction to Dokku
eljojo
1
160
Baruco 2014: How I Built My Own Twitch-Plays-Pokémon
eljojo
0
1k
Introduction to Docker
eljojo
0
250
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
380
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
330
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
170
AWS Infrastructure as Code の新機能 2025 総まとめ 〜SA 4人による怒涛のデモ祭り〜
konokenj
10
3.2k
朝日新聞のデジタル版を支えるGoバックエンド ー価値ある情報をいち早く確実にお届けするために
junkiishida
1
360
CSC307 Lecture 14
javiergs
PRO
0
450
AI活用のコスパを最大化する方法
ochtum
0
120
nilとは何か 〜interfaceの構造とnil!=nilから理解する〜
kuro_kurorrr
3
1.6k
AI時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
640
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
120
Event Storming
hschwentner
3
1.3k
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
370
Featured
See All Featured
From π to Pie charts
rasagy
0
140
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
240
RailsConf 2023
tenderlove
30
1.4k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
51k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
190
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
880
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
230
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Six Lessons from altMBA
skipperchong
29
4.2k
Agile that works and the tools we love
rasmusluckow
331
21k
How to Talk to Developers About Accessibility
jct
2
140
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
980
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