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
67
Disassembling Online Dating - FroSCon 2024
wintermeyer
0
160
Ash Framework - Elixir Kenya February 2024 Webinar
wintermeyer
1
180
The Greener Gras
wintermeyer
0
350
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
350
WebPerformance with Rails 5.2
wintermeyer
5
1k
FrOSCon 2017 talk about vutuv
wintermeyer
0
580
Other Decks in Technology
See All in Technology
AI時代にデータ基盤が持つべきCapabilityを考える + Snowflake Data Superheroやっていき宣言 / Considering the Capabilities Data Platforms Should Have in the AI Era + Declaration of Commitment as a Snowflake Data Superhero
civitaspo
0
110
小説執筆のハーネスエンジニアリング
yoshitetsu
0
320
Claude Code を安全に使おう勉強会 / Claude Code Security Basics
masahirokawahara
2
21k
CloudSec JP #005 後締め ~ソフトウェアサプライチェーン攻撃から開発者のシークレットを守る~
lhazy
0
230
AIを共同作業者にして書籍を執筆する方法 / How to Write a Book with AI as a Co-Creator
ama_ch
2
130
AWS認定資格は本当に意味があるのか?
nrinetcom
PRO
1
260
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
390
[最強DB講義]推薦システム | 基礎編
recsyslab
PRO
1
150
MLOps導入のための組織作りの第一歩
akasan
0
310
JEDAI in Osaka 2026イントロ
taka_aki
0
280
自分のハンドルは自分で握れ! ― 自分のケイパビリティを増やし、メンバーのケイパビリティ獲得を支援する ― / Take the wheel yourself
takaking22
1
840
社内エンジニア勉強会の醍醐味と苦しみ/tamadev
nishiuma
0
130
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
141
7.4k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
220
Code Review Best Practice
trishagee
74
20k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
140
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
450
Ruling the World: When Life Gets Gamed
codingconduct
0
210
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.6k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
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