SlideShare a Scribd company logo
Elixir for Rubyists
A short introduction
PRESENTATION
By Maarten van Vliet
Maarten van Vliet
Backend developer @ Awkward
github: maartenvanvliet
website: maartenvanvliet.nl
About me
We build digital
products
About Awkward
We are hiring!
• Come talk to me afterwards
Elixir for Rubyists
• About Ruby and why I like it
• What is Elixir
• A short history of Elixir
• Elixir and Ruby
First:
I Ruby
Why I love Ruby?
Community
Developer Experience
Ecosystem
Community
Welcoming
Friendly
Fun
Developer experience
Tooling
Syntax
Expressiveness
$rails generate model User name:string
$rails db:migrate
class User < ApplicationRecord
  validates :name, presence: true
has_many :events
end
 
user = User.new
user.save
Ecosystem
There’s a gem for everything
High quality
Productive
This is why
I Ruby
If Ruby is so
awesome…
Why Elixir?
• Dynamic functional programming
language
• Erlang VM
• Scalable
• Distributed
• Fault tolerant
What is Elixir?
Elixir has its roots in the Ruby/Rails
community
It was founded by Jose Valim in 2011
Former Rails Core team member
Author of Devise the Rails
authentication gem
Making Rails threadsafe
History of Elixir
Jose had the need for a better
concurrency story
Explored multiple technologies (e.g.
Clojure, Erlang)
Then he built Elixir on the Erlang
Virtual Machine
Leverage multiple cores
• Cheap processes
• Isolated from each other
• Can run concurrently
Why Elixir?
Similar aims as Ruby
More explicit
DSL’s
Metaprogramming at compile time
Language features
$mix phx.gen.schema User users name:string
$mix ecto.migrate
defmodule User do
use Ecto.Schema
  schema “users” do
field :name, :string
has_many :events, Blog.Event
end
def changeset(user, params  %{}) do
user
|> cast(params, [:name])
|> validate_required([:name])
end
end
 
user = User.changeset(%User{})
Repo.insert(user)
Ruby roots
Similar to chaining in Ruby
When you pipe into a function, its
first argument is placed before the
|> character.
So, the list is passed to the
Enum.map function then it is
squared, filtered and summed
Was proposed for Ruby but would
work the same as the “.” chaining
operator
Piping operator# Elixir
[1, 2, 3, 4]
|> Enum.map(fn x -> x*x end)
|> Enum.filter(fn x -> x > 1 end)
|> Enum.sum
29
# Ruby
[1,2,3,4].
map{|x| x*x }.
select{|x| x > 1}.
sum
29
Also introduced as experiment in
Ruby 2.7
Cross pollination
Works on function heads
Pattern matching#elixir
user = %User{
name: “Alice”
}
def get_name(%{name: name}) do
name
end
def get_name(_) do
nil
end
get_name(user)
“Alice”
get_name(1)
nil
The ecosystem provides unique
features
Immutability
Erlang VM
Fast/scalable
Realtime features
Phoenix Liveview
Why use it then?
Ruby and Elixir
Community
Developer Experience
Ecosystem
Shared values
Community
• Like Ruby, welcoming and friendly
community
• elixirforum.com

• elixir-lang.slack.com
Shared values
Developer experience
• Focussed on developer happiness/
tooling

• Productive and expressive code

• Well documented
• Built-in test framework
• Fast and concurrent




Shared values
Ecosystem
• hex.pm package manager
• Hexdocs - each package can publish
its documentation

• High quality libraries e.g.
• Phoenix - web framework
• Ecto - Data access layer
• Absinthe - graphql framework




Shared values
Takeaways
Shares many of the values that Ruby has
Many familiar concepts
Try it out sometime!
It's awesome
March 12
Elixir Meetup in Rotterdam
Awkward & Equalture will host
an Elixir meetup at Startdock
Westplein 12-14
6 - 9 pm
Sign up now at meetup.com
March 25
Elixir Workshop
Rotterdam.rb
At Beequp
6 - 9 pm
Sign up now at meetup.com
Any questions?

