Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Fun with Elixir and the Erlang VM
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
yawnt
October 05, 2013
2
260
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
Share
More Decks by yawnt
See All by yawnt
NixOS - Purely Functional Package Management
yawnt
0
1.8k
Open Source as A Service
yawnt
0
230
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.1k
Navigating Weather and Climate Data
rabernat
0
110
What's in a price? How to price your products and services
michaelherold
247
13k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
420
Optimizing for Happiness
mojombo
379
71k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
330
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
30 Presentation Tips
portentint
PRO
1
220
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Transcript
ELIXIR and the Erlang VM Fun with
YAWNT Hey, i’m on &
NODEJITSU I do at
LAZY Erlang concepts for the and the IMPATIENT
functional Erlang is a language
awesome As such, it has lots of features
data Functions are
REcursion It uses to solve problems
Guards
pattern matching
Referential transparency
PROCESSes... But
Unique ... make Erlang
concurrent Processes are
MESSAGES They use to communicate
picture shamelessly ripped from learnyousomEerlang
PEOPLE Processes are like
indEpendent They are
fault They are tolerant
isolated They are
distributed They are
BEAM Why a language on VM ? Recap
concurrent It is and DISTRIBUTED
FAULT tolerant It is
OTP It can use
None
OLD But Erlang is
macros Silly
syntax Clunky
flexibility Little
None
Modern What if we could use a language
None
$ git clone \ https://github.com/elixir-lang/elixir.git \ .elixir $ cd .elixir
$ make test $ echo "PATH=$HOME/.elixir/bin" >> .zshrc $ source .zshrc
“ 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
GOODNESS All the Erlang
PLUS
SYNTAX It has Ruby-inspired
defmodule Hi do def greetings do IO.puts "hi 33dev!" end
end
FRIENDLY It is DSL
defmodule ATest do use ExUnit.Case test "true should be true"
do assert(true == true) end end
MACROS It has powerful
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
protocols It has
defprotocol Blank do def blank?(data) end defimpl Blank, for: List
do def blank?([]), do: true def blank?(_), do: false end
Records It has sane
defrecord Trento, [people: nil, students: 0] do def get_people(city) do
city.people end end
“ Elixir is the son of ERLANG and RUBY, but
Ruby missed out and the real father is LisP.“ @DCH__
None
questions? or hit me up later
</talk> Thanks for listening
NEXT this talk Erlang/OTP in Action elixir-lang.org
Elixir google groups Programming Elixir