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
The Missing Link in Angular’s Signal Story: Resource API and httpResource
manfredsteyer
PRO
0
140
ComposeでのPicture in Picture
takathemax
0
140
生成AI時代のフルスタック開発
kenn
4
470
プロフェッショナルとしての成長「問題の深掘り」が導く真のスキルアップ / issue-analysis-and-skill-up
minodriven
8
1.9k
実践Webフロントパフォーマンスチューニング
cp20
45
10k
On-the-fly Suggestions of Rewriting Method Deprecations
ohbarye
3
5.4k
Global Azure 2025 @ Kansai / Hyperlight
kosmosebi
0
140
開発者フレンドリーで顧客も満足?Platformの秘密
algoartis
0
210
Storybookの情報をMCPサーバー化する
shota_tech
2
1k
Носок на сок
bo0om
0
1.3k
JAWS DAYS 2025 re_Cheers: WEB
komakichi
0
120
音声プラットフォームのアーキテクチャ変遷から学ぶ、クラウドネイティブなバッチ処理 (20250422_CNDS2025_Batch_Architecture)
thousanda
0
420
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
91
6k
Embracing the Ebb and Flow
colly
85
4.7k
Fontdeck: Realign not Redesign
paulrobertlloyd
84
5.5k
The Pragmatic Product Professional
lauravandoore
33
6.6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.7k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Statistics for Hackers
jakevdp
799
220k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
The Cult of Friendly URLs
andyhume
78
6.3k
Designing for Performance
lara
608
69k
Reflections from 52 weeks, 52 projects
jeffersonlam
349
20k
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