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 the 2023 Stackoverflow 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">Yukihiro Matsumoto</span> Japanese computer scientist (born 1965)

Yukihiro Matsumoto, also known as Matz, is a Japanese computer scientist and software programmer best known as the chief designer of the Ruby programming language and its original reference implementation, Matz's Ruby Interpreter (MRI). His demeanor has brought about a motto in the Ruby community: "Matz is nice and so we are nice," commonly abbreviated as MINASWAN.

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

A compiled language is a programming language whose implementations are typically compilers, and not interpreters.

<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 Lisp programming language on the Java platform.

<span class="mw-page-title-main">V8 (JavaScript engine)</span> Open-source JavaScript and WebAssembly engine developed by Google

V8 is a free and open-source JavaScript and WebAssembly engine developed by the Chromium Project for Chromium and Google Chrome web browsers. The project's creator is Lars Bak. The first version of the V8 engine was released at the same time as the first version of Chrome: 2 September 2008. It has also been used on the server side, for example in Couchbase, Deno and Node.js.

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.

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

HipHop Virtual Machine (HHVM) is an open-source virtual machine based on just-in-time (JIT) compilation that serves as an execution engine for the Hack programming language. By using the principle of JIT compilation, Hack code is first transformed into intermediate HipHop bytecode (HHBC), which is then dynamically translated into x86-64 machine code, optimized, and natively executed. This contrasts with PHP's usual interpreted execution, in which the Zend Engine transforms PHP source code into opcodes that serve as a form of bytecode, and executes the opcodes directly on the Zend Engine's virtual CPU.

<span class="mw-page-title-main">Hy</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.

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.