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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Stefan Wintermeyer
February 20, 2017
Technology
0
280
Elixir Mini Introduction for Zürich Meetup
Stefan Wintermeyer
February 20, 2017
Tweet
Share
More Decks by Stefan Wintermeyer
See All by Stefan Wintermeyer
Cache = Cash! 2.0
wintermeyer
0
64
Disassembling Online Dating - FroSCon 2024
wintermeyer
0
150
Ash Framework - Elixir Kenya February 2024 Webinar
wintermeyer
1
170
The Greener Gras
wintermeyer
0
340
Rails vs. Phoenix vs. Hanami
wintermeyer
0
1.4k
RubyConfBy 2018 talk about WebPerformance with Rails 5.2
wintermeyer
3
400
WebPerformance für Reiseblogger
wintermeyer
0
340
WebPerformance with Rails 5.2
wintermeyer
5
1k
FrOSCon 2017 talk about vutuv
wintermeyer
0
580
Other Decks in Technology
See All in Technology
品質を経営にどう語るか #jassttokyo / Communicating the Strategic Value of Quality to Executive Leadership
kyonmm
PRO
3
1.2k
Phase02_AI座学_応用
overflowinc
0
2.6k
DMBOKを使ってレバレジーズのデータマネジメントを評価した
leveragestech
0
240
AI時代のオンプレ-クラウドキャリアチェンジ考
yuu0w0yuu
0
230
RGBに陥らないために -プロダクトの価値を届けるまで-
righttouch
PRO
0
100
既存アプリの延命も,最新技術での新規開発も:WebSphereの最新情報
ktgrryt
0
160
スピンアウト講座03_CLAUDE-MDとSKILL-MD
overflowinc
0
1.2k
Phase07_実務適用
overflowinc
0
1.7k
PostgreSQL 18のNOT ENFORCEDな制約とDEFERRABLEの関係
yahonda
0
110
契約書からの情報抽出を行うLLMのスループットを、バッチ処理を用いて最大40%改善した話
sansantech
PRO
2
230
今日から始められるテスト自動化 〜 基礎知識から生成AI活用まで 〜
magicpod
1
140
スピンアウト講座05_実践活用事例
overflowinc
0
1.1k
Featured
See All Featured
Abbi's Birthday
coloredviolet
2
5.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
690
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
A designer walks into a library…
pauljervisheath
210
24k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
130
Building a Scalable Design System with Sketch
lauravandoore
463
34k
How to make the Groovebox
asonas
2
2k
Deep Space Network (abreviated)
tonyrice
0
95
Code Review Best Practice
trishagee
74
20k
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