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
320
Elixir Sightseeing Tour
Andrea Leopardi
September 26, 2019
Tweet
Share
More Decks by Andrea Leopardi
See All by Andrea Leopardi
BEAM: The Perfect Fit for Networks
whatyouhide
1
130
Update from the Elixir team - 2022
whatyouhide
0
330
Testing Asynchronous OTP
whatyouhide
0
440
Mint - Disrupting HTTP clients
whatyouhide
0
200
BEAM Architecture Handbook
whatyouhide
7
2.5k
The Evolution of a Language
whatyouhide
0
110
Elixir - functional, concurrent, distributed programming for the rest of us
whatyouhide
2
290
Papers we love: Elixir edition
whatyouhide
5
970
Update from the Elixir team - 2018
whatyouhide
2
4.4k
Other Decks in Programming
See All in Programming
Site Reliability Engineering for GMO
pyama86
8
1k
使ってみよう Azure AI Document Intelligence
kosmosebi
2
300
ゆるい個人開発のススメ
kuroppe1819
10
990
サイコロで理解する統計的仮説検定の考え方
tatamiya
4
920
Behind VS Code Extensions for JavaScript / TypeScript Linnting and Formatting
unvalley
5
910
try! Swift Tokyo 初参加報告LT
hinakko2
0
220
HUIT新歓2024「競技プログラミング、やってみませんか?」
slephy2784
1
270
#phpcon_odawara オープン・クローズドなテストフィクスチャを求めて / open closed test fixtures
77web
3
230
PHPはいつから死んでいるかの調査
chiroruxx
1
400
"config" ってなんだ? / What is "config"?
okashoi
0
240
Scalable Customer Journey Orchestration (CJO)
lewuathe
0
210
0→1と1→10の狭間で Javaという技術選定を振り返る/Reflecting on the Decision to Choose Java Between Scaling from 0 to 1 and 1 to 10
jaguar_imo
2
380
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
60
5k
Building Adaptive Systems
keathley
31
1.9k
A Tale of Four Properties
chriscoyier
151
22k
Scaling GitHub
holman
457
140k
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.1k
What the flash - Photography Introduction
edds
64
11k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
244
20k
Robots, Beer and Maslow
schacon
PRO
155
7.9k
Building an army of robots
kneath
300
41k
The Straight Up "How To Draw Better" Workshop
denniskardys
227
130k
Product Roadmaps are Hard
iamctodd
44
9.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
37
2.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