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
280
0
Share
Elixir Mini Introduction for Zürich Meetup
Stefan Wintermeyer
February 20, 2017
More Decks by Stefan Wintermeyer
See All by Stefan Wintermeyer
Cache = Cash! 2.0
wintermeyer
0
73
Disassembling Online Dating - FroSCon 2024
wintermeyer
0
160
Ash Framework - Elixir Kenya February 2024 Webinar
wintermeyer
1
190
The Greener Gras
wintermeyer
0
360
Rails vs. Phoenix vs. Hanami
wintermeyer
0
1.4k
RubyConfBy 2018 talk about WebPerformance with Rails 5.2
wintermeyer
3
410
WebPerformance für Reiseblogger
wintermeyer
0
350
WebPerformance with Rails 5.2
wintermeyer
5
1k
FrOSCon 2017 talk about vutuv
wintermeyer
0
590
Other Decks in Technology
See All in Technology
いつの間にかデータエンジニア以外の業務も増えていたけど、意外と経験が役に立ってる
zozotech
PRO
0
580
100マイクロサービスのTerraform/Kubernetes管理地獄から抜け出すためのAI活用術
markie1009
0
150
Redmine次期バージョン7.0の注目新機能解説 — UI/UX強化と連携強化を中心に
vividtone
1
110
SLI/SLO、「完全に理解した」から「チョットデキル」へ
maruloop
5
480
試作とデモンストレーション / Prototyping and Demonstrations
ks91
PRO
0
200
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
1.6k
freeeで運用しているAIQAについて
qatonchan
1
590
ServiceによるKubernetes通信制御ーClusterIPを例に
miku01
1
170
Every Conversation Counts
kawaguti
PRO
0
220
拝啓、あの夏の僕へ〜あなたも知っているApp Runnerの世界〜
news_it_enj
0
240
AIのための特別なアーキテクチャはいらない 0→1開発で実践した設計原則とガードレール
kaminashi
0
120
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.5k
Featured
See All Featured
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.7k
How to Think Like a Performance Engineer
csswizardry
28
2.6k
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
270
Abbi's Birthday
coloredviolet
2
7.6k
Amusing Abliteration
ianozsvald
1
160
First, design no harm
axbom
PRO
2
1.2k
For a Future-Friendly Web
brad_frost
183
10k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.9k
How GitHub (no longer) Works
holman
316
150k
Deep Space Network (abreviated)
tonyrice
0
130
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