Your SlideShare is downloading. ×
An introduction to Erlang and Elixir
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

An introduction to Erlang and Elixir


Published on

Published in: Technology, News & Politics

  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. AN INTRODUCTION TO ERLANG AND ELIXIR Wednesday, September 25, 13
  • 2. WHAT IS ERLANG Modular, Declarative Language who’s syntax descends from prolog Wednesday, September 25, 13
  • 3. WHAT IS ELIXIR Modular, Declarative language with meta programming facilities whose syntax descends (mostly) from Ruby Wednesday, September 25, 13
  • 4. ERLANG VM - WHY SO INTERESTING Built Around Concurrency Built in scheduler Async IO Concurrent Garbage collector Wednesday, September 25, 13
  • 5. ERLANG VM - WHY SO INTERESTING Small Number of Serializable Types Pattern Matching Processes Process Linking Immutable Data Wednesday, September 25, 13
  • 6. ERLANG VM Erlang Elixir Joxa LFE The Concurrent Schemer Reia Wednesday, September 25, 13
  • 7. ERLANG VM - TYPES Numbers Atoms Bit Strings and Binaries Fun Tuple List Wednesday, September 25, 13
  • 8. ERLANG VM - FEATURES Expressions Functions Modules Process Wednesday, September 25, 13
  • 9. RECORDS - ERLANG -module(records). -record(robot, {name, type=industrial, hobbies, details=[]}). first_robot() -> #robot{name="Mechatron", type=handmade, details=["Moved by a small man inside"]}. Wednesday, September 25, 13
  • 10. RECORDS - ELIXIR defmodule Records do defrecord Robots, name: nil, type: industrial, hobbies: nil, details: ["Moved by a small man inside"] def first_robot do "Mechatron", type: :handmade, details: ["Moved by a small man inside"]) end end Wednesday, September 25, 13
  • 11. POLYMORPHISM - ELIXIR defprotocol Blank do @doc "Returns true if data is considered blank/empty" def blank?(data) end # Numbers are never blank defimpl Blank, for: Number do def blank?(_), do: false end # Just empty list is blank defimpl Blank, for: List do def blank?([]), do: true def blank?(_), do: false end # Just the atoms false and nil are blank defimpl Blank, for: Atom do def blank?(false), do: true def blank?(nil), do: true def blank?(_), do: false end Wednesday, September 25, 13
  • 12. METAPROGRAMMING - ELIXIR defmodule MyMacro do defmacro unless(clause, options) do quote do: if(!unquote(clause), unquote(options)) end end require MyMacro unless 2 + 2 == 5, do: call_function() Wednesday, September 25, 13
  • 13. DOWNSIDES - ERLANG No Metaprogramming No Polymorphism (mostly) Obscure Syntax Records are horrible Wednesday, September 25, 13
  • 14. DOWNSIDES - ELIXIR Its young, so changes a fair amount Truthiness is the devil Macros are not sufficiently flexible (as what I am used to in lisp) Awkward syntax Fair amount of inconsistency Not really accepted by Erlangers Wednesday, September 25, 13
  • 15. UPSIDES - ERLANG Simple, Regular Syntax Stable - Infrequent Changes Robust and Extraordinarily well tested Wednesday, September 25, 13
  • 16. UPSIDES - ELIXIR Metaprogramming, Metaprogramming, Metaprogramming Polymorphism Non stable (ie, improving) syntax Robust, usable shell Did I say metaprogramming Wednesday, September 25, 13
  • 17. WRAPPING UP Rate This Talk - introduction-to-erlang-elixir-eric-merritt Contact me - @ericbmerritt,, Wednesday, September 25, 13