SlideShare a Scribd company logo
1 of 26
Learning Erlang


                   Ivan Yatskevich
    Lead Software Engineer, EPAM
Learn at least one new language
           every year.
     Tip 8: Invest Regularly in Your
          Knowledge Portfolio
OTP
                                      Framework
                           Parallel
                           Erlang
             Distributed
             Erlang

Sequential
Erlang
Part I: Sequential Erlang
Data types, modules, functions, variables and pattern matching
Data types

• Numbers
 12, 2#10, 16#FF, 2.76
• Atoms
 ok, false, summer, „Wednesday‟
• Bit strings and binaries
 <<“Are you sure?”>>, <<45, 19, 4>>
Data types (cont’d)

• Containers (Lists, Tuples)
 List = [1, true, “Erlang”]
 Tuple = {io, format, [“~p~n”]}
• Functions
 Tripler = fun(N) -> N*3 end
• Identifiers (Refs, Pids, Ports)
(Fake) Data types

• Boolean
 true, false
• String
 “ABC” = [65, 66, 67]
• Record (≈tuple)
Building blocks

• Modules
• Functions
  •   Clauses
  •   Guards
  •   MFA
  •   BIFs
• Control structures
  • Case, If
  • Catch
Variables and Matching



Index ≠ Index + 1
{ "data":
  { "translations": [
     { "translatedText": "Hallo Welt" }
    ]
  }
}
Variables and Pattern Matching
Translation =
{data,
  {translations, [
     {translatedText, "Hallo Welt"}
    ]
  }
}.
{data,
  {translations, [
     {translatedText, Text}|Tail
    ]
  }
} = Translation.
Variables and Pattern Matching
Translation =
{data,
  {translations, [
     {translatedText, "Hallo Welt"}
    ]
  }
}.

{_, {_, [{_, Text}|_]}} = Translation.
LAN




Part II: Distributed Erlang
Nodes, net_adm module, a lot of fun
Distributed Erlang

• Nodes
 $ erl –name nyan_cat@127.0.0.1
• Cookies
 $ erl –sname nyan_cat –setcookie secret
• net_adm:ping
 erl> net_adm:ping(tom_cat@192.168.32.4).
Part III: Parallel Erlang
Processes, Pids, message passing
Parallel Erlang
• Processes
 Pid = spawn(fun() -> hi end).
• Sending message
 Pid ! {any_message, [“with”, list]}.
• Receiving message
 receive
    Pattern1 -> action1;
    Pattern2 -> action2
 after
    TimeInMs ->
         action_after_timeout
 end.
Parallel Erlang (cont’d)
• self()
• make_ref()
• System process and linking
• Named process
 register(name_as_atom, Pid).
Part IV: OTP Framework
Overview
OTP Framework



http://learnyousomeerlang.com/what-is-otp
Resources
• http://www.erlang.org
• http://www.tryerlang.org
• http://learnyousomeerlang.com
• http://www.trapexit.org/
• Programming Erlang, by Joe Armstrong
• Erlang Programming, by Francesco Cesarini and
  Simon Thompson
• Erlang and OTP in Action, by Martin Logan, Eric
  Merritt, and Richard Carlsson
• http://nyan.cat
Thank you!




Q&A

More Related Content

What's hot

Basic Concepts in Python
Basic Concepts in PythonBasic Concepts in Python
Basic Concepts in PythonSumit Satam
 
Full Python in 20 slides
Full Python in 20 slidesFull Python in 20 slides
Full Python in 20 slidesrfojdar
 
introduction to python
 introduction to python introduction to python
introduction to pythonJincy Nelson
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPTShivam Gupta
 
Python introduction towards data science
Python introduction towards data sciencePython introduction towards data science
Python introduction towards data sciencedeepak teja
 
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.Niraj Bharambe
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming LanguageTahani Al-Manie
 
The Ring programming language version 1.10 book - Part 7 of 212
The Ring programming language version 1.10 book - Part 7 of 212The Ring programming language version 1.10 book - Part 7 of 212
The Ring programming language version 1.10 book - Part 7 of 212Mahmoud Samir Fayed
 

What's hot (20)

Basic Concepts in Python
Basic Concepts in PythonBasic Concepts in Python
Basic Concepts in Python
 
Programming
ProgrammingProgramming
Programming
 
Python programming
Python programmingPython programming
Python programming
 
Full Python in 20 slides
Full Python in 20 slidesFull Python in 20 slides
Full Python in 20 slides
 
introduction to python
 introduction to python introduction to python
introduction to python
 
Python ppt
Python pptPython ppt
Python ppt
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPT
 
Python introduction towards data science
Python introduction towards data sciencePython introduction towards data science
Python introduction towards data science
 
Python
PythonPython
Python
 
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
 
