User Tools

Site Tools


erlang

Erlang

Return to Elixir, Functional Programming Languages, GitHub star ranking for organizations, GitHub star ranking for repositories, GitOps or GitHub

Here is a comprehensive summary of the Erlang programming language in MediaWiki syntax, complete with section headings, URLs to the GitHub repository, official documentation, the official website, and five code examples.

Introduction to Erlang

Erlang is a concurrent, functional programming language designed for building scalable and maintainable applications, especially suited for concurrent systems. Developed by Ericsson in the mid-1980s, it was originally created to improve the development of telecommunication systems but has since found widespread use in various domains like banking, ecommerce, and instant messaging.

Design Philosophy

The language is designed around a lightweight process model, error handling mechanisms, and dynamic typing. Its concurrency model, based on the actor model, allows processes to communicate through message passing, making it highly effective for parallel programming.

Concurrency Model

Erlang's concurrency model is one of its defining features. It enables the creation of thousands of lightweight processes within the Erlang virtual machine (VM), facilitating the development of high-performance, concurrent applications with ease.

Fault Tolerance

Erlang is renowned for its fault tolerance. The language's approach to error handling and its “let it crash” philosophy allow developers to build robust systems that can recover from failures automatically, ensuring system reliability.

Erlang Syntax

The syntax of Erlang is distinctive and tailored to its functional and concurrent programming paradigms. It emphasizes pattern matching, recursion, and higher-order functions, offering a different approach compared to imperative programming languages.

OTP Framework

The Open Telecom Platform (OTP) is a set of Erlang libraries and design principles providing middleware to develop complex systems. It includes tools for building servers, supervising trees of workers, and dynamically upgrading running systems.

Distribution and Networking

Erlang excels in distributed systems. Its built-in support for networking and distribution allows developers to write systems that can be distributed over multiple nodes with little to no modification to the code.

Performance

While Erlang is not known for computational speed, its performance in terms of concurrency, fault tolerance, and system responsiveness is exceptional, especially in networked and distributed environments.

Ecosystem and Community

The Erlang ecosystem includes a variety of tools, libraries, and frameworks that extend its capabilities, supported by an active and engaged community of developers who contribute to its growth and development.

Applications of Erlang

Erlang is used in numerous high-profile applications, from telecommunications systems to database servers and web applications, exemplifying its versatility and reliability in production environments.

Learning Resources

For new developers, there are many resources available to learn Erlang, including official tutorials, books, online courses, and community forums, making it accessible to start with Erlang programming.

Erlang Installation

Erlang can be installed on various operating systems, including Windows, macOS, and Linux, with binaries available on its official website or through package managers like Homebrew and apt.

Erlang GitHub Repository

The Erlang source code and its contributions are available on GitHub, offering a resource for developers to explore its internals or contribute to its development. s://github.com/erlang/otp(https://github.com/erlang/otp)

Erlang Documentation

Comprehensive documentation for Erlang is available, detailing its syntax, modules, and OTP principles, serving as an invaluable resource for developers. s://www.erlang.org/docs(https://www.erlang.org/docs)

Official Erlang Website

The official website for Erlang provides downloads, documentation, and the latest news regarding the language and its development. s://www.erlang.org/(https://www.erlang.org/)

Code Example: Hello World

Erlang ```erlang -module(hello). -export([world/0]).

world() →

   io:fwrite("Hello, world!\n").
```

Code Example: Factorial Function

Erlang ```erlang -module(factorial). -export([fact/1]).

fact(0) → 1; fact(N) when N > 0 → N * fact(N-1). ```

Code Example: Concurrent Ping-Pong

Erlang ```erlang -module(pingpong). -export([start/0, ping/0, pong/0]).

start() →

   PongPid = spawn(?MODULE, pong, []),
   spawn(?MODULE, ping, [PongPid]).

ping(PongPid) →

   PongPid ! ping,
   receive
       pong ->
           io:fwrite("Ping received pong\n")
   end,
   ping(PongPid).

pong() →

   receive
       ping ->
           io:fwrite("Pong received ping\n"),
           self() ! pong
   end,
   pong().
```

Code Example: List Comprehensions

Erlang ```erlang -module(listcomp). -export([squares/1]).

squares(N) →

   [X*X || X <- lists:seq(1, N)].
```

Code Example: Map Function

Erlang ```erlang -module(mapfunc). -export([map/2]).

map(F, List) →

   [F(X) || X <- List].
```

These paragraphs and examples provide a detailed overview of Erlang, covering its history, design philosophy, key features, and practical applications, alongside essential resources for those interested in diving deeper into Erlang programming.


Snippet from Wikipedia: Erlang (programming language)

