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
1
220
The World is a Network (and We Are Just Nodes)
whatyouhide
1
210
BEAM: The Perfect Fit for Networks
whatyouhide
1
190
Update from the Elixir team - 2022
whatyouhide
0
390
Testing Asynchronous OTP
whatyouhide
1
510
Mint - Disrupting HTTP clients
whatyouhide
0
240
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
320
Other Decks in Programming
See All in Programming
Cursor/Devin全社導入の理想と現実
saitoryc
28
21k
2ヶ月で生産性2倍、お買い物アプリ「カウシェ」4チーム同時改善の取り組み
ike002jp
1
110
fieldalignmentから見るGoの構造体
kuro_kurorrr
0
130
The New Developer Workflow: How AI Transforms Ideas into Code
danielsogl
0
100
Contribute to Comunities | React Tokyo Meetup #4 LT
sasagar
0
590
VitestのIn-Source Testingが便利
taro28
8
2.4k
「理解」を重視したAI活用開発
fast_doctor
0
270
REALITY コマンド作成チュートリアル
nishiuriraku
0
120
ComposeでWebアプリを作る技術
tbsten
0
130
エンジニア向けCursor勉強会 @ SmartHR
yukisnow1823
3
12k
AIコーディングの理想と現実
tomohisa
35
37k
実践Webフロントパフォーマンスチューニング
cp20
45
10k
Featured
See All Featured
Side Projects
sachag
453
42k
Navigating Team Friction
lara
185
15k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
227
22k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Faster Mobile Websites
deanohume
306
31k
Code Reviewing Like a Champion
maltzj
523
40k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.7k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
Become a Pro
speakerdeck
PRO
28
5.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
178
53k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.4k
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