More Related Content

What's hot

Building an aws sdk for Perl - Granada Perl Workshop 2014
Building an aws sdk for Perl - Granada Perl Workshop 2014Building an aws sdk for Perl - Granada Perl Workshop 2014
Building an aws sdk for Perl - Granada Perl Workshop 2014
Jose Luis Martínez
 
Beam me up, scotty (PUG Roma)
Beam me up, scotty (PUG Roma)Beam me up, scotty (PUG Roma)
Beam me up, scotty (PUG Roma)
Gianluca Padovani
 
Paws - A Perl AWS SDK
Paws - A Perl AWS SDKPaws - A Perl AWS SDK
Paws - A Perl AWS SDK
Jose Luis Martínez
 
Paws - Perl AWS SDK Update - November 2015
Paws - Perl AWS SDK Update - November 2015Paws - Perl AWS SDK Update - November 2015
Paws - Perl AWS SDK Update - November 2015
Jose Luis Martínez
 
Ruby and Rails short motivation
Ruby and Rails short motivationRuby and Rails short motivation
Ruby and Rails short motivation
jistr
 
Java to scala
Java to scalaJava to scala
Java to scala
Graham Tackley
 
MongoDB .local Chicago 2019: REST-less Mobile Apps: Why Offline-first & Sync ...
MongoDB .local Chicago 2019: REST-less Mobile Apps: Why Offline-first & Sync ...MongoDB .local Chicago 2019: REST-less Mobile Apps: Why Offline-first & Sync ...
MongoDB .local Chicago 2019: REST-less Mobile Apps: Why Offline-first & Sync ...
MongoDB
 
Akka introtalk HyScala DEC 2016
Akka introtalk HyScala DEC 2016Akka introtalk HyScala DEC 2016
Akka introtalk HyScala DEC 2016
PrasannaKumar Sathyanarayanan
 
Messaging patterns
Messaging patternsMessaging patterns
Messaging patterns
John Nestor
 
Messaging Patterns with Akka (Remote) Actors
Messaging Patterns with Akka (Remote) ActorsMessaging Patterns with Akka (Remote) Actors
Messaging Patterns with Akka (Remote) Actors
Dragos Manolescu
 
MVC Gems
MVC GemsMVC Gems
MVC Gems
Kir Shatrov
 
DDD loves Actor Model and Actor Model loves Elixir
DDD loves Actor Model and Actor Model loves ElixirDDD loves Actor Model and Actor Model loves Elixir
DDD loves Actor Model and Actor Model loves Elixir
Gianluca Padovani
 
Scala elegant and exotic part 1
Scala  elegant and exotic part 1Scala  elegant and exotic part 1
Scala elegant and exotic part 1
VulcanMinds
 
Day 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application ArchitectureDay 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application Architecture
Barry Jones
 
Day 2 - Intro to Rails
Day 2 - Intro to RailsDay 2 - Intro to Rails
Day 2 - Intro to Rails
Barry Jones
 
Actor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupActor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder Meetup
Apcera
 
Day 1 - Intro to Ruby
Day 1 - Intro to RubyDay 1 - Intro to Ruby
Day 1 - Intro to Ruby
Barry Jones
 
Develop realtime web with Scala and Xitrum
Develop realtime web with Scala and XitrumDevelop realtime web with Scala and Xitrum
Develop realtime web with Scala and Xitrum
Ngoc Dao
 
Children of Ruby
Children of RubyChildren of Ruby
Children of Ruby
Simon St.Laurent
 
Rest API
Rest APIRest API
Rest API
Phil Aylesworth
 

What's hot (20)

Building an aws sdk for Perl - Granada Perl Workshop 2014
Building an aws sdk for Perl - Granada Perl Workshop 2014Building an aws sdk for Perl - Granada Perl Workshop 2014
Building an aws sdk for Perl - Granada Perl Workshop 2014
 
