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
290
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
87
Disassembling Online Dating - FroSCon 2024
wintermeyer
0
170
Ash Framework - Elixir Kenya February 2024 Webinar
wintermeyer
1
190
The Greener Gras
wintermeyer
0
380
Rails vs. Phoenix vs. Hanami
wintermeyer
0
1.4k
RubyConfBy 2018 talk about WebPerformance with Rails 5.2
wintermeyer
3
420
WebPerformance für Reiseblogger
wintermeyer
0
360
WebPerformance with Rails 5.2
wintermeyer
5
1k
FrOSCon 2017 talk about vutuv
wintermeyer
0
600
Other Decks in Technology
See All in Technology
CloudWatchから始めるAWS監視
butadora
0
310
AI エージェント時代のデジタルアイデンティティ
fujie
2
1.3k
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
データ組織の転換期 一足飛びしない段階的戦略
leveragestech
PRO
0
140
QAと開発の両側から進める AI活用 -QAプロセスAI支援ツールキットと Inner Loop / Outer Loopの取り組み-
legalontechnologies
PRO
2
400
LangfuseによるLLMOps基盤の構築と活用事例
zozotech
PRO
1
220
Amazon Bedrock Managed Knowledge BaseDive Deep
ren8k
0
320
エンタープライズデータへ安全につなぐ Production-ready なエージェント設計 ― AI × MCP リファレンスアーキテクチャ ― #AIDevDay
cdataj
1
450
AIがAPIを書く時代に、私たちは何を設計すべきか
nagix
0
200
システム監視を 「システムを監視するだけ」で 終わらせないために
seiud
0
160
コンポーネント名には何を含めるべきなのか? / what-should-be-included-in-component-names
airrnot1106
0
230
plamo-3-translateの開発
pfn
PRO
0
240
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Abbi's Birthday
coloredviolet
3
8.9k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
400
Amusing Abliteration
ianozsvald
1
240
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Accessibility Awareness
sabderemane
1
170
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
560
Skip the Path - Find Your Career Trail
mkilby
1
170
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
230
Documentation Writing (for coders)
carmenintech
77
5.4k
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