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 Sightseeing Tour
Search
Andrea Leopardi
September 26, 2019
Programming
0
420
Elixir Sightseeing Tour
Andrea Leopardi
September 26, 2019
Tweet
Share
More Decks by Andrea Leopardi
See All by Andrea Leopardi
gen_statem - OTP's Unsung Hero
whatyouhide
2
240
The World is a Network (and We Are Just Nodes)
whatyouhide
1
220
BEAM: The Perfect Fit for Networks
whatyouhide
1
200
Update from the Elixir team - 2022
whatyouhide
0
400
Testing Asynchronous OTP
whatyouhide
1
520
Mint - Disrupting HTTP clients
whatyouhide
0
250
BEAM Architecture Handbook
whatyouhide
7
2.8k
The Evolution of a Language
whatyouhide
0
150
Elixir - functional, concurrent, distributed programming for the rest of us
whatyouhide
2
330
Other Decks in Programming
See All in Programming
Perlで痩せる
yuukis
1
680
Effect の双対、Coeffect
yukikurage
5
1.4k
Cursor Meetup Tokyo ゲノミクスとCursor: 進化と制約のあいだ
koido
2
1k
Javaに鉄道指向プログラミング (Railway Oriented Pro gramming) のエッセンスを取り入れる/Bringing the Essence of Railway-Oriented Programming to Java
cocet33000
2
540
Perplexity Slack Botを作ってAI活用を進めた話 / AI Engineering Summit プレイベント
n3xem
0
650
Elixir で IoT 開発、 Nerves なら簡単にできる!?
pojiro
1
120
TypeScript LSP の今までとこれから
quramy
1
500
從零到一:搭建你的第一個 Observability 平台
blueswen
1
900
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
240
Claude Codeの使い方
ttnyt8701
1
100
Javaのルールをねじ曲げろ!禁断の操作とその代償から学ぶメタプログラミング入門 / A Guide to Metaprogramming: Lessons from Forbidden Techniques and Their Price
nrslib
3
1.9k
無関心の谷
kanayannet
0
160
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
329
24k
Done Done
chrislema
184
16k
Gamification - CAS2011
davidbonilla
81
5.3k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Thoughts on Productivity
jonyablonski
69
4.7k
Making Projects Easy
brettharned
116
6.2k
Mobile First: as difficult as doing things right
swwweet
223
9.6k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
Fireside Chat
paigeccino
37
3.5k
Transcript
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
defmodule Hello do def world() do IO.puts("Hello world") end end
None
None
map = %{"conf" => "ClojuTRE"} new_map = Map.put(map, "conf", "smallFP")
Map.get(map, "conf") #=> "ClojuTRE"
Enum.map([1, 2, 3], fn n -> n * 2 end)
#=> [2, 4, 6]
None
[first, _, "hello"] = my_list
case some_expression do 1 -> "it's one!" {_, _} ->
"it's a 2-elem tuple!" _other -> "it's something else" end
text |> send_email(to, cc) send_email(text, to, cc)
None
send( set_status( put_cookie( set_session( add_cors_headers(request) ), cookie ), 200 )
)
request = add_cors_headers() request = set_session(request) request = put_cookie(request, cookie)
request = set_status(request, 200) send(request)
request |> add_cors_headers() |> set_session() |> put_cookie(cookie) |> set_status(200) |>
send()
None
None
None
None
None
spawn(fn -> IO.puts("I'm in another process!") IO.inspect(self()) end)
None
None
None
None
None
None
None
None
send(pid, "hello!")
None
None
receive do message -> IO.puts("Received: #{message}") end
None
None
send(dest_pid, {self(), {:add, 1, 7}}) receive do {:add_response, response} ->
IO.puts("Response: #{response}") end
None
send(dest_pid, {self(), {:add, 1, 7}}) receive do {:add_response, response} ->
IO.puts("Response: #{response}") after 1000 -> IO.puts("Timeout :(") end
None
None
None
None
None
None
None
ref = Process.monitor(dest_pid) send(dest_pid, {self(), {:add, 1, 7}}) receive do
{:add_response, response} -> IO.puts("Response: #{response}") {:DOWN, ^ref, _, _, _} -> IO.puts("Process went down") after 1000 -> IO.puts("Timeout :(") end
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
quote do add(1, 2) end
two_code = quote do 1 + 1 end quote do
add(1, unquote(two_code)) end
if condition do expression end quote do case unquote(condition) do
true -> unquote(expression) false -> nil end end
None
None
None
None
None
None