SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Elixir Study Group
Kick-off meet-up
Hosted by
Why are we here
tonight?
Things I know
• We are interested in Elixir.
• We need to learn.
• Learning together is fun.
• Elixir is fun.
• Our meet-ups well be practical: we’ll write code.
Things I don’t know
• How often we get together.
• Your background and your level.
• Let’s get acquainted!
Thus
• Let’s experiment!
• Everyone is welcome to take initiative and organize
the next session, possibly in a different way!
Erlang the platform
and
Elixir
ElixirErlang the language
Erlang the VM
• In use for ~20 years.
• Designed at Ericsson
• Fault tolerant, scalable, distributed, responsive
systems.
• Erlang the language is a functional and concurrent
programming language with a dynamic type system
• Erlang the language is rather conservative
What makes Erlang unique
• Lightweight isolated process as the building block
• Processes communicate via asynchronous
messages
• Error handling approach: LET IT CRASH approach
• OTP
Hello, Joe!
Hello, Mike!
Google: “Erlang the movie”
and then: “Erlang the movie the sequel”
Elixir
• Modern
• Functional
• Concurrent
• Transparent integration with the Erlang world
• Protocol-based polymorphism
• Macros
• Focus on tooling
Most importantly…
Elixir
possesses
the gene of
programmer happiness!
Functional Programming
for the uninitiated
Two pillars
• Higher-order functions
• Immutability
words = ["takes", "one", "or", "more",
"functions", "as", "an", "input", "or",
"outputs", "a", "function"]
Enum.max_by words, fn(word) ->
String.length(word) end #=> "functions"
Higher-Order Functions
Consequences of
Immutability
• You can’t modify an object in-place. Any
modification produces a new object.
Consequences of
Immutability
• There is no question of equality and identity, like in
Java .
Date a = new Date(123);
Date b = new Date(123);
Date c = a;
System.out.println(a == b); //=> false
System.out.println(a.equals(b)); //=> true
System.out.println(a == c); //=> true
a = {2014, 9, 11}
b = {2014, 9, 11}
c = a
IO.inspect a == b #=> true
IO.inspect a == c #=> true
IO.inspect b == c #=> true
Equality and Identity the
Functional Way
Functions transform data
Pure functions:
Functions transform data
defmodule Example do
def word_signature word do
without_spaces = String.strip(word)
downcased = String.downcase(without_spaces)
letters = String.split(downcased, "", trim: true)
sorted = Enum.sort(letters)
Enum.join(sorted)
end
end
IO.inspect Example. word_signature(” Higher ”)
Functions transform data
defmodule Example do
def word_signature word do
Enum.join(Enum.sort(String.split(
String.downcase(
String.strip(word)), "", trim: true)))
end
end
IO.inspect Example. word_signature(” Higher ”)
OR:
defmodule Example do
def word_signature word do
word |> String.strip
|> String.downcase
|> String.split("", trim: true)
|> Enum.sort
|> Enum.join
end
end
IO.inspect Example. word_signature(” Higher ”)
FP & OO
• Functional programming does not contradict Object
Orientedness if objects are immutable. Example:
Scala.
• But neither Erlang nor Elixir has classes
• You separate code and data
Abstracting with modules
peter = Person.new(“Peter”,”Peterson”, 20)
IO.inspect Person.can_drink_alcohol?(peter)
#=> false
peter = Person.birthday(peter)
IO.inspect Person.can_drink_alcohol?(peter)
#=> true
Abstracting with modules
defmodule Person do
defstruct firstname: nil, lastname: nil, age: 0
@legal_drinking_age 21
def new(fname, lname, age) do
%Person{firstname: "Peter",
lastname: "Peterson", age: 20}
end
Abstracting with modules
def can_drink_alcohol?(person) do
person.age >= @legal_drinking_age
end
def birthday(person) do
%{person | age: person.age + 1}
end
end
Exercises:
https://github.com/belgian-elixir-study-group/meetup-materials
git clone
https://github.com/belgian-elixir-study-group/meetup-
materials.git
WiFi:
DevSpace-5GHz
DevSpace-2.4GHz
passwd: devspace2012ftw!
twitter:
@elixir_be
@xavierdefrang
@less_software
Elixir docs:
http://elixir-lang.org/docs/stable/elixir/

