Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Elixir Sightseeing Tour
Andrea Leopardi
September 26, 2019
Programming
0
240
Elixir Sightseeing Tour
Andrea Leopardi
September 26, 2019
Tweet
Share
More Decks by Andrea Leopardi
See All by Andrea Leopardi
Update from the Elixir team - 2022
whatyouhide
0
270
Testing Asynchronous OTP
whatyouhide
0
390
Mint - Disrupting HTTP clients
whatyouhide
0
190
BEAM Architecture Handbook
whatyouhide
7
2.2k
The Evolution of a Language
whatyouhide
0
110
Elixir - functional, concurrent, distributed programming for the rest of us
whatyouhide
2
260
Papers we love: Elixir edition
whatyouhide
5
910
Update from the Elixir team - 2018
whatyouhide
2
4.3k
Property-based testing is a mindset
whatyouhide
0
140
Other Decks in Programming
See All in Programming
CDKでValidationする本当の方法 / cdk-validation
gotok365
1
210
T3 Stack and TypeScript ecosystem
quramy
3
760
NGK2023S - OCaml最高! スマホ開発にも使えちゃう?!
haochenxie
0
120
コンピュータビジョンセミナー2 / computer_vision_seminar_libSGM
fixstars
0
320
Git Rebase
bkuhlmann
10
1.2k
Swift Concurrency in GoodNotes
inamiy
4
1.3k
花き業界のサプライチェーンを繋げるプロダクト開発の進め方
userlike1
0
170
和暦を正しく扱うための暦の話
nagise
10
6.4k
Circuit⚡
monaapk
0
200
How to Fight Production Incidents?
asatarin
0
200
2023年にクル(かもしれない)通信ミドルウェア技術(仮)
s_hosoai
0
210
Gradle build: The time is now
nonews
1
480
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
284
18k
Navigating Team Friction
lara
177
12k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
182
15k
The MySQL Ecosystem @ GitHub 2015
samlambert
240
11k
Large-scale JavaScript Application Architecture
addyosmani
499
110k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
236
1.1M
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
22
1.7k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
6
840
Facilitating Awesome Meetings
lara
33
4.6k
Keith and Marios Guide to Fast Websites
keithpitt
407
21k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
224
50k
Design by the Numbers
sachag
271
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