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
Discovering AI Models
picardparis
4
3.9k
不動産tech Product Night#2_AIことはじめ_GA橋本
takehikohashimoto
0
190
テスト”ケース”駆動開発 で手戻りをなくそう
ryohma0510
0
320
o1のAPIで実験してみたが 制限きつすぎて辛かった話
pharma_x_tech
0
200
持続可能なソフトウェア開発を支える『GitHub CI/CD実践ガイド』
tmknom
7
1.4k
App Router を実プロダクトで採用して見えてきた勘所をちょっとだけ紹介
marokanatani
1
930
OR学会2024秋_短期収益と将来のオフ方策評価性能を考慮したクーポン割当方策混合比の決定
recruitengineers
PRO
4
460
株式会社EventHub・エンジニア採用資料
eventhub
0
2.9k
ロリポップ! for Gamersを支えるインフラ/lolipop for gamers infrastructure
takumakume
0
130
タイミーのレコメンドにおける ABテストの運用
ozeshun
1
140
リアルお遍路+SORACOM IoT
ozk009
1
140
AI活用したくてもできなかった不動産SaaSの今とこれから
nealle
0
330
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
325
38k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
109
6.9k
Design by the Numbers
sachag
277
19k
Documentation Writing (for coders)
carmenintech
65
4.3k
The Invisible Side of Design
smashingmag
296
50k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
1
54
No one is an island. Learnings from fostering a developers community.
thoeni
18
2.9k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
326
21k
Learning to Love Humans: Emotional Interface Design
aarron
270
40k
A Tale of Four Properties
chriscoyier
155
22k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
5
480
Designing Dashboards & Data Visualisations in Web Apps
destraynor
227
52k
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