Erlang ( UR-lang) is a general-purpose, concurrent, functional high-level programming language, and a garbage-collected runtime system. The term Erlang is used interchangeably with Erlang/OTP, or Open Telecom Platform (OTP), which consists of the Erlang runtime system, several ready-to-use components (OTP) mainly written in Erlang, and a set of design principles for Erlang programs.

The Erlang runtime system is designed for systems with these traits:

  • Distributed
  • Fault-tolerant
  • Soft real-time
  • Highly available, non-stop applications
  • Hot swapping, where code can be changed without stopping a system.

The Erlang programming language has immutable data, pattern matching, and functional programming. The sequential subset of the Erlang language supports eager evaluation, single assignment, and dynamic typing.

A normal Erlang application is built out of hundreds of small Erlang processes.

It was originally proprietary software within Ericsson, developed by Joe Armstrong, Robert Virding, and Mike Williams in 1986, but was released as free and open-source software in 1998. Erlang/OTP is supported and maintained by the Open Telecom Platform (OTP) product unit at Ericsson.

YouTube Videos

GitHub Tags

External Sites

Main

  • erlang

Interesting Articles

Support Resources, FAQs, Q&A, Docs, Blogs

Search Engines

Repos and Registries

Courses

Books

Vidcasts-Podcasts

Erlang: Erlang Fundamentals, Erlang Inventor: Erlang Language Designer: Joe Armstrong in 1986; Erlang DevOps - Erlang SRE, Cloud Native Erlang - Erlang on Kubernetes - Erlang on AWS - Erlang on Azure - Erlang on GCP), Erlang Microservices, Erlang Containerization (Erlang Docker - Erlang on Docker Hub), Serverless Erlang, Erlang Data Science - Erlang DataOps - Erlang and Databases (Erlang ORM), Erlang ML - Erlang DL, Functional Erlang (1. Erlang Immutability, 2. Erlang Purity - Erlang No Side-Effects, 3. Erlang First-Class Functions - Erlang Higher-Order Functions, Erlang Lambdas - Erlang Anonymous Functions - Erlang Closures, Erlang Lazy Evaluation, 4. Erlang Recursion), Reactive Erlang), Erlang Concurrency - Erlang Parallel Programming - Async Erlang, Erlang Networking, Erlang Security - Erlang DevSecOps - Erlang OAuth, Erlang Memory Allocation (Erlang Heap - Erlang Stack - Erlang Garbage Collection), Erlang CI/CD - Erlang Dependency Management - Erlang DI - Erlang IoC - Erlang Build Pipeline, Erlang Automation - Erlang Scripting, Erlang Package Managers, Erlang Modules - Erlang Packages, Erlang Installation (Erlang Windows - Chocolatey Erlang, Erlang macOS - Homebrew Erlang, Erlang on Linux), Erlang Configuration, Erlang Observability (Erlang Monitoring, Erlang Performance - Erlang Logging), Erlang Language Spec - Erlang RFCs - Erlang Roadmap, Erlang Keywords, Erlang Data Structures - Erlang Algorithms, Erlang Syntax, Erlang OOP (1. Erlang Encapsulation - 2. Erlang Inheritance - 3. Erlang Polymorphism - 4. Erlang Abstraction), Erlang Design Patterns - Erlang Best Practices - Erlang Style Guide - Clean Erlang - Erlang BDD, Erlang Generics, Erlang I/O, Erlang Serialization - Erlang Deserialization, Erlang APIs, Erlang REST - Erlang JSON - Erlang GraphQL, Erlang gRPC, Erlang Virtualization, Erlang Development Tools: Erlang SDK, Erlang Compiler - Erlang Transpiler, Erlang Interpreter - Erlang REPL, Erlang IDEs (JetBrains Erlang, Erlang Visual Studio Code), Erlang Linter, Erlang Community - Erlangaceans - Erlang User, Erlang Standard Library - Erlang Libraries - Erlang Frameworks, Erlang Testing - Erlang TDD, Erlang History, Erlang Research, Erlang Topics, Erlang Uses - List of Erlang Software - Written in Erlang - Erlang Popularity, Erlang Bibliography - Erlang Courses, Erlang Glossary - Erlang Official Glossary, Erlang GitHub, Awesome Erlang. (navbar_erlang - see also navbar_erlang_versions, navbar_erlang_standard_library, navbar_erlang_libraries, navbar_erlang_reserved_words, navbar_erlang_functional, navbar_erlang_concurrency, navbar_elixir)


Cloud Monk is Retired (for now). Buddha with you. © 2005 - 2024 Losang Jinpa or Fair Use. Disclaimers

SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.


erlang.txt · Last modified: 2024/03/14 18:40 by 127.0.0.1