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
170
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
25
Ash Framework - Elixir Kenya February 2024 Webinar
wintermeyer
1
65
The Greener Gras
wintermeyer
0
210
Rails vs. Phoenix vs. Hanami
wintermeyer
0
1.2k
RubyConfBy 2018 talk about WebPerformance with Rails 5.2
wintermeyer
3
270
WebPerformance für Reiseblogger
wintermeyer
0
170
WebPerformance with Rails 5.2
wintermeyer
5
890
FrOSCon 2017 talk about vutuv
wintermeyer
0
390
Lonestar ElixirConf 2017 talk about vutuv and Phoenix
wintermeyer
1
410
Other Decks in Technology
See All in Technology
【株式会社ELYZA】|GENIAC成果報告会 自社開発モデルプレゼンテーション
elyza
1
430
自作Cコンパイラ 8時間の奮闘
soukouki
0
860
スタッフエンジニアの道: The Staff Engineer’s Path
snoozer05
PRO
44
15k
たった1人からはじめる【Agile Community of Practice】~ソース原理とFearless Changeを添えて~
ktc_corporate_it
1
510
Developer Experienceを向上させる基盤づくりの取り組み事例集
coconala_engineer
0
160
サーバー管理しないサーバーサービスManaged DevOps Pool
kkamegawa
0
140
フルカイテン株式会社 採用資料
fullkaiten
0
32k
DuckDB雑紹介(1.1対応版)@DuckDB座談会
ktz
6
1.4k
Swift Testingのconfirmationを コードリーディング/Dive into Swift Testing confirmation
laprasdrum
2
270
『GRANBLUE FANTASY: Relink』最高の「没入感」を実現するカットシーン制作手法とそれを支える技術
cygames
1
160
やってやろうじゃないかメカアジャイル! / Let's do it, mechanical agile!
psj59129
1
720
タイミーのレコメンドにおける ABテストの運用
ozeshun
1
220
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
230
17k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
36
1.7k
Pencils Down: Stop Designing & Start Developing
hursman
119
11k
The Mythical Team-Month
searls
218
43k
Intergalactic Javascript Robots from Outer Space
tanoku
268
26k
What’s in a name? Adding method to the madness
productmarketing
PRO
21
3k
The Power of CSS Pseudo Elements
geoffreycrofte
71
5.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
58k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
663
120k
Facilitating Awesome Meetings
lara
49
6k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
278
13k
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