BEAM (Erlang virtual machine)

Last updated

BEAM is the virtual machine at the core of the Erlang Open Telecom Platform (OTP). [1] BEAM is part of the Erlang Run-Time System (ERTS), which compiles Erlang source code into bytecode, which is then executed on the BEAM. [2] [3] BEAM bytecode files have the .beam file extension. [4]

Contents

Originally BEAM was short for Bogdan's Erlang Abstract Machine, named after Bogumil "Bogdan" Hausman, who wrote the original version, but the name may also be referred to as Björn's Erlang Abstract Machine, after Björn Gustavsson, who wrote and maintains the current version. [1] [5] [6] Both developers worked on the system while at Ericsson. [7] [8]

The predecessor of the BEAM was JAM (Joe's Abstract Machine), which was the first virtual machine for the Erlang language and was written by Joe Armstrong.

BEAM Languages

Although BEAM was created for Erlang, several other languages have been either created for it or ported to run on it. The most popular of these is Elixir, which had more responses than Erlang itself in a 2023 Stack Overflow developer survey. [9] Other notable examples include:

See also

Related Research Articles

<span class="mw-page-title-main">Erlang (programming language)</span> Programming language

Erlang 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.

<span class="mw-page-title-main">Java virtual machine</span> Virtual machine that runs Java programs

A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally describes what is required in a JVM implementation. Having a specification ensures interoperability of Java programs across different implementations so that program authors using the Java Development Kit (JDK) need not worry about idiosyncrasies of the underlying hardware platform.

<span class="mw-page-title-main">Interpreter (computing)</span> Program that executes source code without a separate compilation step

In computer science, an interpreter is a computer program that directly executes instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program. An interpreter generally uses one of the following strategies for program execution:

  1. Parse the source code and perform its behavior directly;
  2. Translate source code into some efficient intermediate representation or object code and immediately execute that;
  3. Explicitly execute stored precompiled bytecode made by a compiler and matched with the interpreter's virtual machine.

Bytecode is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references that encode the result of compiler parsing and performing semantic analysis of things like type, scope, and nesting depths of program objects.

<span class="mw-page-title-main">Scala (programming language)</span> General-purpose programming language

Scala is a strong statically typed high-level general-purpose programming language that supports both object-oriented programming and functional programming. Designed to be concise, many of Scala's design decisions are intended to address criticisms of Java.

In computer programming, a green thread is a thread that is scheduled by a runtime library or virtual machine (VM) instead of natively by the underlying operating system (OS). Green threads emulate multithreaded environments without relying on any native OS abilities, and they are managed in user space instead of kernel space, enabling them to work in environments that do not have native thread support.

The Dynamic Language Runtime (DLR) from Microsoft runs on top of the Common Language Runtime (CLR) and provides computer language services for dynamic languages. These services include:

<span class="mw-page-title-main">Clojure</span> Dialect of the Lisp programming language on the Java platform

Clojure is a dynamic and functional dialect of the programming language Lisp on the Java platform.

Redis is a source-available, in-memory storage, used as a distributed, in-memory key–value database, cache and message broker, with optional durability. Because it holds all data in memory and because of its design, Redis offers low-latency reads and writes, making it particularly suitable for use cases that require a cache. Redis is the most popular NoSQL database, and one of the most popular databases overall. Redis is used in companies like Twitter, Airbnb, Tinder, Yahoo, Adobe, Hulu, Amazon and OpenAI.

This article compares the application programming interfaces (APIs) and virtual machines (VMs) of the programming language Java and operating system Android.

Dart is a programming language designed by Lars Bak and Kasper Lund and developed by Google. It can be used to develop web and mobile apps as well as server and desktop applications.

<span class="mw-page-title-main">Snake case</span> Words joined with underscores

Snake case is the naming convention in which each space is replaced with an underscore (_) character, and words are written in lowercase. It is a commonly used naming convention in computing, for example for variable and subroutine names, and for filenames. One study has found that readers can recognize snake case values more quickly than camel case. However, "subjects were trained mainly in the underscore style", so the possibility of bias cannot be eliminated.

Elixir is a functional, concurrent, high-level general-purpose programming language that runs on the BEAM virtual machine, which is also used to implement the Erlang programming language. Elixir builds on top of Erlang and shares the same abstractions for building distributed, fault-tolerant applications. Elixir also provides tooling and an extensible design. The latter is supported by compile-time metaprogramming with macros and polymorphism via protocols.

Java bytecode is the instruction set of the Java virtual machine (JVM), the language to which Java and other JVM-compatible source code is compiled. Each instruction is represented by a single byte, hence the name bytecode, making it a compact form of data.

The table shows a comparison of functional programming languages which compares various features and designs of different functional programming languages.

<span class="mw-page-title-main">LFE (programming language)</span>

Lisp Flavored Erlang (LFE) is a functional, concurrent, garbage collected, general-purpose programming language and Lisp dialect built on Core Erlang and the Erlang virtual machine (BEAM). LFE builds on Erlang to provide a Lisp syntax for writing distributed, fault-tolerant, soft real-time, non-stop applications. LFE also extends Erlang to support metaprogramming with Lisp macros and an improved developer experience with a feature-rich read–eval–print loop (REPL). LFE is actively supported on all recent releases of Erlang; the oldest version of Erlang supported is R14.

<span class="mw-page-title-main">Hy (programming language)</span> Dialect of the Lisp programming language designed to interact with Python

Hy is a dialect of the Lisp programming language designed to interact with Python by translating s-expressions into Python's abstract syntax tree (AST). Hy was introduced at Python Conference (PyCon) 2013 by Paul Tagliamonte. Lisp allows operating on code as data (metaprogramming), thus Hy can be used to write domain-specific languages.

<span class="mw-page-title-main">Gleam (programming language)</span> Programming language

Gleam is a general-purpose, concurrent, functional high-level programming language that compiles to Erlang or JavaScript source code.

References

  1. 1 2 "The Erlang Runtime System". happi.github.io. Retrieved 2018-05-05.
  2. Martin., Logan (2011). Erlang and OTP in action. Merritt, Eric., Carlsson, Richard. Stamford, CT: Manning Pub. ISBN   9781933988788. OCLC   747046900.
  3. "Most Popular Programming Languages of 2018 - Elite Infoworld Blog". 2018-03-30. Archived from the original on 2018-05-09. Retrieved 2018-05-08.
  4. Zachary., Kessin (2012). Building web applications with Erlang. Beijing: O'Reilly. ISBN   9781449309961. OCLC   802882644.
  5. "erlang/otp". GitHub. Retrieved 2018-05-06.
  6. "Confirmed Errata | O'Reilly Media" . Retrieved 2018-05-06.
  7. Kerjouan, Mathieu (2017-07-17). "Serialization series — Do you speak Erlang ETF or BERT? (part 1)". Medium. Retrieved 2018-05-06.
  8. "Erlang BEAM Instruction Set". www.cs-lab.org. Retrieved 2018-05-06.
  9. "Stack Overflow Developer Survey 2023". Stack Overflow. Retrieved 2024-01-09.
  10. Facorro, Juan. "Clojerl". GitHub. Retrieved 2024-01-09.
  11. "Cuneiform". Cuneiform. Retrieved 2024-01-09.
  12. "Gleam". Gleam. Retrieved 2024-01-09.
  13. "LFE". GitHub. Retrieved 2024-01-09.
  14. "luerl". GitHub. Retrieved 2024-01-09.