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
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
180
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
「活動」は激変する。「ベース」は変わらない ~ 4つの軸で捉える_AI時代ソフトウェア開発マネジメント
sentokun
0
120
「捨てる」を設計する
kubell_hr
0
440
Kubernetesの「隠れメモリ消費」によるNode共倒れと、Request適正化という処方箋
g0xu
0
150
SSoT(Single Source of Truth)で「壊して再生」する設計
kawauso
2
390
出版記念イベントin大阪「書籍紹介&私がよく使うMCPサーバー3選と社内で安全に活用する方法」
kintotechdev
0
100
互換性のある(らしい)DBへの移行など考えるにあたってたいへんざっくり
sejima
PRO
0
240
Cursor Subagentsはいいぞ
yug1224
2
110
Bref でサービスを運用している話
sgash708
0
200
SaaSの操作主体は人間からAIへ - 経理AIエージェントが目指す深い自動化
nishihira
0
110
MCPで決済に楽にする
mu7889yoon
0
150
イベントで大活躍する電子ペーパー名札を作る(その2) 〜 M5PaperとM5PaperS3 〜 / IoTLT @ JLCPCB オープンハードカンファレンス
you
PRO
0
210
パワポ作るマンをMCP Apps化してみた
iwamot
PRO
0
180
Featured
See All Featured
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
340
Statistics for Hackers
jakevdp
799
230k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
190
Technical Leadership for Architectural Decision Making
baasie
3
300
Mobile First: as difficult as doing things right
swwweet
225
10k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
What's in a price? How to price your products and services
michaelherold
247
13k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
680
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
420
Deep Space Network (abreviated)
tonyrice
0
97
From π to Pie charts
rasagy
0
160
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