SlideShare una empresa de Scribd logo
1 de 11
© 2010 Shivercube
“Do you hear that, Mr. Anderson?That is the
sound of inevitability.” - Agent Smith
© 2010 Shivercube
“HelloWorld”.
or
-module(hello).
-export([start/0]).
start() -> io:format(“HelloWorld~n”).
© 2010 Shivercube
 Makes hard things easy
 But also makes easy things hard
 Virtual machine called BEAM
 Brutally efficient, and brutally ugly
 Based on Prolog
© 2010 Shivercube
 Cloud-based databases
 CouchDB
 SimpleDB
 Facebook Chat
 GitHub egitd
 Yaws
 Wings 3D
© 2010 Shivercube
 Functional programming language
 Dynamic typing
 Built for concurrency
 Extremely reliable
 No threading
 Lightweight processes
 “Let it crash” mantra
 Hot-swappable code
© 2010 Shivercube
 Programs built entirely out of functions
 No objects anywhere
 Functions are first-class citizens
 Functions usually return the same values,
given the same inputs
 Functions usually do not have side effects
 They usually not modify program state
 Variables can only be assigned to once
© 2010 Shivercube
-module(hellov2).
-export([start/0]).
start() ->
spawn(fun() -> loop() end).
loop() ->
receive
hello ->
io:format(“Hello World~n”), loop();
goodbye ->
ok
end.
© 2010 Shivercube
 Reality hurts
 Concurrency is hard
 We’ve been using the wrong programming model
▪ Functions and methods with side effects
▪ Threads with shared state
© 2010 Shivercube
 Share-nothing processes
 Side effect free
 Concurrency primitives
 Sending messages (!)
 Spawning messages (spawn)
 Receiving messages (receive)
© 2010 Shivercube
 Makes hard things easy and easy things hard
 Prolog-style syntax alien to most
 Functional programming paradigm
 Extremely efficient
 Extremely reliable
 “Let it crash” philosophy simplifies code
 Dynamic typing results in better productivity
 Simple concurrency
 Hot swapping code
© 2010 Shivercube
 Erlang Programming http://www.erlang.org/
 Erlang (programming language)
http://en.wikipedia.org/wiki/Erlang_(program
ming_language)
 The *Real* Erlang "Hello,World!“
http://egarson.blogspot.com/2008/03/real-
erlang-hello-world.html
 Erlang for C, C++ and Java Programmers
http://tamale.net/erlang/tutorial.shtml

Más contenido relacionado

Destacado

Lightning Talk: Erlang on Xen - Mikhail Bortnyk
Lightning Talk: Erlang on Xen - Mikhail BortnykLightning Talk: Erlang on Xen - Mikhail Bortnyk
Lightning Talk: Erlang on Xen - Mikhail BortnykElixir Club
 
Introduction to Couchbase Server 2.0
Introduction to Couchbase Server 2.0Introduction to Couchbase Server 2.0
Introduction to Couchbase Server 2.0Dipti Borkar
 
1 hour dive into Erlang/OTP
1 hour dive into Erlang/OTP1 hour dive into Erlang/OTP
1 hour dive into Erlang/OTPJordi Llonch
 
Crossing the Chasm - What's New, What's Not
Crossing the Chasm - What's New, What's NotCrossing the Chasm - What's New, What's Not
Crossing the Chasm - What's New, What's NotGeoffrey Moore
 
Exception Handler, Controller Advice Of Spring
Exception Handler, Controller Advice Of SpringException Handler, Controller Advice Of Spring
Exception Handler, Controller Advice Of SpringHyun Dong Lee
 
Intro to Erlang
Intro to ErlangIntro to Erlang
Intro to ErlangKen Pratt
 
Erlang For Five Nines
Erlang For Five NinesErlang For Five Nines
Erlang For Five NinesBarcamp Cork
 
An introduction to erlang
An introduction to erlangAn introduction to erlang
An introduction to erlangMirko Bonadei
 
Erlang Practice
Erlang PracticeErlang Practice
Erlang Practicelitaocheng
 
