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
家族・子育て重視/沖縄在住を維持しながらエンジニアとしてのキャリアをどのように育てていくか?
ug
0
260
リアクティブシステムの変遷から理解するalien-signals / Learning alien-signals from the evolution of reactive systems
yamanoku
2
1.2k
custom_lintで始めるチームルール管理
akaboshinit
0
190
Coding Experience Cpp vs Csharp - meetup app osaka@9
harukasao
0
610
地域ITコミュニティの活性化とAWSに移行してみた話
yuukis
0
190
AHC045_解説
shun_pi
0
300
Being an ethical software engineer
xgouchet
PRO
0
170
DataStoreをテストする
mkeeda
0
260
Windows版PHPのビルド手順とPHP 8.4における変更点
matsuo_atsushi
0
390
CRE Meetup!ユーザー信頼性を支えるエンジニアリング実践例の発表資料です
tmnb
0
570
ベクトル検索システムの気持ち
monochromegane
30
9.6k
AtCoder Heuristic First-step Vol.1 講義スライド
terryu16
3
1.1k
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
17
1.1k
A Tale of Four Properties
chriscoyier
158
23k
The Cult of Friendly URLs
andyhume
78
6.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
29
2k
Practical Orchestrator
shlominoach
186
10k
Typedesign – Prime Four
hannesfritz
41
2.6k
Optimizing for Happiness
mojombo
377
70k
Rails Girls Zürich Keynote
gr2m
94
13k
YesSQL, Process and Tooling at Scale
rocio
172
14k
The Language of Interfaces
destraynor
157
24k
Building a Modern Day E-commerce SEO Strategy
aleyda
39
7.2k
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