字母 B. E. A. 和 M. 代表什么?我记得看到过对首字母缩略词“BEAM”的解释,但我没有再次找到它。
它出现在错误代码中:
➜ gentoo iex
Erlang/OTP 17 [erts-6.4.1] [source] [64-bit] [smp:8:8] [async-threads:10] [kernel-poll:false]
Interactive Elixir (1.0.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> import Math
08:05:02.839 [error] Loading of /var/opt/proj/elx/ubuntu/Elixir.Math.beam failed: :badfile
** (CompileError) iex:1: module Math is not loaded and could not be found
08:05:02.846 [error] beam/beam_load.c(1104): Error loading module 'Elixir.Math':
non-ascii garbage '78705400' instead of chunk type id
(elixir) src/elixir_exp.erl:123: :elixir_exp.expand/2
iex(1)>
因此,看起来 .beam 文件存在某种问题,可能是由于我使用了 vi。 (注意注意 Elixir 程序员:不要编辑 .beam 文件,这很痛苦。)
This question解释了 BEAM 虚拟机是什么,但没有解释字母代表什么。并且似乎很难在 Erlang central 上快速或准确地找到有关词源的很多信息。 . Supposedly BEAM 是 Erlang 和 Elixir 的秘诀。
最佳答案
它代表“Bogdan/Björn 的 Erlang 抽象机”——它只是 VM 的名称,很像 JVM(Java 虚拟机)。
Almost everyone uses "the new BEAM", where BEAM stands for Bogdan/Björn's Erlang Abstract Machine. This is the virtual machine supported in the commercial release.
http://www.erlang.org/faq/implementations.html
这个名字可能是从 Warren Abstract Machine 中找到它的路由——一个 Prolog 的抽象指令集,你可以在以下位置阅读:http://en.wikipedia.org/wiki/Warren_Abstract_Machine
WAM 影响了 JAM(Joe Abstract Machine - 以 Joe Armstrong 的名字命名),它是 BEAM 的前身。
您可以在 Erlang website 上的“Erlang 的开发”文章中阅读更多内容。 .
关于architecture - BEAM 在 elixir 编程语言的 iex 中代表什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30670087/