SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
Erlang workshop 
Reidar Sollid 
Erlang workshop in Drammen
Erlang 
• The world is concurrent 
• Things in the world don’t share state 
• Things communicate through messages 
• Things fail 
2 
- Joe Armstrong
Presentation Title - Classification 
What is Erlang 
3 
• Created and maintained by Ericsson (now open source) 
• Functional, single assignment, strict evaluation, dynamic typing 
• Actor model, concurrent oriented, fault tolerant, soft-real-time 
• Light weight processes that communicate using message passing 
(You can have several processes in one OS/Java thread) 
• Erlang started life as modified prolog 
• Erlang shell, escript and compiled .beam bytecode
What problem to solve 
Presentation Title - Classification 
4
What is Elixir 
1) A Ruby like language for the Erlang VM 
5 
BEAM 
2) Seamless Erlang integration: zero-penalty 
Erlang function calls (and vice 
versa) 
3) Meta programming via macros and a 
first-class AST (Abstract syntax tree) 
4) Polymorphism via protocols inspired by 
Clojure
Presentation Title - Classification 
And this 
6
Shared memory model 
Presentation Title - Classification 
7 
Shared 
memory 
Process 
thread 
Process 
thread 
Process 
thread
Message passing 
Presentation Title - Classification 
8 
Process 
thread 
Process 
thread 
Process 
thread
Concurrency and shared memory model 
Presentation Title - Classification 
9
Atoms and variables 
• An atom is global constant starting with 
lower case char 
• A variable starts with a capital char and is 
called a variable since it can be bound or 
unbound. Once the variable is bound it 
can never change. 
10
Pattern matching 
Presentation Title - Classification 
11
Pattern matching 
• Everything in Erlang is pattern matching 
• When assigning a variable, that is really 
pattern matching 
12
Loops 
13
No while or for loops ? 
14
Tail optimised recursion 
15
Presentation Title - Classification 
Lambdas 
16
BIF (Built in Functions) 
17
OTP 
(Open Telecom Platform) 
1.Mostly used by finance sector, so it just called OTP now 
2.Contains a set of behaviours 
4.The standard Erlang/OTP behaviours are: 
18 
1.gen_server 
1. For implementing the server of a client-server 
relation. 
2.gen_fsm 
1. For implementing finite state machines. 
3.gen_event 
1. For implementing event handling functionality. 
4.supervisor 
1. For implementing a supervisor in a supervision tree.
Rebar 
19
Rebar 
• Rebar is an Erlang build tool that makes it 
easy to compile and test Erlang 
applications, port drivers and releases. 
• Contains templates for OTP development 
20
Learn you some Erlang 
http://learnyousomeerlang.com/ 
21
Presentation Title - Classification 
Stickers ? 
22

Weitere ähnliche Inhalte

Was ist angesagt?

Functional-style control flow in F#
Functional-style control flow in F#Functional-style control flow in F#
Functional-style control flow in F#
LincolnAtkinson
 
Why should a Java programmer shifts towards Functional Programming Paradigm
Why should a Java programmer shifts towards Functional Programming ParadigmWhy should a Java programmer shifts towards Functional Programming Paradigm
Why should a Java programmer shifts towards Functional Programming Paradigm
Tech Triveni
 
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
lennartkats
 
Test-driven language development
Test-driven language developmentTest-driven language development
Test-driven language development
lennartkats
 
Clojure's take on concurrency
Clojure's take on concurrencyClojure's take on concurrency
Clojure's take on concurrency
yoavrubin
 
Language Engineering in the Cloud
Language Engineering in the CloudLanguage Engineering in the Cloud
Language Engineering in the Cloud
lennartkats
 

Was ist angesagt? (20)

Xtext Webinar
Xtext WebinarXtext Webinar
Xtext Webinar
 
Functional-style control flow in F#
Functional-style control flow in F#Functional-style control flow in F#
Functional-style control flow in F#
 
Introduction to Functional Programming and Clojure
Introduction to Functional Programming and ClojureIntroduction to Functional Programming and Clojure
Introduction to Functional Programming and Clojure
 
