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 Mini Introduction for Zürich Meetup
Search
Stefan Wintermeyer
February 20, 2017
Technology
0
200
Elixir Mini Introduction for Zürich Meetup
Stefan Wintermeyer
February 20, 2017
Tweet
Share
More Decks by Stefan Wintermeyer
See All by Stefan Wintermeyer
Disassembling Online Dating - FroSCon 2024
wintermeyer
0
44
Ash Framework - Elixir Kenya February 2024 Webinar
wintermeyer
1
87
The Greener Gras
wintermeyer
0
240
Rails vs. Phoenix vs. Hanami
wintermeyer
0
1.2k
RubyConfBy 2018 talk about WebPerformance with Rails 5.2
wintermeyer
3
300
WebPerformance für Reiseblogger
wintermeyer
0
200
WebPerformance with Rails 5.2
wintermeyer
5
930
FrOSCon 2017 talk about vutuv
wintermeyer
0
430
Lonestar ElixirConf 2017 talk about vutuv and Phoenix
wintermeyer
1
420
Other Decks in Technology
See All in Technology
KMP with Crashlytics
sansantech
PRO
0
230
2025年の挑戦 コーポレートエンジニアの技術広報/techpr5
nishiuma
0
130
チームが毎日小さな変化と適応を続けたら1年間でスケール可能なアジャイルチームができた話 / Building a Scalable Agile Team
kakehashi
2
210
ゼロからわかる!!AWSの構成図を書いてみようワークショップ 問題&解答解説 #デッカイギ #羽田デッカイギおつ
_mossann_t
0
1.5k
【JAWS-UG大阪 reInvent reCap LT大会 サンバが始まったら強制終了】“1分”で初めてのソロ参戦reInventを数字で振り返りながら反省する
ttelltte
0
120
Copilotの力を実感!3ヶ月間の生成AI研修の試行錯誤&成功事例をご紹介。果たして得たものとは・・?
ktc_shiori
0
320
Kotlin Multiplatformのポテンシャル
recruitengineers
PRO
2
140
深層学習と3Dキャプチャ・3Dモデル生成(土木学会応用力学委員会 応用数理・AIセミナー)
pfn
PRO
0
450
今年一年で頑張ること / What I will do my best this year
pauli
1
220
AWSサービスアップデート 2024/12 Part3
nrinetcom
PRO
0
130
あなたの人生も変わるかも?AWS認定2つで始まったウソみたいな話
iwamot
3
820
Docker Desktop で Docker を始めよう
zembutsu
PRO
0
140
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
19
3.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
113
50k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Building an army of robots
kneath
302
45k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Agile that works and the tools we love
rasmusluckow
328
21k
Statistics for Hackers
jakevdp
797
220k
Navigating Team Friction
lara
183
15k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
350
Docker and Python
trallard
43
3.2k
Transcript
Elixir Stefan Wintermeyer @wintermeyer
Elixir is a functional, concurrent, general-purpose programming language that runs
on the Erlang virtual machine (BEAM). https://en.wikipedia.org/wiki/Elixir_(programming_language)
defmodule ModuleName do def hello do IO.puts "Hello World" end
end http://elixir-lang.org/crash-course.html
IEx Elixir’s interactive shell
None
Why would I want to learn Elixir? Why invest the
time and effort? I’m happy with Ruby and OO.
Three Main Reasons Spoiler Alert: Concurrency is not one of
them.
1. Speed Elixir runs circles around Ruby and Python.
2. Stability Speed is nothing without stability.
3. Hot-Code Upgrades Zero Downtime!
Some Code Examples
Assigning Values to Variables
iex(1)> a = 1 1 iex(2)>
iex(1)> a = 1 1 iex(2)> a = 2 2
iex(3)>
iex(1)> a = 1 1 iex(2)> a = 2 2
iex(3)> ^a = 3 ** (MatchError) no match of right hand side value: 3
Tuples
iex(1)> {a, b, c} = {10, 20, 30} {10, 20,
30} iex(2)>
iex(1)> {a, b, c} = {10, 20, 30} {10, 20,
30} iex(2)> a 10 iex(3)>
Pattern Matching
iex(1)> {a, b, c} = {10, 20, 30} {10, 20,
30} iex(2)>
iex(1)> {a, b, c} = {10, 20, 30} {10, 20,
30} iex(2)> {a, 20, c} = {10, 20, 30} {10, 20, 30} iex(3)>
iex(1)> {a, b, c} = {10, 20, 30} {10, 20,
30} iex(2)> {a, 20, c} = {10, 20, 30} {10, 20, 30} iex(3)> {a, 1, c} = {10, 20, 30} ** (MatchError) no match of right hand side value: {10, 20, 30}
If you want to get your feed wet with Elixir
I recommend two projects.
If you like hardware try http://nerves-project.org
None
If you like the web try www.phoenixframework.org
None
Phoenix Framework Productive. Reliable. Fast. Phoenix != Rails
None
mix phoenix.new blog Y cd blog vim config/dev.exs brew install
postgres brew services start postgres createuser -W --createdb blog demo mix ecto.create mix phoenix.gen.html Post posts subject body vim web/router.ex resources "/posts", PostController mix ecto.migrate mix phoenix.server Blog Example
Thank you! @wintermeyer