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
47
Ash Framework - Elixir Kenya February 2024 Webinar
wintermeyer
1
90
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
440
Lonestar ElixirConf 2017 talk about vutuv and Phoenix
wintermeyer
1
420
Other Decks in Technology
See All in Technology
ハンズオンで学ぶ Databricks - Databricksにおけるデータエンジニアリング
taka_aki
1
2k
なぜfreeeはハブ・アンド・スポーク型の データメッシュアーキテクチャにチャレンジするのか?
shinichiro_joya
3
860
第27回クラウド女子会 ~re:Invent 振り返りLT会~ 私の周辺で反響のあった re:Invent 2024 アップデートつれづれ/reinvent-2024-update-reverberated-around-me
emiki
1
530
Skip Skip Run Run Run ♫
temoki
0
270
SREとしてスタッフエンジニアを目指す / SRE Kaigi 2025
tjun
14
4.2k
Site Reliability Engineering on Kubernetes
nwiizo
6
3.2k
2024AWSで個人的にアツかったアップデート
nagisa53
1
120
今から、 今だからこそ始める Terraform で Azure 管理 / Managing Azure with Terraform: The Perfect Time to Start
nnstt1
0
270
タイミーのデータ活用を支えるdbt Cloud導入とこれから
ttccddtoki
2
440
Re:Define 可用性を支える モニタリング、パフォーマンス最適化、そしてセキュリティ
pyama86
9
4k
メンバーがオーナーシップを発揮しやすいチームづくり
ham0215
2
330
Building Scalable Backend Services with Firebase
wisdommatt
0
110
Featured
See All Featured
The Language of Interfaces
destraynor
156
24k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
The Invisible Side of Design
smashingmag
299
50k
Speed Design
sergeychernyshev
25
750
GitHub's CSS Performance
jonrohan
1030
460k
A Tale of Four Properties
chriscoyier
157
23k
VelocityConf: Rendering Performance Case Studies
addyosmani
327
24k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
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