Weitere ähnliche Inhalte

Andere mochten auch

Selling Wine in a Global Recession - FINAL - Nov2009
Selling Wine in a Global Recession - FINAL - Nov2009Selling Wine in a Global Recession - FINAL - Nov2009
Selling Wine in a Global Recession - FINAL - Nov2009Nadine Storey
 
lenovopowerpoint
lenovopowerpointlenovopowerpoint
lenovopowerpointbryanco1987
 
Pet Business March 16 EcoFriendly Pet Toys
Pet Business March 16 EcoFriendly Pet ToysPet Business March 16 EcoFriendly Pet Toys
Pet Business March 16 EcoFriendly Pet ToysDorothy Crouch
 
Gregory Mesec_Generic2015
Gregory Mesec_Generic2015Gregory Mesec_Generic2015
Gregory Mesec_Generic2015Greg Mesec
 
Life-saving STEM for the Sea | STEMJobs
Life-saving STEM for the Sea | STEMJobsLife-saving STEM for the Sea | STEMJobs
Life-saving STEM for the Sea | STEMJobsDorothy Crouch
 
lgs wine pres updated march 2015
lgs wine pres updated march 2015lgs wine pres updated march 2015
lgs wine pres updated march 2015Nadine Storey
 

Andere mochten auch (11)

Selling Wine in a Global Recession - FINAL - Nov2009
Selling Wine in a Global Recession - FINAL - Nov2009Selling Wine in a Global Recession - FINAL - Nov2009
Selling Wine in a Global Recession - FINAL - Nov2009
 
новый интернет проект «траектория успеха»
новый интернет проект «траектория успеха»новый интернет проект «траектория успеха»
новый интернет проект «траектория успеха»
 
lenovopowerpoint
lenovopowerpointlenovopowerpoint
lenovopowerpoint
 
ABESeptCom
ABESeptComABESeptCom
ABESeptCom
 
Pet Business March 16 EcoFriendly Pet Toys
Pet Business March 16 EcoFriendly Pet ToysPet Business March 16 EcoFriendly Pet Toys
Pet Business March 16 EcoFriendly Pet Toys
 
Gregory Mesec_Generic2015
Gregory Mesec_Generic2015Gregory Mesec_Generic2015
Gregory Mesec_Generic2015
 
SELF -REGULATION
SELF -REGULATION SELF -REGULATION
SELF -REGULATION
 
Life-saving STEM for the Sea | STEMJobs
Life-saving STEM for the Sea | STEMJobsLife-saving STEM for the Sea | STEMJobs
Life-saving STEM for the Sea | STEMJobs
 
WellsFargo-GlobalSiteComp
WellsFargo-GlobalSiteCompWellsFargo-GlobalSiteComp
WellsFargo-GlobalSiteComp
 
lgs wine pres updated march 2015
lgs wine pres updated march 2015lgs wine pres updated march 2015
lgs wine pres updated march 2015
 
Gothic Revival
Gothic RevivalGothic Revival
Gothic Revival
 

Ähnlich wie Elixir Study Group Kickoff Meetup

Intro to Functional Programming
Intro to Functional ProgrammingIntro to Functional Programming
Intro to Functional ProgrammingJordan Parmer
 
Functional (web) development with Clojure
Functional (web) development with ClojureFunctional (web) development with Clojure
Functional (web) development with ClojureHenrik Eneroth
 
Java Building Blocks
Java Building BlocksJava Building Blocks
Java Building BlocksCate Huston
 
Erlang/OTP for Rubyists
Erlang/OTP for RubyistsErlang/OTP for Rubyists
Erlang/OTP for RubyistsSean Cribbs
 
[E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)
[E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)[E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)
[E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)EnlightenmentProject
 
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
 
Elixir and elm
Elixir and elmElixir and elm
Elixir and elmMix & Go
 
JS Fest 2018. Douglas Crockford. The Better Parts
JS Fest 2018. Douglas Crockford. The Better PartsJS Fest 2018. Douglas Crockford. The Better Parts
JS Fest 2018. Douglas Crockford. The Better PartsJSFestUA
 
