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
220
Elixir Mini Introduction for Zürich Meetup
Stefan Wintermeyer
February 20, 2017
Tweet
Share
More Decks by Stefan Wintermeyer
See All by Stefan Wintermeyer
Disassembling Online Dating - FroSCon 2024
wintermeyer
0
72
Ash Framework - Elixir Kenya February 2024 Webinar
wintermeyer
1
110
The Greener Gras
wintermeyer
0
260
Rails vs. Phoenix vs. Hanami
wintermeyer
0
1.3k
RubyConfBy 2018 talk about WebPerformance with Rails 5.2
wintermeyer
3
350
WebPerformance für Reiseblogger
wintermeyer
0
230
WebPerformance with Rails 5.2
wintermeyer
5
950
FrOSCon 2017 talk about vutuv
wintermeyer
0
490
Lonestar ElixirConf 2017 talk about vutuv and Phoenix
wintermeyer
1
440
Other Decks in Technology
See All in Technology
生成AIによるCloud Native基盤構築の可能性と実践的ガードレールの敷設について
nwiizo
7
1.4k
AIとSREで「今」できること
honmarkhunt
3
680
genspark_presentation.pdf
haruki_uiru
0
130
ビジネスとデザインとエンジニアリングを繋ぐために 一人のエンジニアは何ができるか / What can a single engineer do to connect business, design, and engineering?
kaminashi
2
860
クラウド開発環境Cloud Workstationsの紹介
yunosukey
0
220
3D生成AIのための画像生成
kosukeito
2
580
ガバクラのAWS長期継続割引 ~次の4/1に慌てないために~
hamijay_cloud
1
570
白金鉱業Meetup_Vol.18_生成AIはデータサイエンティストを代替するのか?
brainpadpr
4
220
Как мы автоматизировали интеграционное тестирование с Gonkey и не пожалели. Паша Егорычев, Кирилл Поляков
lamodatech
0
1.6k
Databricksで完全履修!オールインワンレイクハウスは実在した!
akuwano
0
140
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
5.4k
AIと共に乗り越える、 入社後2ヶ月の苦労と学習の軌跡
sai_kaneko
0
190
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
13
820
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
14
1.4k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.5k
A Modern Web Designer's Workflow
chriscoyier
693
190k
How STYLIGHT went responsive
nonsquared
100
5.5k
RailsConf 2023
tenderlove
30
1.1k
Making the Leap to Tech Lead
cromwellryan
133
9.2k
Faster Mobile Websites
deanohume
306
31k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.8k
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