learn you some erlang - chap 9 to chap10
learn you some erlang - chap 9 to chap10learn you some erlang - chap 9 to chap10
learn you some erlang - chap 9 to chap10경미 김
 
Intro To Erlang
Intro To ErlangIntro To Erlang
Intro To Erlangasceth
 
An Erlang Game Stack
An Erlang Game StackAn Erlang Game Stack
An Erlang Game StackEonblast
 
Introduction to Erlang
Introduction to ErlangIntroduction to Erlang
Introduction to ErlangKirinDave
 
3 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 20173 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 2017Drift
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheLeslie Samuel
 

Destacado (20)

Elixir basics
Elixir basicsElixir basics
Elixir basics
 
Lightning Talk: Erlang on Xen - Mikhail Bortnyk
Lightning Talk: Erlang on Xen - Mikhail BortnykLightning Talk: Erlang on Xen - Mikhail Bortnyk
Lightning Talk: Erlang on Xen - Mikhail Bortnyk
 
Introduction to Couchbase Server 2.0
Introduction to Couchbase Server 2.0Introduction to Couchbase Server 2.0
Introduction to Couchbase Server 2.0
 
Why erlang
Why erlangWhy erlang
Why erlang
 
Erlang on OSv
Erlang on OSvErlang on OSv
Erlang on OSv
 
1 hour dive into Erlang/OTP
1 hour dive into Erlang/OTP1 hour dive into Erlang/OTP
1 hour dive into Erlang/OTP
 
Crossing the Chasm - What's New, What's Not
Crossing the Chasm - What's New, What's NotCrossing the Chasm - What's New, What's Not
Crossing the Chasm - What's New, What's Not
 
Exception Handler, Controller Advice Of Spring
Exception Handler, Controller Advice Of SpringException Handler, Controller Advice Of Spring
Exception Handler, Controller Advice Of Spring
 
Intro to Erlang
Intro to ErlangIntro to Erlang
Intro to Erlang
 
Erlang For Five Nines
Erlang For Five NinesErlang For Five Nines
Erlang For Five Nines
 
An introduction to erlang
An introduction to erlangAn introduction to erlang
An introduction to erlang
 
Erlang Practice
Erlang PracticeErlang Practice
Erlang Practice
 
learn you some erlang - chap 9 to chap10
learn you some erlang - chap 9 to chap10learn you some erlang - chap 9 to chap10
learn you some erlang - chap 9 to chap10
 
Intro To Erlang
Intro To ErlangIntro To Erlang
Intro To Erlang
 
Actors in erlang
Actors in erlangActors in erlang
Actors in erlang
 
An Erlang Game Stack
An Erlang Game StackAn Erlang Game Stack
An Erlang Game Stack
 
Introduction to Erlang
Introduction to ErlangIntroduction to Erlang
Introduction to Erlang
 
Erlang, an overview
Erlang, an overviewErlang, an overview
Erlang, an overview
 
3 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 20173 Things Every Sales Team Needs to Be Thinking About in 2017
3 Things Every Sales Team Needs to Be Thinking About in 2017
 
How to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your NicheHow to Become a Thought Leader in Your Niche
How to Become a Thought Leader in Your Niche
 

Similar a The mystique of erlang

Yet another DSL for cross platforms mobile development
Yet another DSL for cross platforms mobile developmentYet another DSL for cross platforms mobile development
Yet another DSL for cross platforms mobile developmentOlivier Le Goaër
 
Introduction to Cordova
Introduction to CordovaIntroduction to Cordova
Introduction to CordovaRaymond Camden
 
Concurrent Programming with ActionScript workers
Concurrent Programming with ActionScript workersConcurrent Programming with ActionScript workers
Concurrent Programming with ActionScript workersPaul Robertson
 
Making cloud portability a practical reality (i pad)
Making cloud portability a practical reality (i pad)Making cloud portability a practical reality (i pad)
Making cloud portability a practical reality (i pad)Nati Shalom
 
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Cloud meets Fog & Puppet A Story of Version Controlled InfrastructureCloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Cloud meets Fog & Puppet A Story of Version Controlled InfrastructureHabeeb Rahman
 
