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.6k
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
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
720
SourceGeneratorのススメ
htkym
0
190
CSC307 Lecture 04
javiergs
PRO
0
660
高速開発のためのコード整理術
sutetotanuki
1
400
今から始めるClaude Code超入門
448jp
8
8.6k
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
MUSUBIXとは
nahisaho
0
130
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
5
430
AI & Enginnering
codelynx
0
110
Featured
See All Featured
Paper Plane
katiecoart
PRO
0
46k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
250
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Optimising Largest Contentful Paint
csswizardry
37
3.6k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
640
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The Curious Case for Waylosing
cassininazir
0
230
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
290
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
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