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
390
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
180
BEAM: The Perfect Fit for Networks
whatyouhide
1
160
Update from the Elixir team - 2022
whatyouhide
0
370
Testing Asynchronous OTP
whatyouhide
0
480
Mint - Disrupting HTTP clients
whatyouhide
0
230
BEAM Architecture Handbook
whatyouhide
7
2.7k
The Evolution of a Language
whatyouhide
0
130
Elixir - functional, concurrent, distributed programming for the rest of us
whatyouhide
2
310
Papers we love: Elixir edition
whatyouhide
5
1.1k
Other Decks in Programming
See All in Programming
カンファレンス動画鑑賞会のススメ / Osaka.swift #1
hironytic
0
170
ESLintプラグインを使用してCDKのセオリーを適用する
yamanashi_ren01
2
240
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
410
Azure AI Foundryのご紹介
qt_luigi
1
210
最近のVS Codeで気になるニュース 2025/01
74th
1
100
オニオンアーキテクチャを使って、 Unityと.NETでコードを共有する
soi013
0
370
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
100
rails newと同時に型を書く
aki19035vc
5
710
20241217 競争力強化とビジネス価値創出への挑戦:モノタロウのシステムモダナイズ、開発組織の進化と今後の展望
monotaro
PRO
0
290
ATDDで素早く安定した デリバリを実現しよう!
tonnsama
1
1.9k
ErdMap: Thinking about a map for Rails applications
makicamel
1
660
ゼロからの、レトロゲームエンジンの作り方
tokujiros
3
1.1k
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
960
A designer walks into a library…
pauljervisheath
205
24k
Thoughts on Productivity
jonyablonski
68
4.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.6k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Building Applications with DynamoDB
mza
93
6.2k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
3
180
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
GitHub's CSS Performance
jonrohan
1030
460k
Side Projects
sachag
452
42k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
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