JavaScript Interview Questions Part - 1.pdf
JavaScript Interview Questions Part - 1.pdfJavaScript Interview Questions Part - 1.pdf
JavaScript Interview Questions Part - 1.pdfkatarichallenge
 
Journey To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The MachineJourney To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The MachineIrfan Maulana
 
Building Concurrent WebObjects applications with Scala
Building Concurrent WebObjects applications with ScalaBuilding Concurrent WebObjects applications with Scala
Building Concurrent WebObjects applications with ScalaWO Community
 
The Ring programming language version 1.5.1 book - Part 5 of 180
The Ring programming language version 1.5.1 book - Part 5 of 180The Ring programming language version 1.5.1 book - Part 5 of 180
The Ring programming language version 1.5.1 book - Part 5 of 180Mahmoud Samir Fayed
 
Douglas Crockford Presentation Goodparts
Douglas Crockford Presentation GoodpartsDouglas Crockford Presentation Goodparts
Douglas Crockford Presentation GoodpartsAjax Experience 2009
 
Build a virtual pet with javascript (april 2017)
Build a virtual pet with javascript (april 2017)Build a virtual pet with javascript (april 2017)
Build a virtual pet with javascript (april 2017)Thinkful
 
CPP13 - Object Orientation
CPP13 - Object OrientationCPP13 - Object Orientation
CPP13 - Object OrientationMichael Heron
 

Ähnlich wie Elixir Study Group Kickoff Meetup (20)

Intro to Functional Programming
Intro to Functional ProgrammingIntro to Functional Programming
Intro to Functional Programming
 
Functional (web) development with Clojure
Functional (web) development with ClojureFunctional (web) development with Clojure
Functional (web) development with Clojure
 
Java Building Blocks
Java Building BlocksJava Building Blocks
Java Building Blocks
 
Erlang/OTP for Rubyists
Erlang/OTP for RubyistsErlang/OTP for Rubyists
Erlang/OTP for Rubyists
 
[E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)
[E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)[E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)
[E-Dev-Day-US-2015][8/9] he EFL API in Review (Tom Hacohen)
 
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#)
 
Elixir and elm
Elixir and elmElixir and elm
Elixir and elm
 
JS Fest 2018. Douglas Crockford. The Better Parts
JS Fest 2018. Douglas Crockford. The Better PartsJS Fest 2018. Douglas Crockford. The Better Parts
JS Fest 2018. Douglas Crockford. The Better Parts
 
Goodparts
GoodpartsGoodparts
Goodparts
 
JavaScript Interview Questions Part - 1.pdf
JavaScript Interview Questions Part - 1.pdfJavaScript Interview Questions Part - 1.pdf
JavaScript Interview Questions Part - 1.pdf
 
Eo fosdem 15
Eo fosdem 15Eo fosdem 15
Eo fosdem 15
 
Journey To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The MachineJourney To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The Machine
 
Building Concurrent WebObjects applications with Scala
Building Concurrent WebObjects applications with ScalaBuilding Concurrent WebObjects applications with Scala
Building Concurrent WebObjects applications with Scala
 
The Ring programming language version 1.5.1 book - Part 5 of 180
The Ring programming language version 1.5.1 book - Part 5 of 180The Ring programming language version 1.5.1 book - Part 5 of 180
The Ring programming language version 1.5.1 book - Part 5 of 180
 
Object oriented programming With C#
Object oriented programming With C#Object oriented programming With C#
Object oriented programming With C#
 
Clojure
ClojureClojure
Clojure
 
Douglas Crockford Presentation Goodparts
Douglas Crockford Presentation GoodpartsDouglas Crockford Presentation Goodparts
Douglas Crockford Presentation Goodparts
 
Build a virtual pet with javascript (april 2017)
Build a virtual pet with javascript (april 2017)Build a virtual pet with javascript (april 2017)
Build a virtual pet with javascript (april 2017)
 
Kotlin from-scratch
Kotlin from-scratchKotlin from-scratch
Kotlin from-scratch
 
CPP13 - Object Orientation
CPP13 - Object OrientationCPP13 - Object Orientation
CPP13 - Object Orientation
 

Kürzlich hochgeladen

