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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
James Smith
July 25, 2014
Programming
1.6k
7
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Writing Command Line Applications in Elixir
Using Elixir to solve small problems.
James Smith
July 25, 2014
Other Decks in Programming
See All in Programming
その節約、円になってますか?
isamumumu
1
700
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
0
130
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
160
仕様書を書く前にハーネスを作る - Agent Native開発は「探索を速く、判定を固く」
gotalab555
4
1.6k
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
4
1.9k
OpenSpecのproposalにbrainstormingを持たせてみた
tigertora7571
1
200
FDEが実現するAI駆動経営の現在地
gonta
2
270
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
240
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
210
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
760
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
150
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
18k
Featured
See All Featured
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
170
So, you think you're a good person
axbom
PRO
2
2.1k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
430
The Mindset for Success: Future Career Progression
greggifford
PRO
0
440
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
670
Designing for Performance
lara
611
70k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
490
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
The Pragmatic Product Professional
lauravandoore
37
7.4k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.3k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
430
WCS-LA-2024
lcolladotor
0
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