字母 BEA 和 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 文件,这很痛苦。)
这个问题解释了 BEAM 虚拟机是什么,而不是字母代表什么。而且似乎很难快速找到关于词源的很多信息,或者在Erlang central上找到重点。据说BEAM 是 Erlang 和 Elixir 的秘方。