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
160
Elixir Mini Introduction for Zürich Meetup
Stefan Wintermeyer
February 20, 2017
Tweet
Share
More Decks by Stefan Wintermeyer
See All by Stefan Wintermeyer
Ash Framework - Elixir Kenya February 2024 Webinar
wintermeyer
1
56
The Greener Gras
wintermeyer
0
210
Rails vs. Phoenix vs. Hanami
wintermeyer
0
1.1k
RubyConfBy 2018 talk about WebPerformance with Rails 5.2
wintermeyer
3
260
WebPerformance für Reiseblogger
wintermeyer
0
160
WebPerformance with Rails 5.2
wintermeyer
5
870
FrOSCon 2017 talk about vutuv
wintermeyer
0
380
Lonestar ElixirConf 2017 talk about vutuv and Phoenix
wintermeyer
1
400
WebPerformance Meetup in Cologne (Feb. 2017)
wintermeyer
1
150
Other Decks in Technology
See All in Technology
Luupの開発組織におけるインシデントマネジメントの変遷 ver.RoadtoSRENEXT2024
grimoh
1
270
Azure OpenAI Service Dev Day / LLMでできる!使える!生成AIエージェント
masahiro_nishimi
3
810
GoとアクターモデルでES+CQRSを実践! / proto_actor_es_cqrs
ytake
1
160
「単なる OAuth 2.0 を認証に使うと、車が通れるほどのどでかいセキュリティー・ホールができる」のか検証してみた
terara
0
380
Git 研修 Basic【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
310
MySQLのロックの種類とその競合
yoku0825
6
1.6k
セキュリティ研修 Day1【MIXI 24新卒技術研修】
mixi_engineers
PRO
0
160
LINE WORKSへ簡単通知!Incoming Webhookアプリの紹介
mmclsntr
0
110
JBUG岡山 #6 WordCamp男木島の チームビルディング
takeshifurusato
0
150
運用改善、不都合な真実 / 20240722-ssmjp-kaizen
opelab
17
8.4k
フルリモートワークはエンジニアの夢を叶えたか? #cm_odyssey
mamohacy
2
600
推薦システムを本番導入する上で一番優先すべきだったこと~NewsPicks記事推薦機能の改善事例を元に~
morinota
0
130
Featured
See All Featured
Six Lessons from altMBA
skipperchong
24
3.2k
Fontdeck: Realign not Redesign
paulrobertlloyd
79
5.1k
In The Pink: A Labor of Love
frogandcode
139
22k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
277
13k
It's Worth the Effort
3n
181
27k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
502
140k
What’s in a name? Adding method to the madness
productmarketing
PRO
21
2.9k
A designer walks into a library…
pauljervisheath
201
24k
Faster Mobile Websites
deanohume
303
30k
Practical Orchestrator
shlominoach
185
10k
Designing the Hi-DPI Web
ddemaree
276
34k
The World Runs on Bad Software
bkeepers
PRO
63
11k
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