Python Basics
Python BasicsPython Basics
Python Basics
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python Session - 2
Python Session - 2Python Session - 2
Python Session - 2
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming Language
 
Python Data Types
Python Data TypesPython Data Types
Python Data Types
 
1.Role lexical Analyzer
1.Role lexical Analyzer1.Role lexical Analyzer
1.Role lexical Analyzer
 
The Ring programming language version 1.10 book - Part 7 of 212
The Ring programming language version 1.10 book - Part 7 of 212The Ring programming language version 1.10 book - Part 7 of 212
The Ring programming language version 1.10 book - Part 7 of 212
 
Lex
LexLex
Lex
 
Python basics
Python basicsPython basics
Python basics
 
Python training
Python trainingPython training
Python training
 

Viewers also liked

Mid Year Survey Results PMI SOC 2012 Mentoring Program
Mid Year Survey Results PMI SOC 2012 Mentoring ProgramMid Year Survey Results PMI SOC 2012 Mentoring Program
Mid Year Survey Results PMI SOC 2012 Mentoring ProgramLindsay McLeod
 
Tecnologia
TecnologiaTecnologia
Tecnologiastar6862
 
Corporate changeagentsoverview
Corporate changeagentsoverviewCorporate changeagentsoverview
Corporate changeagentsoverviewPieter Duijst
 
How to get thin legs
How to get thin legsHow to get thin legs
How to get thin legspaulkellerman
 
Cambio apariencia a menu joomla con css
Cambio apariencia a menu joomla con cssCambio apariencia a menu joomla con css
Cambio apariencia a menu joomla con csshuelva_Es
 

Viewers also liked (7)

Mid Year Survey Results PMI SOC 2012 Mentoring Program
Mid Year Survey Results PMI SOC 2012 Mentoring ProgramMid Year Survey Results PMI SOC 2012 Mentoring Program
Mid Year Survey Results PMI SOC 2012 Mentoring Program
 
賞蝶去
賞蝶去賞蝶去
賞蝶去
 
Tecnologia
TecnologiaTecnologia
Tecnologia
 
SLIDESHARE
SLIDESHARESLIDESHARE
SLIDESHARE
 
Corporate changeagentsoverview
Corporate changeagentsoverviewCorporate changeagentsoverview
Corporate changeagentsoverview
 
How to get thin legs
How to get thin legsHow to get thin legs
How to get thin legs
 
Cambio apariencia a menu joomla con css
Cambio apariencia a menu joomla con cssCambio apariencia a menu joomla con css
Cambio apariencia a menu joomla con css
 

Similar to Erlang intro

Python programming
Python programmingPython programming
Python programmingsaroja20
 
Erlang Message Passing Concurrency, For The Win
Erlang  Message  Passing  Concurrency,  For  The  WinErlang  Message  Passing  Concurrency,  For  The  Win
Erlang Message Passing Concurrency, For The Winl xf
 
01-Python-Basics.ppt
01-Python-Basics.ppt01-Python-Basics.ppt
01-Python-Basics.pptVicVic56
 
Erlang/OTP for Rubyists
Erlang/OTP for RubyistsErlang/OTP for Rubyists
Erlang/OTP for RubyistsSean Cribbs
 
Introduction To Erlang Final
Introduction To Erlang   FinalIntroduction To Erlang   Final
Introduction To Erlang FinalSinarShebl
 
Basics of Python Programming in one PDF File.pdf
Basics of Python Programming in one PDF File.pdfBasics of Python Programming in one PDF File.pdf
Basics of Python Programming in one PDF File.pdfKrizanReyFamindalan
 
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...siouxhotornot
 
Erlang is not a city in Germany
Erlang is not a city in GermanyErlang is not a city in Germany
Erlang is not a city in Germanymomo-13
 
Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdfsamiwaris2
 
Erlang
ErlangErlang
ErlangESUG
 
Keynote joearmstrong
Keynote joearmstrongKeynote joearmstrong
Keynote joearmstrongSentifi
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeDmitri Nesteruk
 
R tech introcomputer
R tech introcomputerR tech introcomputer
R tech introcomputerRose Rajput
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...DRVaibhavmeshram1
 
1B-Introduction_to_python.ppt
1B-Introduction_to_python.ppt1B-Introduction_to_python.ppt
1B-Introduction_to_python.pptAmritMarwaha1
 
Migrating from matlab to python
Migrating from matlab to pythonMigrating from matlab to python
Migrating from matlab to pythonActiveState
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughgabriellekuruvilla
 
Tutorial on-python-programming
Tutorial on-python-programmingTutorial on-python-programming
Tutorial on-python-programmingChetan Giridhar
 
JavaOne 2012 - CON11234 - Multi device Content Display and a Smart Use of Ann...
JavaOne 2012 - CON11234 - Multi device Content Display and a Smart Use of Ann...JavaOne 2012 - CON11234 - Multi device Content Display and a Smart Use of Ann...
JavaOne 2012 - CON11234 - Multi device Content Display and a Smart Use of Ann...gdigugli
 