Beam me up, scotty (PUG Roma)
Beam me up, scotty (PUG Roma)Beam me up, scotty (PUG Roma)
Beam me up, scotty (PUG Roma)
 
Paws - A Perl AWS SDK
Paws - A Perl AWS SDKPaws - A Perl AWS SDK
Paws - A Perl AWS SDK
 
Paws - Perl AWS SDK Update - November 2015
Paws - Perl AWS SDK Update - November 2015Paws - Perl AWS SDK Update - November 2015
Paws - Perl AWS SDK Update - November 2015
 
Ruby and Rails short motivation
Ruby and Rails short motivationRuby and Rails short motivation
Ruby and Rails short motivation
 
Java to scala
Java to scalaJava to scala
Java to scala
 
MongoDB .local Chicago 2019: REST-less Mobile Apps: Why Offline-first & Sync ...
MongoDB .local Chicago 2019: REST-less Mobile Apps: Why Offline-first & Sync ...MongoDB .local Chicago 2019: REST-less Mobile Apps: Why Offline-first & Sync ...
MongoDB .local Chicago 2019: REST-less Mobile Apps: Why Offline-first & Sync ...
 
Akka introtalk HyScala DEC 2016
Akka introtalk HyScala DEC 2016Akka introtalk HyScala DEC 2016
Akka introtalk HyScala DEC 2016
 
Messaging patterns
Messaging patternsMessaging patterns
Messaging patterns
 
Messaging Patterns with Akka (Remote) Actors
Messaging Patterns with Akka (Remote) ActorsMessaging Patterns with Akka (Remote) Actors
Messaging Patterns with Akka (Remote) Actors
 
MVC Gems
MVC GemsMVC Gems
MVC Gems
 
DDD loves Actor Model and Actor Model loves Elixir
DDD loves Actor Model and Actor Model loves ElixirDDD loves Actor Model and Actor Model loves Elixir
DDD loves Actor Model and Actor Model loves Elixir
 
Scala elegant and exotic part 1
Scala  elegant and exotic part 1Scala  elegant and exotic part 1
Scala elegant and exotic part 1
 
Day 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application ArchitectureDay 9 - PostgreSQL Application Architecture
Day 9 - PostgreSQL Application Architecture
 
Day 2 - Intro to Rails
Day 2 - Intro to RailsDay 2 - Intro to Rails
Day 2 - Intro to Rails
 
Actor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupActor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder Meetup
 
Day 1 - Intro to Ruby
Day 1 - Intro to RubyDay 1 - Intro to Ruby
Day 1 - Intro to Ruby
 
Develop realtime web with Scala and Xitrum
Develop realtime web with Scala and XitrumDevelop realtime web with Scala and Xitrum
Develop realtime web with Scala and Xitrum
 
Children of Ruby
Children of RubyChildren of Ruby
Children of Ruby
 
Rest API
Rest APIRest API
Rest API
 

Similar to Elixir for Rubyists

Why Ruby?
Why Ruby? Why Ruby?
Why Ruby?
IT Weekend
 
Elixir introd
Elixir introdElixir introd
Elixir introd
dennis zhuang
 
IJTC%202009%20JRuby
IJTC%202009%20JRubyIJTC%202009%20JRuby
IJTC%202009%20JRuby
tutorialsruby
 
IJTC%202009%20JRuby
IJTC%202009%20JRubyIJTC%202009%20JRuby
IJTC%202009%20JRuby
tutorialsruby
 
Intro to elixir and phoenix
Intro to elixir and phoenixIntro to elixir and phoenix
Intro to elixir and phoenix
Jared Smith
 
Elixir
ElixirElixir
Rubyon Rails
Rubyon RailsRubyon Rails
Rubyon Rails
Kevin Gisi
 
Learn Elixir at Manchester Lambda Lounge
Learn Elixir at Manchester Lambda LoungeLearn Elixir at Manchester Lambda Lounge
Learn Elixir at Manchester Lambda Lounge
Chi-chi Ekweozor
 
