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

Fun with Elixir and the Erlang VM

yawnt
October 05, 2013
230

Fun with Elixir and the Erlang VM

Introduction to Elixir, a metaprogramming friendly language that runs on the top of the Erlang VM.

yawnt

October 05, 2013
Tweet

Transcript

  1. $ git clone \ https://github.com/elixir-lang/elixir.git \ .elixir $ cd .elixir

    $ make test $ echo "PATH=$HOME/.elixir/bin" >> .zshrc $ source .zshrc
  2. “ Elixir is a metaprogrammable, functional language built atop the

    Erlang VM. It is a dynamic language with hygIenic macros that leverages Erlang's ability to build concurrent, distributed, and fault-tolerant applications with hot code upgrades.“ @JosEValim
  3. defmodule MacroTest do defmacro if_not(pred, block) do quote do if(!unquote(pred))

    do unquote(block) end end end def try_unless do if_not 1==2 do IO.puts "hey" end end end
  4. defprotocol Blank do def blank?(data) end defimpl Blank, for: List

    do def blank?([]), do: true def blank?(_), do: false end
  5. “ Elixir is the son of ERLANG and RUBY, but

    Ruby missed out and the real father is LisP.“ @DCH__
  6. NEXT  this talk  Erlang/OTP in Action  elixir-lang.org

     Elixir google groups  Programming Elixir