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
Writing Command Line Applications in Elixir
Search
James Smith
July 25, 2014
Programming
7
1.5k
Writing Command Line Applications in Elixir
Using Elixir to solve small problems.
James Smith
July 25, 2014
Tweet
Share
Other Decks in Programming
See All in Programming
Synchronizationを支える技術
s_shimotori
1
150
gopls を改造したら開発生産性が高まった
satorunooshie
8
240
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
930
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
23k
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
210
WEBエンジニア向けAI活用入門
sutetotanuki
0
300
Googleのテストサイズを活用したテスト環境の構築
toms74209200
0
270
qmuntal/stateless のススメ
sgash708
0
120
Vaporモードを大規模サービスに最速導入して学びを共有する
kazukishimamoto
4
4.3k
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
23
11k
ECSのサービス間通信 4つの方法を比較する 〜Canary,Blue/Greenも添えて〜
tkikuc
11
2.3k
のびしろを広げる巻き込まれ力:偶然を活かすキャリアの作り方/oso2024
takahashiikki
1
410
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
19
1.1k
Adopting Sorbet at Scale
ufuk
73
9k
Code Reviewing Like a Champion
maltzj
519
39k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
1.9k
Become a Pro
speakerdeck
PRO
24
5k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
3
370
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
14
1.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Learning to Love Humans: Emotional Interface Design
aarron
272
40k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
790
Transcript
HELLO SEND(AUDIENCE, {:GREETING, “HELLO!”})
None
None
–interested programmer “I'd love to check out Elixir but I
don't really have a problem that is big enough that Elixir is well suited for.”
None
MASSIVELY CONCURRENT DISTRIBUTED FAULT TOLERANT WEB SCALE FUNCTIONAL
PIPES |> PATTERN MATCHING |> MESSAGE PASSING |> IMMUTABILITY |>
=> {:OK, “ ☺”} ELIXIR OFFERS A DIFFERENT WAY TO THINK ABOUT AND SOLVE PROBLEMS OF ANY SIZE. !
None
WRITING COMMANDLINE APPS WITH ELIXIR
None
None
MIX
DEPENDENCIES Hex package Git/SCM Path Dependency tasks mix deps: “lists
all deps and their status” mix deps.get “Get non installed dependencies” mix deps.compile mix deps.update mix deps.clean “Remove all dependency files” mix deps.unlock “Unlock dependencies”
None
UMBRELLA PROJECTS • Run tasks across apps • Run all
your tests for apps in app_path • Run Applications in dependent order…
MIX TASKS
RUNNING OUR APPS MIX ESCRIPT.BUILD
None
None
None
BASIC IO
TESTING IO
IO.ANSI • escape_fragment(string, emit \\ terminal()) • “%{clear, home, green,
bright} Welcome” • IO.red() IO.green() etc… • home() send the cursor home
FILES AND PATHS • File.open • File.close • File.read •
binread/write utf8 and IO module • File.read vs File.read! • Path.join and Path.expand • Path.wildcard
PORT
BASIC USAGE
DEMO
SCALING UP COMMAND LINE APPS WITH TASKS & AGENTS
TASKS
AGENTS a simple abstraction around state
DEMO DEMO
THANK YOU