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
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
200
PicoRuby on Rails
makicamel
2
130
Goで作る、開発・CI環境
sin392
0
230
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
590
ISUCON研修おかわり会 講義スライド
arfes0e2b3c
1
450
Startups on Rails in Past, Present and Future–Irina Nazarova, RailsConf 2025
irinanazarova
0
110
20250704_教育事業におけるアジャイルなデータ基盤構築
hanon52_
5
790
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
2
150
#QiitaBash MCPのセキュリティ
ryosukedtomita
1
1.3k
ニーリーにおけるプロダクトエンジニア
nealle
0
840
20250628_非エンジニアがバイブコーディングしてみた
ponponmikankan
0
680
AIと”コードの評価関数”を共有する / Share the "code evaluation function" with AI
euglena1215
1
170
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
4 Signs Your Business is Dying
shpigford
184
22k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
970
A Modern Web Designer's Workflow
chriscoyier
695
190k
Bash Introduction
62gerente
613
210k
Agile that works and the tools we love
rasmusluckow
329
21k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Docker and Python
trallard
44
3.5k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
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