iOS におけるサウンド処理2015
iOS におけるサウンド処理2015iOS におけるサウンド処理2015
iOS におけるサウンド処理2015cocominap
 
Developing cross platform desktop application with Ruby
Developing cross platform desktop application with RubyDeveloping cross platform desktop application with Ruby
Developing cross platform desktop application with RubyAnis Ahmad
 
Programming for Lego Mindstorms using Eclipse to take you back to your childh...
Programming for Lego Mindstorms using Eclipse to take you back to your childh...Programming for Lego Mindstorms using Eclipse to take you back to your childh...
Programming for Lego Mindstorms using Eclipse to take you back to your childh...Benjamin Cabé
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backendDavid Padbury
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsSerge Stinckwich
 
Getting Started with HTML 5 Web workers
Getting Started with HTML 5 Web workersGetting Started with HTML 5 Web workers
Getting Started with HTML 5 Web workersFlumes
 
Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Eugene Yokota
 
Word press, the automated way
Word press, the automated wayWord press, the automated way
Word press, the automated wayMichaël Perrin
 
Ci For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalCi For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalChad Woolley
 
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, PolandAzul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, PolandAzul Systems Inc.
 
What is codename one
What is codename oneWhat is codename one
What is codename oneShai Almog
 
Devoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best PracticesDevoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best PracticesEric Bottard
 
Game programming with Groovy
Game programming with GroovyGame programming with Groovy
Game programming with GroovyJames Williams
 

Similar a The mystique of erlang (20)

Yet another DSL for cross platforms mobile development
Yet another DSL for cross platforms mobile developmentYet another DSL for cross platforms mobile development
Yet another DSL for cross platforms mobile development
 
Introduction to Cordova
Introduction to CordovaIntroduction to Cordova
Introduction to Cordova
 
Concurrent Programming with ActionScript workers
Concurrent Programming with ActionScript workersConcurrent Programming with ActionScript workers
Concurrent Programming with ActionScript workers
 
Making cloud portability a practical reality (i pad)
Making cloud portability a practical reality (i pad)Making cloud portability a practical reality (i pad)
Making cloud portability a practical reality (i pad)
 
Ma forge++ : @Cloud
Ma forge++ : @CloudMa forge++ : @Cloud
Ma forge++ : @Cloud
 
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Cloud meets Fog & Puppet A Story of Version Controlled InfrastructureCloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
 
Docker 101
Docker 101 Docker 101
Docker 101
 
iOS におけるサウンド処理2015
iOS におけるサウンド処理2015iOS におけるサウンド処理2015
iOS におけるサウンド処理2015
 
Developing cross platform desktop application with Ruby
Developing cross platform desktop application with RubyDeveloping cross platform desktop application with Ruby
Developing cross platform desktop application with Ruby
 
Programming for Lego Mindstorms using Eclipse to take you back to your childh...
Programming for Lego Mindstorms using Eclipse to take you back to your childh...Programming for Lego Mindstorms using Eclipse to take you back to your childh...
Programming for Lego Mindstorms using Eclipse to take you back to your childh...
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
 
Getting Started with HTML 5 Web workers
Getting Started with HTML 5 Web workersGetting Started with HTML 5 Web workers
Getting Started with HTML 5 Web workers
 
Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)
 
Word press, the automated way
Word press, the automated wayWord press, the automated way
Word press, the automated way
 
Ci For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalCi For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or Gal
 
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, PolandAzul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
 
What is codename one
What is codename oneWhat is codename one
What is codename one
 
Devoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best PracticesDevoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best Practices
 
Game programming with Groovy
Game programming with GroovyGame programming with Groovy
Game programming with Groovy
 

