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
220
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
78
Ash Framework - Elixir Kenya February 2024 Webinar
wintermeyer
1
110
The Greener Gras
wintermeyer
0
260
Rails vs. Phoenix vs. Hanami
wintermeyer
0
1.3k
RubyConfBy 2018 talk about WebPerformance with Rails 5.2
wintermeyer
3
350
WebPerformance für Reiseblogger
wintermeyer
0
240
WebPerformance with Rails 5.2
wintermeyer
5
950
FrOSCon 2017 talk about vutuv
wintermeyer
0
500
Lonestar ElixirConf 2017 talk about vutuv and Phoenix
wintermeyer
1
440
Other Decks in Technology
See All in Technology
プラットフォームとしての Datadog / Datadog as Platforms
aoto
PRO
1
250
それでもぼくらは貢献をつづけるのだ(たぶん) @FOSS4GLT会#002
furukawayasuto
1
210
RDRA3.0を知ろう
kanzaki
2
250
熱々🔥のUDN🍜を喰らえ❗マルチテナントもVM統合も思いのまま❗新機能で切り拓くk8sネットワークの未来
tsukaman
0
190
変化に強いテーブル設計の勘所 / Table design that is resistant to changes
soudai
42
11k
VPC Reachability AnalyzerAnalyzer~実務での使いどころ
masakiokuda
1
300
Things you never dared to ask about LLMs — v2
glaforge
1
370
GigaViewerにおけるMackerel APM導入の裏側
7474
0
110
AWS パートナー企業のテクニカルサポートが日々思っていること 〜そして、4/15 の現場から〜
kazzpapa3
2
380
Web Streams APIの基本と実践、TypeScriptでの活用法 / TSKaigi 2025 Web Streams API
tasshi
5
1.1k
OTel meets Wasm: プラグイン機構としてのWebAssemblyから見る次世代のObservability
lycorptech_jp
PRO
0
190
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
720
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Designing Experiences People Love
moore
142
24k
KATA
mclloyd
29
14k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
450
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Code Reviewing Like a Champion
maltzj
523
40k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.7k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Docker and Python
trallard
44
3.4k
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