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
360
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
180
BEAM: The Perfect Fit for Networks
whatyouhide
1
170
Update from the Elixir team - 2022
whatyouhide
0
380
Testing Asynchronous OTP
whatyouhide
0
490
Elixir Sightseeing Tour
whatyouhide
0
390
Mint - Disrupting HTTP clients
whatyouhide
0
230
BEAM Architecture Handbook
whatyouhide
7
2.7k
The Evolution of a Language
whatyouhide
0
130
Elixir - functional, concurrent, distributed programming for the rest of us
whatyouhide
2
310
Other Decks in Programming
See All in Programming
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
100
1年目の私に伝えたい!テストコードを怖がらなくなるためのヒント/Tips for not being afraid of test code
push_gawa
0
140
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
260
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
37
14k
クリーンアーキテクチャから見る依存の向きの大切さ
shimabox
2
290
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
9
1.8k
Rails アプリ地図考 Flush Cut
makicamel
1
120
SpringBoot3.4の構造化ログ #kanjava
irof
2
990
技術を根付かせる / How to make technology take root
kubode
1
250
動作確認やテストで漏れがちな観点3選
starfish719
6
1k
Introduction to kotlinx.rpc
arawn
0
700
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
10
3.6k
Featured
See All Featured
Scaling GitHub
holman
459
140k
How STYLIGHT went responsive
nonsquared
98
5.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
21
2.5k
RailsConf 2023
tenderlove
29
1k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Practical Orchestrator
shlominoach
186
10k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
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