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
250
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
34
Disassembling Online Dating - FroSCon 2024
wintermeyer
0
110
Ash Framework - Elixir Kenya February 2024 Webinar
wintermeyer
1
140
The Greener Gras
wintermeyer
0
290
Rails vs. Phoenix vs. Hanami
wintermeyer
0
1.3k
RubyConfBy 2018 talk about WebPerformance with Rails 5.2
wintermeyer
3
370
WebPerformance für Reiseblogger
wintermeyer
0
280
WebPerformance with Rails 5.2
wintermeyer
5
970
FrOSCon 2017 talk about vutuv
wintermeyer
0
540
Other Decks in Technology
See All in Technology
How to achieve interoperable digital identity across Asian countries
fujie
0
120
Goにおける 生成AIによるコード生成の ベンチマーク評価入門
daisuketakeda
2
110
LLM時代にデータエンジニアの役割はどう変わるか?
ikkimiyazaki
4
920
ZOZOのAI活用実践〜社内基盤からサービス応用まで〜
zozotech
PRO
0
200
動画データのポテンシャルを引き出す! Databricks と AI活用への奮闘記(現在進行形)
databricksjapan
0
150
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
9.1k
KMP の Swift export
kokihirokawa
0
340
Findy Team+のSOC2取得までの道のり
rvirus0817
0
380
about #74462 go/token#FileSet
tomtwinkle
1
420
Function calling機能をPLaMo2に実装するには / PFN LLMセミナー
pfn
PRO
0
970
Modern_Data_Stack最新動向クイズ_買収_AI_激動の2025年_.pdf
sagara
0
220
ユニットテストに対する考え方の変遷 / Everyone should watch his live coding
mdstoy
0
130
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
51k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
Scaling GitHub
holman
463
140k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
YesSQL, Process and Tooling at Scale
rocio
173
14k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
189
55k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
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