Ruby on Rails All Hands Meeting
Ruby on Rails All Hands MeetingRuby on Rails All Hands Meeting
Ruby on Rails All Hands Meeting
Dan Davis
 
Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1
Mark Menard
 
Scala Introduction
Scala IntroductionScala Introduction
Scala Introduction
Adrian Spender
 
Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2
Henry S
 
Reactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDaysReactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDays
Manuel Bernhardt
 
From Java to Ruby...and Back
From Java to Ruby...and BackFrom Java to Ruby...and Back
From Java to Ruby...and Back
Anil Hemrajani
 
Ruby is an Acceptable Lisp
Ruby is an Acceptable LispRuby is an Acceptable Lisp
Ruby is an Acceptable Lisp
Astrails
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
jeffz
 
The Joy Of Ruby
The Joy Of RubyThe Joy Of Ruby
The Joy Of Ruby
Clinton Dreisbach
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Nilesh Panchal
 
Elixir – Peeking into Elixir's Processes, OTP and Supervisors
Elixir – Peeking into Elixir's Processes, OTP and SupervisorsElixir – Peeking into Elixir's Processes, OTP and Supervisors
Elixir – Peeking into Elixir's Processes, OTP and Supervisors
Benjamin Tan
 
Repeating History...On Purpose...with Elixir
Repeating History...On Purpose...with ElixirRepeating History...On Purpose...with Elixir
Repeating History...On Purpose...with Elixir
Barry Jones
 

Similar to Elixir for Rubyists (20)

Why Ruby?
Why Ruby? Why Ruby?
Why Ruby?
 
Elixir introd
Elixir introdElixir introd
Elixir introd
 
IJTC%202009%20JRuby
IJTC%202009%20JRubyIJTC%202009%20JRuby
IJTC%202009%20JRuby
 
IJTC%202009%20JRuby
IJTC%202009%20JRubyIJTC%202009%20JRuby
IJTC%202009%20JRuby
 
Intro to elixir and phoenix
Intro to elixir and phoenixIntro to elixir and phoenix
Intro to elixir and phoenix
 
Elixir
ElixirElixir
Elixir
 
Rubyon Rails
Rubyon RailsRubyon Rails
Rubyon Rails
 
Learn Elixir at Manchester Lambda Lounge
Learn Elixir at Manchester Lambda LoungeLearn Elixir at Manchester Lambda Lounge
Learn Elixir at Manchester Lambda Lounge
 
Ruby on Rails All Hands Meeting
Ruby on Rails All Hands MeetingRuby on Rails All Hands Meeting
Ruby on Rails All Hands Meeting
 
Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1
 
Scala Introduction
Scala IntroductionScala Introduction
Scala Introduction
 
Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2
 
Reactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDaysReactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDays
 
From Java to Ruby...and Back
From Java to Ruby...and BackFrom Java to Ruby...and Back
From Java to Ruby...and Back
 
