Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Erlang written in?

What is Ericsson's implementation of Erlang and Erlang/OTP written and compiled in? Is is assembly, C or Erlang itself?

Update 1: Thanks to DrJokepu. If I understand correctly, Erlang source-to-VM compiler is written in Erlang itself. But the VM is written in C.

Update 2: Hynek-Pichi-Vychodil pointed out a lot of details.

  • VM and HW interacting drivers: in C.
  • Compiler (to VM) and libraries: in Erlang.
  • Extensions: Possible in any language by writing a port or an Erlang node in that language.
like image 953
CDR Avatar asked Feb 13 '09 14:02

CDR


People also ask

What does Erlang run on?

8.4 What operating systems does Erlang run on? There are reports on the mailing list of other people compiling it successfully on IRIX, along with reports of Erlang running on less usual systems such as iPhones, Xboxes, QNX, Tilera 64-core CPUs and many embedded systems.

What type of programming language is Erlang?

Erlang (/ˈɜːrlæŋ/ UR-lang) is a general-purpose, concurrent, functional programming language, and a garbage-collected runtime system.

Is Erlang worth learning 2021?

Yes. Overall, Erlang is well-suited for creating fast and scalable web apps. If you get there, it is quite rewarding.


1 Answers

Erlang itself is written in Erlang. Sounds strange? Yes, because it is only partially true. OK look at it in more detail:

  1. Erlang preprocessor is written in Erlang.
  2. Erlang parser is written in Erlang.
  3. Erlang compiler to BEAM (byte-code VM) is written in Erlang.
  4. Erlang compiler to HiPE (native VM extension) is written in Erlang.
  5. Erlang VM BEAM and HiPE is written mostly in C.
  6. Linked-in drivers are written mostly in C. (They are plugged to VM and serves communication with outside world.)
  7. OTP is written in Erlang.
  8. Another ports or nodes can be written in any language.
like image 178
Hynek -Pichi- Vychodil Avatar answered Oct 28 '22 17:10

Hynek -Pichi- Vychodil