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

5 minutes with Elixir

5 minutes with Elixir

My lightning talk from Brighton Ruby 2016 where we tour the highlights of Elixir and the surrounding ecosystem.

Andy Pike

July 05, 2016
Tweet

More Decks by Andy Pike

Other Decks in Programming

Transcript

  1. def convert(units, :miles_to_km) do units * 1.6 end def convert(units,

    :km_to_miles) do units / 1.6 end IO.puts convert(16, :km_to_miles) # => 10.0
  2. defmodule Brighton do def hello do receive do { :say,

    text } -> IO.puts(text) { :think, text } -> Logger.debug(text) end end end pid = spawn(Brighton, :hello, []) send pid, { :say, "Hello Brighton Ruby" }
  3. defmodule Hello.PageController do use Hello.Web, :controller def index(conn, _params) do

    conn |> assign(:name, "Andy") |> render("index.html") end end Controller
  4. Metaprogramming Ecto Doctests Enum IEX Comprehensions Hot upgrades T ail

    Call Optimisation Mix Hex Credo ExUnit [ head | tail ] Nodes Plug