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
マイベストのシンプルなデータ基盤の話 - Googleスイートとのつき合い方 / mybest-simple-data-architecture-google-nized
snhryt
0
110
GitHub Copilotを使いこなせ!/mastering_github_copilot!
kotakageyama
2
650
iOSでSVG画像を扱う
kishikawakatsumi
0
180
品質ワークショップをやってみた
nealle
0
840
スキーマ駆動で、Zod OpenAPI Honoによる、API開発するために、Hono Takibiというライブラリを作っている
nakita628
0
330
ネストしたdata classの面倒な更新にさようなら!Lensを作って理解するArrowのOpticsの世界
shiita0903
1
230
マンガアプリViewerの大画面対応を考える
kk__777
0
440
オンデバイスAIとXcode
ryodeveloper
0
370
フロントエンド開発のためのブラウザ組み込みAI入門
masashi
7
3.7k
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
34k
Webサーバーサイド言語としてのRustについて
kouyuume
1
5k
Introducing RemoteCompose: break your UI out of the app sandbox.
camaelon
2
350
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
412
23k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1k
Six Lessons from altMBA
skipperchong
29
4k
Context Engineering - Making Every Token Count
addyosmani
8
330
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Mobile First: as difficult as doing things right
swwweet
225
10k
Into the Great Unknown - MozCon
thekraken
40
2.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Unsuck your backbone
ammeep
671
58k
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