Why should a Java programmer shifts towards Functional Programming Paradigm
Why should a Java programmer shifts towards Functional Programming ParadigmWhy should a Java programmer shifts towards Functional Programming Paradigm
Why should a Java programmer shifts towards Functional Programming Paradigm
 
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
 
Introduction to Functional programming
Introduction to Functional programmingIntroduction to Functional programming
Introduction to Functional programming
 
Final keyword
Final keywordFinal keyword
Final keyword
 
Remix Your Language Tooling (JSConf.eu 2012)
Remix Your Language Tooling (JSConf.eu 2012)Remix Your Language Tooling (JSConf.eu 2012)
Remix Your Language Tooling (JSConf.eu 2012)
 
Test-driven language development
Test-driven language developmentTest-driven language development
Test-driven language development
 
Fast, Faster and Super-Fast Queries
Fast, Faster and Super-Fast QueriesFast, Faster and Super-Fast Queries
Fast, Faster and Super-Fast Queries
 
3. jvm
3. jvm3. jvm
3. jvm
 
Advanced debugging
Advanced debuggingAdvanced debugging
Advanced debugging
 
oAW Presentation
oAW PresentationoAW Presentation
oAW Presentation
 
JVM
JVMJVM
JVM
 
Java JIT Improvements Research
Java JIT Improvements ResearchJava JIT Improvements Research
Java JIT Improvements Research
 
Clojure's take on concurrency
Clojure's take on concurrencyClojure's take on concurrency
Clojure's take on concurrency
 
Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)
 
Clojure presentation
Clojure presentationClojure presentation
Clojure presentation
 
Language Engineering in the Cloud
Language Engineering in the CloudLanguage Engineering in the Cloud
Language Engineering in the Cloud
 
The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)
 

Ähnlich wie Erlang workshopdrammen

Erlang及其应用
Erlang及其应用Erlang及其应用
Erlang及其应用
Feng Yu
 
Unit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rdUnit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rd
prat0ham
 

Ähnlich wie Erlang workshopdrammen (20)

A sip of Elixir
A sip of ElixirA sip of Elixir
A sip of Elixir
 
Java concurrency
Java concurrencyJava concurrency
Java concurrency
 
Repeating History...On Purpose...with Elixir
Repeating History...On Purpose...with ElixirRepeating History...On Purpose...with Elixir
Repeating History...On Purpose...with Elixir
 
MPI n OpenMP
MPI n OpenMPMPI n OpenMP
MPI n OpenMP
 
Reactive Software Systems
Reactive Software SystemsReactive Software Systems
Reactive Software Systems
 
Erlang os
Erlang osErlang os
Erlang os
 
Erlang及其应用
Erlang及其应用Erlang及其应用
Erlang及其应用
 
Introdução à Elixir
Introdução à ElixirIntrodução à Elixir
Introdução à Elixir
 
Working With Concurrency In Java 8
Working With Concurrency In Java 8Working With Concurrency In Java 8
Working With Concurrency In Java 8
 
Unit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rdUnit 1 Core Java for Compter Science 3rd
Unit 1 Core Java for Compter Science 3rd
 
Fastest Servlets in the West
Fastest Servlets in the WestFastest Servlets in the West
Fastest Servlets in the West
 
Intro to elixir and phoenix
Intro to elixir and phoenixIntro to elixir and phoenix
Intro to elixir and phoenix
 
Algoritmi e Calcolo Parallelo 2012/2013 - OpenMP
Algoritmi e Calcolo Parallelo 2012/2013 - OpenMPAlgoritmi e Calcolo Parallelo 2012/2013 - OpenMP
Algoritmi e Calcolo Parallelo 2012/2013 - OpenMP
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
 
Lecture6
Lecture6Lecture6
Lecture6
 
Erlang - Concurrent Language for Concurrent World
Erlang - Concurrent Language for Concurrent WorldErlang - Concurrent Language for Concurrent World
Erlang - Concurrent Language for Concurrent World
 
High-performance model queries
High-performance model queriesHigh-performance model queries
High-performance model queries
 
Introduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actorsIntroduction to concurrent programming with akka actors
Introduction to concurrent programming with akka actors
 
Elixir
ElixirElixir
Elixir
 
Erlang/Elixir and OTP
Erlang/Elixir and OTPErlang/Elixir and OTP
Erlang/Elixir and OTP
 

Mehr von Reidar Sollid (7)

Rust baksia2014
Rust baksia2014Rust baksia2014
Rust baksia2014
 
Erlang crash course CiA Oslo 2012
Erlang crash course CiA Oslo 2012 Erlang crash course CiA Oslo 2012
Erlang crash course CiA Oslo 2012
 
Actors drammen
Actors drammenActors drammen
Actors drammen
 
Io lang
Io langIo lang
Io lang
 
Actor three languages
Actor three languagesActor three languages
Actor three languages
 
Scala actors erlang
Scala actors erlangScala actors erlang
Scala actors erlang
 
I believe in rust
I believe in rustI believe in rust
I believe in rust
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdfStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
 
10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf
 
architecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfarchitecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdf
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdfMicrosoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
 
Naer Toolbar Redesign - Usability Research Synthesis
Naer Toolbar Redesign - Usability Research SynthesisNaer Toolbar Redesign - Usability Research Synthesis
Naer Toolbar Redesign - Usability Research Synthesis
 
AI Hackathon.pptx
AI                        Hackathon.pptxAI                        Hackathon.pptx
AI Hackathon.pptx
 
What need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java DevelopersWhat need to be mastered as AI-Powered Java Developers
What need to be mastered as AI-Powered Java Developers
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 

Erlang workshopdrammen

  • 1. Erlang workshop Reidar Sollid Erlang workshop in Drammen
  • 2. Erlang • The world is concurrent • Things in the world don’t share state • Things communicate through messages • Things fail 2 - Joe Armstrong
  • 3. Presentation Title - Classification What is Erlang 3 • Created and maintained by Ericsson (now open source) • Functional, single assignment, strict evaluation, dynamic typing • Actor model, concurrent oriented, fault tolerant, soft-real-time • Light weight processes that communicate using message passing (You can have several processes in one OS/Java thread) • Erlang started life as modified prolog • Erlang shell, escript and compiled .beam bytecode
  • 4. What problem to solve Presentation Title - Classification 4
  • 5. What is Elixir 1) A Ruby like language for the Erlang VM 5 BEAM 2) Seamless Erlang integration: zero-penalty Erlang function calls (and vice versa) 3) Meta programming via macros and a first-class AST (Abstract syntax tree) 4) Polymorphism via protocols inspired by Clojure
  • 6. Presentation Title - Classification And this 6
  • 7. Shared memory model Presentation Title - Classification 7 Shared memory Process thread Process thread Process thread
  • 8. Message passing Presentation Title - Classification 8 Process thread Process thread Process thread
  • 9. Concurrency and shared memory model Presentation Title - Classification 9
  • 10. Atoms and variables • An atom is global constant starting with lower case char • A variable starts with a capital char and is called a variable since it can be bound or unbound. Once the variable is bound it can never change. 10
  • 11. Pattern matching Presentation Title - Classification 11
  • 12. Pattern matching • Everything in Erlang is pattern matching • When assigning a variable, that is really pattern matching 12
  • 14. No while or for loops ? 14
  • 16. Presentation Title - Classification Lambdas 16
  • 17. BIF (Built in Functions) 17
  • 18. OTP (Open Telecom Platform) 1.Mostly used by finance sector, so it just called OTP now 2.Contains a set of behaviours 4.The standard Erlang/OTP behaviours are: 18 1.gen_server 1. For implementing the server of a client-server relation. 2.gen_fsm 1. For implementing finite state machines. 3.gen_event 1. For implementing event handling functionality. 4.supervisor 1. For implementing a supervisor in a supervision tree.
  • 20. Rebar • Rebar is an Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases. • Contains templates for OTP development 20
  • 21. Learn you some Erlang http://learnyousomeerlang.com/ 21
  • 22. Presentation Title - Classification Stickers ? 22