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.4k
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
CQRS/ES avec Symfony, c’est (trop) bien !
jeremyfreeagent
1
630
甘い香りに誘われてVanilla Extractを1年間運用してみた
miyahkun
1
110
From Spring Boot 2 to Spring Boot 3 with Java 22 and Jakarta EE
ivargrimstad
0
900
Front-end application development, Symfony-style(s)
dunglas
2
1.9k
Rails と人魚の話/rails-and-mermaid
sanfrecce_osaka
0
100
PostmanでAPIの動作確認が楽になった話
h455h1
0
130
ログラスを支える設計標準について / loglass-design-standards
urmot
10
2.1k
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
300
Folding Cheat Sheet #1
philipschwarz
PRO
0
210
Git Rebase
bkuhlmann
11
1.6k
Blue/Greenデプロイの導入による 運用フローの改善
kudoas
1
350
Ruby製社内ツールのGo移行
bgpat
2
330
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
237
11k
KATA
mclloyd
14
12k
What the flash - Photography Introduction
edds
64
11k
Typedesign – Prime Four
hannesfritz
36
2.1k
The Straight Up "How To Draw Better" Workshop
denniskardys
227
130k
Git: the NoSQL Database
bkeepers
PRO
422
63k
Atom: Resistance is Futile
akmur
258
25k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
20
1.6k
Mobile First: as difficult as doing things right
swwweet
216
8.6k
Into the Great Unknown - MozCon
thekraken
10
980
Building Effective Engineering Teams - LeadDev
addyosmani
27
1.8k
Why Our Code Smells
bkeepers
PRO
331
56k
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