Último

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Último (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

The mystique of erlang

  • 1. © 2010 Shivercube “Do you hear that, Mr. Anderson?That is the sound of inevitability.” - Agent Smith
  • 3. © 2010 Shivercube  Makes hard things easy  But also makes easy things hard  Virtual machine called BEAM  Brutally efficient, and brutally ugly  Based on Prolog
  • 4. © 2010 Shivercube  Cloud-based databases  CouchDB  SimpleDB  Facebook Chat  GitHub egitd  Yaws  Wings 3D
  • 5. © 2010 Shivercube  Functional programming language  Dynamic typing  Built for concurrency  Extremely reliable  No threading  Lightweight processes  “Let it crash” mantra  Hot-swappable code
  • 6. © 2010 Shivercube  Programs built entirely out of functions  No objects anywhere  Functions are first-class citizens  Functions usually return the same values, given the same inputs  Functions usually do not have side effects  They usually not modify program state  Variables can only be assigned to once
  • 7. © 2010 Shivercube -module(hellov2). -export([start/0]). start() -> spawn(fun() -> loop() end). loop() -> receive hello -> io:format(“Hello World~n”), loop(); goodbye -> ok end.
  • 8. © 2010 Shivercube  Reality hurts  Concurrency is hard  We’ve been using the wrong programming model ▪ Functions and methods with side effects ▪ Threads with shared state
  • 9. © 2010 Shivercube  Share-nothing processes  Side effect free  Concurrency primitives  Sending messages (!)  Spawning messages (spawn)  Receiving messages (receive)
  • 10. © 2010 Shivercube  Makes hard things easy and easy things hard  Prolog-style syntax alien to most  Functional programming paradigm  Extremely efficient  Extremely reliable  “Let it crash” philosophy simplifies code  Dynamic typing results in better productivity  Simple concurrency  Hot swapping code
  • 11. © 2010 Shivercube  Erlang Programming http://www.erlang.org/  Erlang (programming language) http://en.wikipedia.org/wiki/Erlang_(program ming_language)  The *Real* Erlang "Hello,World!“ http://egarson.blogspot.com/2008/03/real- erlang-hello-world.html  Erlang for C, C++ and Java Programmers http://tamale.net/erlang/tutorial.shtml

Notas del editor

  1. Created by Dr. Joe Armstrong after finding that Prolog didn’t do exactly what he wanted. First came a log meta-interpreter that added parallel processes to Prolog, and then error handling mechanisms were added, and then a new language was born.
  2. The buzz for Erlang is growing steadily because it provides what many other languages can’t: scalable concurrency and reliability
  3. Erlang is a product of years of research from Ericsson (one of Sweden’s largest companies) to develop real-time fault-tolerant distributed applications for telecom applications – systems which could not often be taken down for maintenance. Erlang is a functional language with many reliability features built-in. You can’t take a phone switch down for maintenance, so you don’t have to take Erlang down to replace entire modules. Some of its applications have run for years without ever coming down for maintenance (or crashed). Reliability and concurrency are Erlang’s key capabilities. Erlang is threadless. Threads take fewer resources, so theoretically, you should be able to get better performance from them. However, threads allow shared resources, which lead to unnecessary complexity. Locks, bottlenecks, bugs… Instead Erlang takes a different approach, and rather than wade through the quagmire of shared resources and resource bottlenecks, Erlang embraces the philosophy of lightweight processes. Erlang has aimed to simplify the creation, management and communication within applications with many processes. Erlang aims to remove side effects and mutability using the functional programming paradigm. Erlang processes are managed entirely by the runtime, not the OS. Distributed message passing is a basic language-level construct in Erlang, which eliminates the need for locking and improves concurrency. Erlang makes it easy to monitor the death of a process. Killing related processes and starting new ones is a trivial exercise. Erlang allows code hot-swapping. You can replace pieces of your applications without stopping your code. This allows for simpler maintenance strategies. Erlang combines the robust “Let it crash” error strategies with hot-swapping and lightweight processes that can be started with minimal overhead. No wonder some Erlang applications can run for years without downtime.
  4. When you remove mutable state from the equation, concurrency gets dramatically simpler. Erlang programs are built from the inside out for concurrency.
  5. Traditionally, functions and methods have side effects, which make it impossible for us to prove the correctness or predict their outcomes. Threads have shared state rather than shared-nothing processes for performance, which means we have to do more work to protect code.
  6. Erlang is built for reliability. The core libraries have been tested, and applications written with Erlang are among the most reliable systems in the world.