Ruby is an Acceptable Lisp
Ruby is an Acceptable LispRuby is an Acceptable Lisp
Ruby is an Acceptable Lisp
 
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)The Evolution of Async-Programming on .NET Platform (.Net China, C#)
The Evolution of Async-Programming on .NET Platform (.Net China, C#)
 
The Joy Of Ruby
The Joy Of RubyThe Joy Of Ruby
The Joy Of Ruby
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
 
Elixir – Peeking into Elixir's Processes, OTP and Supervisors
Elixir – Peeking into Elixir's Processes, OTP and SupervisorsElixir – Peeking into Elixir's Processes, OTP and Supervisors
Elixir – Peeking into Elixir's Processes, OTP and Supervisors
 
Repeating History...On Purpose...with Elixir
Repeating History...On Purpose...with ElixirRepeating History...On Purpose...with Elixir
Repeating History...On Purpose...with Elixir
 

Recently uploaded

UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
ISH Technologies
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
TaghreedAltamimi
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
Karya Keeper
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
gapen1
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
Marcin Chrost
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
safelyiotech
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
sjcobrien
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
YousufSait3
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 

Recently uploaded (20)

UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
 
Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !Enums On Steroids - let's look at sealed classes !
Enums On Steroids - let's look at sealed classes !
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 

Elixir for Rubyists

  • 1. Elixir for Rubyists A short introduction PRESENTATION By Maarten van Vliet
  • 2. Maarten van Vliet Backend developer @ Awkward github: maartenvanvliet website: maartenvanvliet.nl About me
  • 4. We are hiring! • Come talk to me afterwards
  • 5. Elixir for Rubyists • About Ruby and why I like it • What is Elixir • A short history of Elixir • Elixir and Ruby
  • 7. Why I love Ruby? Community Developer Experience Ecosystem
  • 9. Developer experience Tooling Syntax Expressiveness $rails generate model User name:string $rails db:migrate class User < ApplicationRecord   validates :name, presence: true has_many :events end   user = User.new user.save
  • 10. Ecosystem There’s a gem for everything High quality Productive
  • 12. If Ruby is so awesome… Why Elixir?
  • 13. • Dynamic functional programming language • Erlang VM • Scalable • Distributed • Fault tolerant What is Elixir?
  • 14. Elixir has its roots in the Ruby/Rails community It was founded by Jose Valim in 2011 Former Rails Core team member Author of Devise the Rails authentication gem Making Rails threadsafe History of Elixir
  • 15. Jose had the need for a better concurrency story Explored multiple technologies (e.g. Clojure, Erlang) Then he built Elixir on the Erlang Virtual Machine Leverage multiple cores • Cheap processes • Isolated from each other • Can run concurrently Why Elixir?
  • 16. Similar aims as Ruby More explicit DSL’s Metaprogramming at compile time Language features $mix phx.gen.schema User users name:string $mix ecto.migrate defmodule User do use Ecto.Schema   schema “users” do field :name, :string has_many :events, Blog.Event end def changeset(user, params %{}) do user |> cast(params, [:name]) |> validate_required([:name]) end end   user = User.changeset(%User{}) Repo.insert(user) Ruby roots
  • 17. Similar to chaining in Ruby When you pipe into a function, its first argument is placed before the |> character. So, the list is passed to the Enum.map function then it is squared, filtered and summed Was proposed for Ruby but would work the same as the “.” chaining operator Piping operator# Elixir [1, 2, 3, 4] |> Enum.map(fn x -> x*x end) |> Enum.filter(fn x -> x > 1 end) |> Enum.sum 29 # Ruby [1,2,3,4]. map{|x| x*x }. select{|x| x > 1}. sum 29
  • 18. Also introduced as experiment in Ruby 2.7 Cross pollination Works on function heads Pattern matching#elixir user = %User{ name: “Alice” } def get_name(%{name: name}) do name end def get_name(_) do nil end get_name(user) “Alice” get_name(1) nil
  • 19. The ecosystem provides unique features Immutability Erlang VM Fast/scalable Realtime features Phoenix Liveview Why use it then?
  • 20. Ruby and Elixir Community Developer Experience Ecosystem Shared values
  • 21. Community • Like Ruby, welcoming and friendly community • elixirforum.com
 • elixir-lang.slack.com Shared values
  • 22. Developer experience • Focussed on developer happiness/ tooling
 • Productive and expressive code
 • Well documented • Built-in test framework • Fast and concurrent 
 
 Shared values
  • 23. Ecosystem • hex.pm package manager • Hexdocs - each package can publish its documentation
 • High quality libraries e.g. • Phoenix - web framework • Ecto - Data access layer • Absinthe - graphql framework 
 
 Shared values
  • 24. Takeaways Shares many of the values that Ruby has Many familiar concepts Try it out sometime! It's awesome
  • 25. March 12 Elixir Meetup in Rotterdam Awkward & Equalture will host an Elixir meetup at Startdock Westplein 12-14 6 - 9 pm Sign up now at meetup.com
  • 26. March 25 Elixir Workshop Rotterdam.rb At Beequp 6 - 9 pm Sign up now at meetup.com