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
380
Elixir Sightseeing Tour
Andrea Leopardi
September 26, 2019
Tweet
Share
More Decks by Andrea Leopardi
See All by Andrea Leopardi
The World is a Network (and We Are Just Nodes)
whatyouhide
0
170
BEAM: The Perfect Fit for Networks
whatyouhide
1
150
Update from the Elixir team - 2022
whatyouhide
0
360
Testing Asynchronous OTP
whatyouhide
0
470
Mint - Disrupting HTTP clients
whatyouhide
0
220
BEAM Architecture Handbook
whatyouhide
7
2.7k
The Evolution of a Language
whatyouhide
0
120
Elixir - functional, concurrent, distributed programming for the rest of us
whatyouhide
2
300
Papers we love: Elixir edition
whatyouhide
5
1k
Other Decks in Programming
See All in Programming
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
330
Go の GC の不得意な部分を克服したい
taiyow
2
770
Security_for_introducing_eBPF
kentatada
0
110
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
3
1k
Symfony Mapper Component
soyuka
2
730
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.3k
良いユニットテストを書こう
mototakatsu
5
1.9k
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
180
CSC509 Lecture 14
javiergs
PRO
0
130
ドメインイベント増えすぎ問題
h0r15h0
1
170
The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | droidcon Italy
prof18
0
150
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
GitHub's CSS Performance
jonrohan
1030
460k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
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