The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456KiaraTiradoMicha
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 

Kürzlich hochgeladen (20)

The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 

Elixir Study Group Kickoff Meetup

Hinweis der Redaktion

  1. i hope this is the first and the last presentation
  2. Xavier and Yuri
  3. responsible anarchy :) but practical and about Elixir we are not Yodas
  4. OTP framework (Open Telecom Platform) inseparable from Erlang. And Elixir ;-) BEAM lfe.io joxa.org Поэтому в Erlang за счет того, что очень проработан весь pipeline компилятора, в нем есть несколько уровней языковых. Один из самых низких уровней, который все слышали – это Erlang core. Erlang core – это такой ерланговый DSL для представления структуры программы ерланговской в виде элементарных синтаксических конструкций. Но в Erlang core нет рекордов потому, что Erlang core – это уже скомпилированная программа. А есть на уровень выше, допустим, Erlang AST. В Erlang AST есть упоминание о Erlang record, т.е. там вы можете делать макросы, инклюды, которые у вас есть, директивы компилятора. Они все тоже в Erlang AST включаются. И там уже, как бы, сразу вы даете, вот моя программа, вот допустим, там есть какой-то свитч или pattern matching. Если вы даете Erlang-у Erlang AST, он его сам скомпилирует до Erlang core и прооптимизирует. И, вот, Elixir построен точно таким образом. Elixir не генерирует байт-код, он генерирует Erlang AST из эликсировской программы и дает на компиляцию компилятору Erlang-а. Компилятор Erlang уже производит сам все необходимые оптимизации. И вот такой путь позволяет очень быстро делать прототипы языков для языковой среды Erlang-а. Если вы пишите, вам достаточно просто написать какой-то лексер и парсер, и вы сразу сможете сгенерировать AST. Т.е., по сути, это будет просто какой-то препроцессор DSL из вашего языка в Erlang AST. А дальше все оптимизации, pattern matching компиляции, все эти штуки, рекорды, все это сделает за вас компилятор Erlang-а. Это намного меньше сил нужно тратить разработчику компиляторов языков для платформы Erlang, допустим, люди тратят при написании компилятора для .Net и для Java. И в этом вот и крутость, это очень круто! И я поощряю развитие любых синтаксисов под Erlang, возможно кто-то возьмет и напишет сиподобную лапшу-синтаксис для Erlang, почему бы нет?
  5. open sourced later prolog roots both in syntax and semantics 1st version implemented in prolog designed by engineers who like to sleep at night boxes which work reliably for years 0 syntax sugar mention maps
  6. 3 Not the CPU process. Processes are very lightweight (a newly spawned process takes a bit more than 300 bytes!) Each process is isolated from other processes: its own GC There can be thousands or even millions of processes in one Erlang VM (node). whatsapp claimed 3 million open sockets on 1 freebsd server 2 its own mailbox Sometimes it makes more sense to think of Erlang processes as objects in OO languages, and not as of OS processes, or threads. Processed are managed by schedulers. In BEAM there is one scheduler per each CPU core. Two processes can be linked together, termination (normal or abnormal) of one process emits an exit signal, and a linked process can process this signal and do something about it, or get terminated. It is important to note that event though these primitives enable miracles and it is important to know and understand them, you seldom use them directly. There are higher-level abstractions which implement common patterns of concurrent programming. These abstractions are a set of libraries called OTP: Open Telecom Platform.
  7. modern language for the Erlang platform. transparent integration with the Erlang world stays close to its roots,. Thus, inherits all the merits of the Erlang VM and the OTP framework. tooling still in progress ok, mention Rails
  8. In my humble opinion, unlike Erlang the language, Elixir can be a general purpose language, allowing you to write concurrent code, which would use all your 4/8/16…CPU cores (or servers).
  9. IMHO! laziness … a higher-order function is a function that does at least one of the following: (1) takes one or more functions as an input or (2) outputs a function
  10. There is only equality in functional languages and you don’t care about where that thing in stored in memory.
  11. no void Pure functions are very testing-friendly. Pure functions/methods make much sense in any mainstream language Surely there are still side-effects: I/O. In Erlang there is ETS and process name registration facilities which are an equivalent of global variables.