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
65
Disassembling Online Dating - FroSCon 2024
wintermeyer
0
160
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タイプと暗黙考・暗黙動へ
masayamoriofficial
0
1.1k
今年60歳のおっさんCBになる
kentapapa
1
360
OpenClaw初心者向けセミナー / OpenClaw Beginner Seminar
cmhiranofumio
0
370
Strands Agents × Amazon Bedrock AgentCoreで パーソナルAIエージェントを作ろう
yokomachi
2
260
2026年度新卒技術研修 サイバーエージェントのデータベース 活用事例とパフォーマンス調査入門
cyberagentdevelopers
PRO
6
7.2k
組織的なAI活用を阻む 最大のハードルは コンテキストデザインだった
ixbox
6
1.4k
Claude Teamプランの選定と、できること/できないこと
rfdnxbro
1
1.9k
あるアーキテクチャ決定と その結果/architecture-decision-and-its-result
hanhan1978
2
570
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
1.4k
解剖"React Native"
hacusk
0
120
Discordでリモートポケカしてたら、なぜかDOを25分間動かせるようになった話
umireon
0
110
Data Enabling Team立ち上げました
sansantech
PRO
0
300
Featured
See All Featured
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
160
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.5k
Typedesign – Prime Four
hannesfritz
42
3k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Building the Perfect Custom Keyboard
takai
2
720
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
140
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.4k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
110
Everyday Curiosity
cassininazir
0
190
So, you think you're a good person
axbom
PRO
2
2k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
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