Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Writing Command Line Applications in Elixir

Writing Command Line Applications in Elixir

Using Elixir to solve small problems.

James Smith

July 25, 2014
Tweet

Other Decks in Programming

Transcript

  1. –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.”
  2. PIPES |> PATTERN MATCHING |> MESSAGE PASSING |> IMMUTABILITY |>

    => {:OK, “ ☺”} ELIXIR OFFERS A DIFFERENT WAY TO THINK ABOUT AND SOLVE PROBLEMS OF ANY SIZE. !
  3. MIX

  4. 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”
  5. UMBRELLA PROJECTS • Run tasks across apps • Run all

    your tests for apps in app_path • Run Applications in dependent order…
  6. IO.ANSI • escape_fragment(string, emit \\ terminal()) • “%{clear, home, green,

    bright} Welcome” • IO.red() IO.green() etc… • home() send the cursor home
  7. 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