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
flutter_kaigi_2025.pdf
kyoheig3
1
360
Flutterアプリ運用の現場で役立った監視Tips 5選
ostk0069
1
520
分散DBって何者なんだ... Spannerから学ぶRDBとの違い
iwashi623
0
120
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
140
競馬で学ぶ機械学習の基本と実践 / Machine Learning with Horse Racing
shoheimitani
14
14k
TypeScript 5.9 で使えるようになった import defer でパフォーマンス最適化を実現する
bicstone
1
500
しっかり学ぶ java.lang.*
nagise
1
460
Chart.jsで長い項目を表示するときのハマりどころ
yumechi
0
160
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
7
2.7k
知られているようで知られていない JavaScriptの仕様 4選
syumai
0
640
生成AIを活用したリファクタリング実践 ~コードスメルをなくすためのアプローチ
raedion
0
140
手軽に積ん読を増やすには?/読みたい本と付き合うには?
o0h
PRO
1
110
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
Six Lessons from altMBA
skipperchong
29
4.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Being A Developer After 40
akosma
91
590k
Why Our Code Smells
bkeepers
PRO
340
57k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
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