Everything you need to know to get started with Erlang

Erlang is a programming language built for systems distributed from the ground up. Measurable, strong that Erlang for you.
Erlang is one of the earliest languages based on the functional programming paradigm that was created in 1986 for Ericsson’s internal proprietary use. It is a platform for instant targeting, delivering and error-tolerant telecommunications applications. It was one of the few places where Ericsson was first seen in the software technology scene, and was one of the reasons the language was made open source in 1998 after it was banned from developing more products internally.
Most importantly, Ericsson wanted to focus on developing hardware products rather than producing software stacks that empowered them. But it proved to be better in a way, especially considering the fact that those responsible for developing and writing such a language, such as Joe Armstrong, Robert Verding, and Mike Williams, left the company immediately and left. When it becomes open source, it is widely accepted. However, they were later re-employed and the ban was lifted. To date, it has a rich community that actively develops it for a wide range of manufacturing applications.
The name of this language is apparently inspired by the unit of the same name, which was used to measure loads on telecommunication switches and other devices. Originally, its use was obviously limited to most telecom systems, but today it operates under the hood for many large scale distribution systems.
Joe Armstrong, co-founder of Erlang
Although it may not be as ubiquitous in the broader technology sector as other languages like C or Java, our systems are becoming more complex and distributed at the same time and its relevance is increasing day by day. It is becoming more and more influential due to the increasing focus and availability of multicore processors, which makes simultaneous and multiprocessing more important. The use of Erlang has become more influential in the development of modern software that is used in systems such as chatting, commenting, transactional data management and networking devices.
While companies such as Facebook, Whatsapp, Amazon, Rackspace, etc., actively use it as part of their underlying stack with popular open source software such as RabbitMQ and CouchDB, Erlang’s success in the modern distribution system was largely undeniable. Software. It is also used as part of the Disco MapReduce framework and the YAWS web server.
Riak is a NoSQL database that uses He laid
How, what and why Erlang?
A conventional programmer will see Erlang as a language that deals with integration, resilience, and data flow in a very unique way and may seem unusual or difficult to some of you. But some of these features along with excellent learning material make the language very interesting once you get looped with all these aspects. OTP or open telecom platform is the most important part of this language. It is a set of libraries and a complete structure that provides communication protocols, static analysis tools, interpreters, compilers and a distributed database called Mnesia. The language can be compiled and run on a virtual machine like Java, or it can be used in an interactive environment like Python. The compiler, known as the beam, converts the source code into a byte code, which is converted to threaded code during loading. Some of the key principles behind how language works can be summarized with the following points:
Consistency and interoperability communication
Concurrency and distributed computing is one of the primary aspects on which language is based. One of the main reasons that helps together is that not all of Erlang’s data structures are unchanging and unchangeable, it avoids focusing on locks, semaphore and other ways to try to ensure the sanctity of shared data. Processes are like primary building blocks that form part of an Erlang program, and each process communicates with another using an asynchronous message passing protocol. No data is shared between any two processes and these processes run on the same node or are part of a larger distributed cluster. This makes it more secure and predictable, since data is shared only when there is clear and explicit communication between the two processes.
Pattern matching
Pattern matching is another feature that is inherited from the functional programming concept. This practice promotes declarative syntax and makes it much easier to work with complex data structures. For example, the comprehension list, which is inspired by Lisp, and other such languages form an important part of Erlang.
Perseverance
Erlang is designed to ensure error tolerance and robustness of a system. Erlang’s messaging system has been implemented in such a way that even if a process fails or stops working, it can tell the cause before killing, so that the remaining processes can bypass or take appropriate action. These error handling processes allow developers to create programs that allow processes to fail and make the code more clean and smaller because most of these things are handled by the built-in library, rather than the programmer coding. Definitely them.
Hot swapping or code loading
With the concept of distributed computing in mind, Erlang ensures that any part of its code or program can be replaced or updated without any problems or hiccups. This makes scalability an important feature of the language and you can take advantage of multicore processors, add new nodes or change things transparently without affecting the rest of the system. This is possible because a process can contain references to an old and new version of the same module and can be switched on at a specific time by an external call that modules
The next step
Given that Erlang doesn’t have such a large community around, like other languages, there are limited outlets where you can view Erlang code and learn it from scratch. But some of these resources, including official documentation, can help you get an overview. You can give it a try here in the form of an online interpreter where you can try to run some basic commands. However, in our opinion the best and easily most popular Erlang book by Fred Hebert is available online here. It includes a nice introduction and takes you step by step with the help of some funny cartoons. Some of the better books include Joe Armstrong’s Programming Erlang and Francesco Cesarini and Simon Thompson’s O’Reilly’s Erlang Programming. To get started you can either download it from here or get it from your distribution repository if you are on a Linux system.
A good way to start learning is to start looking at functional programming concepts, move on to different data structures and then finally distribute and look at parallel features. There will be a sample program to show how the Fibonacci function can be defined
As follows:
fibonacci
(0) -> 0 ;
fibonacci
(1) -> 1 ;
fibonacci
(N) when N > 0 ->
fibo
(N-1) +
fibo
(N-2) .
An example of immutable variables can be shown by trying to assign different values to a variable at different points in time: -
1> A = 456.
2> A = 345.
** exception error: no match of right hand side value 345
Erlang lists are always present and can be used for many operations. These can be defined by square brackets and can contain anything, even functions: –
3> [a,b,c,34,45,[1,2,3]]
[a,b,c,34,45,[1,2,3]]
Tuples is another data type that can be used for comparison activities and is defined by curly braces: –
4> {a,b,c,34,45,{1,2,3}}.
{a,b,c,34,45,{1,2,3}}.
Atom is a static string literal which is used internally for message passing and other functions: –
5> Hello.
Hello
This completes our discussion and overview for this language but you can go through the links and documentation in the reference section.
References
http://www.erlang.org/course/course.html
http://www.erlang-in-anger.com/
http://erlangcentral.org/
https://www.erlang-solutions.com/
Joe Armstrong’s Thesis
Erlang Handbook
http://chimera.labs.oreilly.com/books/1234000000726/index.html
http://en.wikibooks.org/wiki/Erlang_Programming
Visit here for tutorials on the other 15 hot programming languages.