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.
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.
- 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).
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
- 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.
A .gitignore
file is included to help you exclude common build artifacts, IDE files, and other system-specific files from version control.
- Install Erlang: Erlang is required for running both Erlang and Elixir code since Elixir runs on the Erlang VM (BEAM).
- Install Elixir: Elixir is built on top of Erlang, so you'll need it to run Elixir projects.
To get started with this project, clone the repository:
git clone https://github.com/yourusername/Learn-BEAM-Lang.git
To run the Elixir project:
- Navigate to the Elixir directory:
cd Learn-BEAM-Lang/Elixir/my_first_project
- Install the dependencies:
mix deps.get
- Run the application:
mix run
To start an Erlang shell, you can simply run the erl
command in the Erlang directory:
erl
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.
This project is licensed under the MIT License - see the LICENSE file for details.