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

Elixir Helsinki Meetup March 26th 2015 - Introd...

Elixir Helsinki Meetup March 26th 2015 - Introduction to Elixir

The very 1st Helsinki Elixir Meetup.

Avatar for Teemu Harju

Teemu Harju

March 26, 2015
Tweet

More Decks by Teemu Harju

Other Decks in Programming

Transcript

  1. TITLE (click Header/Footer to change) ELIXIR HELSINKI MEETUP MARCH 26TH

    2015 
 ELIXIR INTRODUCTION Teemu Harju Lead Server Programmer Ministry Of Games @tsharju @MinistryGames @ElixirHelsinki
  2. Elixir Introduction ELIXIR PROGRAMMING LANGUAGE 26-Mar-15 2 “Elixir is a

    dynamic, functional language designed for building scalable and maintainable applications.” elixir-lang.org
  3. YOU KNOW ERLANG? 3 • Made for building massively scalable,

    soft real-time, high-availability systems. • Dynamically typed functional language. • “Few languages have the mystique of Erlang, the concurrency language that makes hard things easy and easy things hard. ” Bruce Tate - Seven Languages in Seven Weeks • Lightweight processes. • Message passing concurrency. http://en.wikipedia.org/wiki/ Erlang_(programming_language)
  4. Elixir Introduction ELIXIR PROGRAMMING LANGUAGE 26-Mar-15 4 • Runs on

    BEAM.* • The Erlang virtual machine. • Lightweight, massive concurrency. • Soft real-time. • Pre-emptive scheduler (no futures, promises or callbacks). • Efficient garbage collector. • Functional language. • Immutable data. • Pattern matching. • Metaprogramming. • Polymorphism. *Bogdan/Björn's Erlang Abstract Machine
  5. Elixir Introduction ELIXIR PROGRAMMING LANGUAGE 26-Mar-15 6 • Doesn’t suffer

    from NIH syndrome. • Syntax from Ruby. • Pipe operator from F#. • Nested data structure handling from Clojure. • Kernel.put_in, Kernel.get_in, Kernel.update_in • String sigils from Python. • The Elixir.Task from .NET Task Parallel Library. • The Elixir.Agent • Lowering the barriers to functional programming.
  6. Elixir Introduction ELIXIR PROGRAMMING LANGUAGE 26-Mar-15 7 • OTP -

    the Open Telecom Platform. • The server application framework for Erlang. • Supervisors, FSMs, event handlers, logging, hot code loading etc… • Basically all you need for building a server application. • Very reliable (understatement). • Elixir benefits greatly from OTP. • Elixir compiles directly to Erlang BEAM byte code. • Interfacing Erlang code is very simple. • Many Elixir modules are built on top of OTP equivalents.
  7. Elixir Introduction ELIXIR PROGRAMMING LANGUAGE 26-Mar-15 10 • But Elixir

    is fairly new language. Is it reliable/stable/performant? • Erlang VM has been very thoroughly battle tested in real life situations. • Elixir 1.0 was released last summer. The APIs are stable and you can start building stuff. • Compiles to Erlang, so the difference to writing Erlang is close to zero. • Is Erlang performant? Depends on what you do with it. (WhatsApp)
  8. Elixir Introduction ELIXIR PROGRAMMING LANGUAGE 26-Mar-15 11 • What can

    I do with it? • Write awesome web apps. http://www.phoenixframework.org • How about your very own distributed key/value storage? http://elixir-lang.org/getting- started/mix-otp/introduction-to-mix.html#our-first-project • A game server. That’s what we’re doing. • Where I can learn more? • Here. http://elixir-lang.org/learning.html
  9. Elixir Introduction ELIXIR HELSINKI MEETUP 26-Mar-15 12 • Chance to

    meet other Elixir developers and share experiences. • Nothing too formal. • Always try to provide access to some Sauna and beer. We’re Finns after all.* • Would be cool to collaborate in projects and share learnings. That’s what this is all about. • Topics for future meetups: • Metaprogramming. • Release handling. • Your cool Elixir library? • I think Elixir is cool/not cool because? * Sauna might be a bit difficult to arrange at times and definitely is not mandatory to participate if you’re scared of naked guys running around.