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
A Completely Unbiased Showcase of Elixir
Search
Andrea Leopardi
September 09, 2016
Programming
2
320
A Completely Unbiased Showcase of Elixir
Andrea Leopardi
September 09, 2016
Tweet
Share
More Decks by Andrea Leopardi
See All by Andrea Leopardi
The World is a Network (and We Are Just Nodes)
whatyouhide
0
150
BEAM: The Perfect Fit for Networks
whatyouhide
1
140
Update from the Elixir team - 2022
whatyouhide
0
340
Testing Asynchronous OTP
whatyouhide
0
460
Elixir Sightseeing Tour
whatyouhide
0
350
Mint - Disrupting HTTP clients
whatyouhide
0
210
BEAM Architecture Handbook
whatyouhide
7
2.6k
The Evolution of a Language
whatyouhide
0
120
Elixir - functional, concurrent, distributed programming for the rest of us
whatyouhide
2
290
Other Decks in Programming
See All in Programming
どうしてこうなった?から理解するActive Recordの関連の裏側
willnet
5
510
BQ+dbt+Lookerを用いた、月間800億件以上の広告リクエストに対するデータモデリング
hanon52_
4
990
Amebaチョイス立ち上げの裏側 ~依存システムとの闘い~
daichi_igarashi
0
220
私の考える初学者がBlazorできるまでの学習方法
tomokusaba
1
240
Swiftで高速フーリエ変換してオーディオビジュアライザーを作る / iOSDC Japan 2024 Day1 Track D
kyome22
2
460
Kotlin 2.0 and Beyond
antonarhipov
2
130
TypeScriptで 負荷テストを書こう 〜k6のシングルバイナリの秘密〜
dora1998
7
2.8k
Playwrightから始めるVisual Regression Testingのススメ by とっと
totto2727
2
1.8k
【TID2024】模擬講義:プログラマと一緒にゲームをデザインしてみよう!
akatsukigames_tech
0
380
Method Swizzlingを行うライブラリにおけるマルチモジュール設計
yoshikma
0
100
GoのIteratorに詳しくなってしまう
inatonix
1
170
長期運用プロダクトの開発速度を維持し続けるためのリファクタリング実践例
wataruss
8
2.5k
Featured
See All Featured
Creatively Recalculating Your Daily Design Routine
revolveconf
215
12k
How To Stay Up To Date on Web Technology
chriscoyier
785
250k
Code Review Best Practice
trishagee
62
16k
The Language of Interfaces
destraynor
153
23k
Designing with Data
zakiwarfel
98
5k
Code Reviewing Like a Champion
maltzj
518
39k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
325
21k
[RailsConf 2023] Rails as a piece of cake
palkan
44
4.6k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.4k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.4k
How to name files
jennybc
75
97k
4 Signs Your Business is Dying
shpigford
179
21k
Transcript
UNBIASED A COMPLETELY SHOWCASE OF ELIXIR
None
L F E OVEABLE, UN RLANG
ERLANG FOR HIPSTERS 2.0?
javascript/coffescript java/clojure javascript/elm
javascript/coffescript java/clojure javascript/elm ✓
.BEAM
1.0 September 2014 1.3 September 2016
GOOD STUFF IMPROVABLE STUFF ELIXIR + ERLANG
@whatyouhide
FOOTBALL ADDICTS
GOOD STUFF IMPROVABLE STUFF ELIXIR + ERLANG
GOOD STUFF IMPROVABLE STUFF ELIXIR + ERLANG
STANDARD LIBRARY
STREAMS
STREAMS "foo.txt" |> File.stream! |> Stream.map(...) |> Stream... |> Enum.to_list
METAPROGRAMMING
defmacro unless(cond, expr) do quote do if !unquote(cond) do unquote(expr)
end end end
defmacro unless(cond, expr) do quote do if !unquote(cond) do unquote(expr)
end end end
STRUCTS "official" data types
defmodule User do defstruct [:name, :age] end %User{name: "Meg", age:
33}
PROTOCOLS
JSON encoding json:encode({user, ...}) user:encode({...})
JSON encoding defprotocol JSON do def encode(_) end defimpl JSON,
for: User do def encode(user), do: ... end
ExUnit test "send/2" do send(self(), {:ok, 1}) assert_receive {:ok, _}
end
ExUnit test "send/2" do send(self(), {:ok, 1}) assert_receive {:ok, _}
end
tagging diff --stale
None
--stale don't run stale stinky tests
INTEROP WITH ERLANG for doing Real Work™
lists:map(fun(X) -> X + 1 end, [1, 2, 3]) :lists.map(fn(x)
-> x + 1 end, [1, 2, 3])
Enum.shuffle([1, 2, 3]) 'Elixir.Enum':shuffle([1, 2, 3])
MIX
DOCUMENTATION @doc """ Performs command """ def command(c), do: ...
DOCUMENTATION
ONBOARDING Getting Started guide Resources (books, ...) Error messages
ECOSYSTEM Phoenix Nerves Ecto, Plug, GenStage, ...
COMMUNITY
GOOD STUFF IMPROVABLE STUFF ELIXIR + ERLANG
DIALYZER
PROPERTY-BASED TESTING
USING ELIXIR FROM ERLANG
GOOD STUFF IMPROVABLE STUFF ELIXIR + ERLANG
just an app
WHICH ONE DO I USE ELIXIR ELIXIR ELIXIR ELIXIR ELIXIR
ELIXIR ELIXIR
APPRECIATE BOTH
POSSIBLE RULE OF THUMB libraries in Erlang (if they wouldn't
benefit from Elixir features) apps in Elixir /
hex.pm Erlang + Elixir
GOOD STUFF IMPROVABLE STUFF ELIXIR <3 ERLANG STDLIB EXUNIT METAPROGRAMMING
PROTOCOLS MIX DOCS ECOSYSTEM DIALYZER PROPERTY-BASED TESTS ELIXIR FROM ERLANG USE BOTH SHARE ON HEX BE NICE
@whatyouhide