Skip to content

A repository for learning Erlang and Elixir, two powerful languages running on the BEAM virtual machine, focused on concurrency, fault-tolerance, and functional programming.

Notifications You must be signed in to change notification settings

auth-Afham/Learn-BEAM-Lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Learn-BEAM-Lang

Welcome to Learn-BEAM-Lang, a project dedicated to learning Erlang and Elixir, two powerful languages that run on the BEAM (Bogdan/Björn's Erlang Abstract Machine) virtual machine.

This repository is intended for those who are new to Erlang and Elixir and want to explore their features, concurrency models, fault-tolerant systems, and functional programming principles.

Table of Contents

Overview

Erlang is an established functional programming language created for building concurrent, distributed, and fault-tolerant systems. It's used by large-scale systems like WhatsApp and RabbitMQ.

Elixir is a modern functional language that runs on the same BEAM VM as Erlang but offers more features like metaprogramming, modern syntax, and robust tools to make development easier. Elixir also excels in web development, especially with the Phoenix framework.

Both languages are widely used for their powerful concurrency model and reliability in distributed systems.

Why Learn Erlang and Elixir?

  • Concurrency and Fault-Tolerance: Both languages excel in building concurrent, distributed, and fault-tolerant applications.
  • Functional Programming: Elixir and Erlang emphasize functional programming paradigms that help you write more predictable, maintainable, and testable code.
  • Scalability: BEAM's lightweight process model allows for highly scalable systems, especially for web apps and microservices.
  • Growing Ecosystem: With Elixir's rise in popularity, there is a strong community, especially in web development (via Phoenix).

Project Structure

This repository is structured to teach both Erlang and Elixir:

Learn-BEAM-Lang/
├── Elixir/
│   └── my_first_project/
│       ├── _build/                # Build artifacts
│       ├── deps/                  # Elixir dependencies
│       ├── lib/                   # Project source code
│       ├── test/                  # Unit tests
│       ├── mix.exs                # Elixir project configuration
│       ├── .gitignore             # Elixir-specific git ignore
│       └── README.md              # Elixir project README
│
└── Erlang/
    └── README.md                  # Erlang-specific documentation

Key Directories:

  • Elixir/: Contains Elixir-based projects. It includes an example of an Elixir application (my_first_project) with basic Elixir setup and example code.
  • Erlang/: Contains examples and resources for Erlang. This directory will include Erlang-specific resources and examples of how to write Erlang code.

.gitignore:

A .gitignore file is included to help you exclude common build artifacts, IDE files, and other system-specific files from version control.

Getting Started

Prerequisites

  1. Install Erlang: Erlang is required for running both Erlang and Elixir code since Elixir runs on the Erlang VM (BEAM).
  2. Install Elixir: Elixir is built on top of Erlang, so you'll need it to run Elixir projects.

Clone this Repository:

To get started with this project, clone the repository:

git clone https://github.com/yourusername/Learn-BEAM-Lang.git

Elixir Example:

To run the Elixir project:

  1. Navigate to the Elixir directory:
    cd Learn-BEAM-Lang/Elixir/my_first_project
  2. Install the dependencies:
    mix deps.get
  3. Run the application:
    mix run

Erlang Example:

To start an Erlang shell, you can simply run the erl command in the Erlang directory:

erl

Contributing

We welcome contributions to this repository! If you want to contribute, feel free to:

  • Fork the repository
  • Create a new branch
  • Make your changes
  • Open a pull request

Please ensure that your contributions follow the general structure and coding standards used in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A repository for learning Erlang and Elixir, two powerful languages running on the BEAM virtual machine, focused on concurrency, fault-tolerance, and functional programming.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published