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
Elixir
Search
Plataformatec
November 18, 2012
Technology
17
11k
Elixir
This talk highlights the reason, goals and roadmap behind Elixir,
http://elixir-lang.org
Plataformatec
November 18, 2012
Tweet
Share
More Decks by Plataformatec
See All by Plataformatec
O case da Plataformatec com o Elixir - Como uma empresa brasileira criou uma linguagem que é usada no mundo inteiro @ Elixir Brasil 2019
plataformatec
5
910
O case da Plataformatec com o Elixir - Como uma empresa brasileira criou uma linguagem que é usada no mundo inteiro @ QCon SP 2018
plataformatec
1
220
Elixir @ iMasters Intercon 2016
plataformatec
1
250
GenStage and Flow by @josevalim at ElixirConf
plataformatec
17
2.7k
Elixir: Programação Funcional e Pragmática @ 2º Tech Day Curitiba
plataformatec
2
290
Elixir: Programação Funcional e Pragmática @ Encontro Locaweb 2016
plataformatec
4
270
What's ahead for Elixir: v1.2 and GenRouter
plataformatec
15
2k
Arquiteturas Comuns de Apps Rails @ RubyConf BR 2015
plataformatec
6
370
Pirâmide de testes, escrevendo testes com qualidade @ RubyConf 2015
plataformatec
10
2.2k
Other Decks in Technology
See All in Technology
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.1k
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
0
110
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.6k
スクラム成熟度セルフチェックツールを作って得た学びとその活用法
coincheck_recruit
1
140
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
240
[FOSS4G 2024 Japan LT] LLMを使ってGISデータ解析を自動化したい!
nssv
1
210
TypeScript、上達の瞬間
sadnessojisan
46
13k
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
2
580
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
120
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Writing Fast Ruby
sferik
627
61k
KATA
mclloyd
29
14k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Gamification - CAS2011
davidbonilla
80
5k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Code Review Best Practice
trishagee
64
17k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Transcript
@elixirlang / elixir-lang.org Monday, November 19, 2012
@josevalim Monday, November 19, 2012
Monday, November 19, 2012
Why? Monday, November 19, 2012
case #1 Monday, November 19, 2012
Switch Switch Monday, November 19, 2012
Switch Browser Endpoint Server Monday, November 19, 2012
Server Browser Monday, November 19, 2012
•Web sockets •API streaming •Server sent events Server Monday, November
19, 2012
case #2 Multi-core Monday, November 19, 2012
Server Server Server Server Monday, November 19, 2012
50 cores $2600 Monday, November 19, 2012
Server Monday, November 19, 2012
case #3 Doing it live! Monday, November 19, 2012
http://blog.whatsapp.com/index.php/2012/01/1-million-is-so-2011/ 2 million connections on a single node Monday, November
19, 2012
http://stackoverflow.com/questions/1636455/where-is-erlang-used-and-why Monday, November 19, 2012
Goals Monday, November 19, 2012
goal #1 Productivity Monday, November 19, 2012
Everything is an expression Monday, November 19, 2012
-module(my_module). some_function(Foo) -> % ... other_function(Bar) -> % ... erlang
Monday, November 19, 2012
-module(my_module). % won’t compile io:put_chars("hello"). some_function(Foo) -> % ... other_function(Bar)
-> % ... erlang Monday, November 19, 2012
defmodule MyModule do def some_function(foo) do # ... end IO.puts
"hello" def other_function(bar) do # ... end end elixir Monday, November 19, 2012
Macros Monday, November 19, 2012
:foo - atoms/symbols { 1, 2, 3 } - tuples
[ 1, 2, 3 ] - lists Monday, November 19, 2012
is_atom(:foo) function line args atom { :is_atom, 1, [:foo] }
Monday, November 19, 2012
1 + 2 function line args { :+, 1, [1,2]
} Monday, November 19, 2012
defmacro unless(expr, opts) do quote do if(!unquote(expr), unquote(opts)) end end
unless(true, do: exit()) elixir Monday, November 19, 2012
Domain Specific Languages Monday, November 19, 2012
defmodule MathTest do use ExUnit.Case test "basic operations" do assert
1 + 1 == 2 end end elixir Monday, November 19, 2012
defmodule MathTest do use ExUnit.Case def test_basic_operations do assert 1
+ 1 == 2 :ok end end elixir Monday, November 19, 2012
assert 1 + 1 == 2 { :==, 5, [1
+ 1, 2] } function line args Monday, November 19, 2012
# assert 1 + 1 == 2 defmacro assert({ :=~,
line, [l,r] }) do # ... end defmacro assert({ :==, line, [l,r] }) do # ... end defmacro assert(default) do # ... end Monday, November 19, 2012
goal #2 Extensibility Monday, November 19, 2012
-module(json). to_json(Item) when is_list(Item) -> % ... to_json(Item) when is_binary(Item)
-> % ... to_json(Item) when is_number(Item) -> % ... erlang Monday, November 19, 2012
Protocols Monday, November 19, 2012
defprotocol JSON do def to_json(item) end JSON.to_json(item) elixir Monday, November
19, 2012
defimpl JSON, for: List do # ... end elixir defimpl
JSON, for: Binary do # ... end defimpl JSON, for: Number do # ... end Monday, November 19, 2012
defimpl JSON, for: Array do # ... end elixir Monday,
November 19, 2012
goal #3 Compatibility Monday, November 19, 2012
Monday, November 19, 2012
DISTRIBUTED FAULT-TOLERANT APPLICATIONS WITH HOT-CODE SWAPPING Monday, November 19, 2012
There is no conversion cost for calling Erlang from Elixir
and vice-versa Monday, November 19, 2012
• UTF-8 binaries strings • Keyword arguments • First-class documentation
• First-class regular expressions • Zero-index access • ... Monday, November 19, 2012
Example Monday, November 19, 2012
defmodule MathTest do use ExUnit.Case, async: true test "basic operations"
do assert 1 + 1 == 2 end end elixir Monday, November 19, 2012
1 MathTest 2 SystemTest 3 ... 4 ... 5 ...
6 ... 7 ... 8 ... ExUnit. Runner ExUnit. Formatter Monday, November 19, 2012
1 MathTest 2 SystemTest 3 ... 4 ... 5 ...
6 ... 7 ... 8 ... ExUnit. Runner run ExUnit. Formatter Monday, November 19, 2012
1 MathTest 2 SystemTest 3 ... 4 ... 5 ...
6 ... 7 ... 8 ... ExUnit. Runner run ExUnit. Formatter Monday, November 19, 2012
1 MathTest 2 SystemTest 3 ... 4 ... 5 ...
6 ... 7 ... 8 ... ExUnit. Runner run ExUnit. Formatter Monday, November 19, 2012
1 MathTest 2 SystemTest 3 ... 4 ... 5 ...
6 ... 7 ... 8 ... ExUnit. Runner done ExUnit. Formatter info Monday, November 19, 2012
1 MathTest 2 SystemTest 3 ... 4 ... 5 ...
6 ... 7 ... 8 ... ExUnit. Runner ExUnit. Formatter run Monday, November 19, 2012
127.0.0.9 127.0.0.3 1 MathTest 2 SystemTest 3 ... 4 ...
5 ... 6 ... 7 ... 8 ... ExUnit. Runner ExUnit. Formatter Monday, November 19, 2012
127.0.0.9 127.0.0.3 1 MathTest 2 SystemTest 3 ... 4 ...
5 ... 6 ... 7 ... 8 ... ExUnit. Runner ExUnit. Formatter ExUnit. Supervisor Monday, November 19, 2012
Roadmap Monday, November 19, 2012
• v0.6 (Aug/12) Erlang language compatibility • v0.8 (Dec/12) Erlang
apps support • Dynamo (xx/13) Web framework • v0 (Jan/11) Monday, November 19, 2012
Monday, November 19, 2012
@elixirlang / elixir-lang.org Monday, November 19, 2012