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
130
Elixir Mini Introduction for Zürich Meetup
Stefan Wintermeyer
February 20, 2017
Tweet
Share
More Decks by Stefan Wintermeyer
See All by Stefan Wintermeyer
Ash Framework - Elixir Kenya February 2024 Webinar
wintermeyer
1
33
The Greener Gras
wintermeyer
0
190
Rails vs. Phoenix vs. Hanami
wintermeyer
0
1.1k
RubyConfBy 2018 talk about WebPerformance with Rails 5.2
wintermeyer
3
230
WebPerformance für Reiseblogger
wintermeyer
0
150
WebPerformance with Rails 5.2
wintermeyer
5
840
FrOSCon 2017 talk about vutuv
wintermeyer
0
340
Lonestar ElixirConf 2017 talk about vutuv and Phoenix
wintermeyer
1
390
WebPerformance Meetup in Cologne (Feb. 2017)
wintermeyer
1
150
Other Decks in Technology
See All in Technology
令和版ソフトウェアエンジニアの情報収集術 PHPカンファレンス香川2024
ysknsid25
4
920
グイグイ系QAエンジニアでやっていくよ!
____rina____
0
800
The depthes of profiling Ruby - RubyKaigi 2024
osyoyu
1
320
社内での継続的な機械学習勉強会の開催のコツ
yudai00
2
410
ITエンジニアを取り巻く環境とキャリアパス / A career path for Japanese IT engineers
takatama
3
1.2k
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
12
8k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
38k
CloudflareとHonoを使って飲食店のレビューができるLINEアプリを作った
shinaps
2
850
スクラムに出会って「できた」を実感できるようになってきた話 / Scrum makes me feel like I can do it
yayoi_dd
2
120
日本が誇るイタリアのダンスミュージック!? ユーロビートって何??
minorun365
PRO
2
240
生成AI活用推進の為にやったこと/やらなかったこと
ktc_wada
0
230
【TSkaigi】2024/05/11 当日スライド
kimitashoichi
14
4.1k
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
12
1.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
23
1.7k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
10 Git Anti Patterns You Should be Aware of
lemiorhan
649
58k
For a Future-Friendly Web
brad_frost
172
9k
Thoughts on Productivity
jonyablonski
60
3.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
356
18k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
21
2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
1
140
Clear Off the Table
cherdarchuk
86
310k
Being A Developer After 40
akosma
67
580k
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