Similar to Erlang intro (20)

Python programming
Python programmingPython programming
Python programming
 
Erlang Message Passing Concurrency, For The Win
Erlang  Message  Passing  Concurrency,  For  The  WinErlang  Message  Passing  Concurrency,  For  The  Win
Erlang Message Passing Concurrency, For The Win
 
01-Python-Basics.ppt
01-Python-Basics.ppt01-Python-Basics.ppt
01-Python-Basics.ppt
 
Erlang/OTP for Rubyists
Erlang/OTP for RubyistsErlang/OTP for Rubyists
Erlang/OTP for Rubyists
 
Introduction To Erlang Final
Introduction To Erlang   FinalIntroduction To Erlang   Final
Introduction To Erlang Final
 
Basics of Python Programming in one PDF File.pdf
Basics of Python Programming in one PDF File.pdfBasics of Python Programming in one PDF File.pdf
Basics of Python Programming in one PDF File.pdf
 
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
 
GE3151_PSPP_UNIT_5_Notes
GE3151_PSPP_UNIT_5_NotesGE3151_PSPP_UNIT_5_Notes
GE3151_PSPP_UNIT_5_Notes
 
Erlang is not a city in Germany
Erlang is not a city in GermanyErlang is not a city in Germany
Erlang is not a city in Germany
 
Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdf
 
Erlang
ErlangErlang
Erlang
 
Keynote joearmstrong
Keynote joearmstrongKeynote joearmstrong
Keynote joearmstrong
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/Invoke
 
R tech introcomputer
R tech introcomputerR tech introcomputer
R tech introcomputer
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
 
1B-Introduction_to_python.ppt
1B-Introduction_to_python.ppt1B-Introduction_to_python.ppt
1B-Introduction_to_python.ppt
 
Migrating from matlab to python
Migrating from matlab to pythonMigrating from matlab to python
Migrating from matlab to python
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthrough
 
Tutorial on-python-programming
Tutorial on-python-programmingTutorial on-python-programming
Tutorial on-python-programming
 
JavaOne 2012 - CON11234 - Multi device Content Display and a Smart Use of Ann...
JavaOne 2012 - CON11234 - Multi device Content Display and a Smart Use of Ann...JavaOne 2012 - CON11234 - Multi device Content Display and a Smart Use of Ann...
JavaOne 2012 - CON11234 - Multi device Content Display and a Smart Use of Ann...
 

Recently uploaded

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
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
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Recently uploaded (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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...
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Erlang intro

Editor's Notes

  1. Это не означает, что нужно овладеть языком на профессиональном уровне. Новый язык = новые идеи, подходы, иной способ мышления...
  2. Это был знак. Без долгих раздумий я приступил к изучению нового для меня языка. Сегодня я вам расскажу занимательную историю о том, как Erlang оказал существенное влияние на успех NyanCat’a.
  3. Сегодня мы узнаем, что пришлось сделать Нян Кэту на пути к успеху и параллельно изучим основные концепции языка Erlang. Начнем с типов данных и основных конструкций языкаи закончим обзором OTP фреймворка.
  4. Вот за что мне нравится Эрланг – в нем так мало встроенных типов!!! Но тут возникает – а достачно ли их?! Может каких-то типов нам не хватает?
  5. Показать, как создать запись. Запись ~= tuple. Теперь у нас есть всё (ну или почти всё), для того, чтобы создать Nyan Cat’а. Конечно же реальные приложения не пишутся в шеле Эрланга.
  6. Большое демо – создаем модуль nyan, функцию sing с проверкой, что тип – это atom, функцию eat, которая принимает только запись типа food (food, {content}). Case на примере реакции кота на определенную еду.MFA на примере apply, использование MFA можно встретить во многих модулях из stdlibBIFs – невозможно реализовать в Erlang, либо реализация будет неоптимальной: date(), time().Try..catch – есть, но не будем его сегодня рассматривать.А теперь более подробно поговорим о переменных... Мы уже видели, что переменные в Эрланге начинаются с большой буквы.ЭЭ, а где циклы?
  7. С большой буквыПоказать ошибку, когда I = I + 1Bound &amp; unbound
  8. Пример Саши Колоницкого
  9. Variable placeholder =&gt; “_”Unused variable = starts with “_” – “_Tail”Паттерн слева, выражение справа вычисляется и потом сравнивается с паттерном.Нет никакой связи с паттернами в смысле регулярных выражений.В какой-то момент Нян Кэт понял, что сидя на одном компьютере сильно популярным не станешь (да и не безопасно это. А вдруг комп сломается?)И поэтому решил узнать, как работает Distributed Erlang.