Wikipedia says "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."
Whether the B is for Bogdan or Bjorn, there's something really fun and Space Quest-y about it.
I really just wish the BEAM was portable in the way the JVM is. The BEAM hooks into so many system libraries, you must compile it on every flavor of linux instead of just unpacking a tarball.
This means you either must use your distro package manager's version, or compile from scratch. If you want to control the exact version that's being used across your team (via `asdf` or similar), this practically means you'll end up compiling the BEAM over and over...
Digging into it, you can get "universal" BEAM tarballs from here[1]. It links against muslibc and appears to bring it's own openssl. Very cool.
Inferno is both register based and highly portable using the same tool chain as Plan 9 which runs seamlessly across multiple architectures. This eventually evolved into the Go tooling as Rob Pike came up with the Plan 9 design and worked on it with Ken Thompson. https://seh.dev/go-legacy/
Unfortunately Inferno was never fully completed and bit-rotted a bit but it still builds on systems with 32 bit support. There are various forks and even an attempted 64 bit version. To me its a great design as it not only runs on bare metal but also has a hosted option so it runs under Plan 9, Windows, MacOS/Unix/BSD/Linux. Talk about a portable OS...
It's rather unfortunate, Inferno is a really nice system with a lot of interesting reference stuff implemented like a typed shell[3]. It's also Plan 9 in a box with all the accoutrements, and knowers will have jumped out of their seat at the implication. I can't understate how cool the Inferno system is.
[1] - https://github.com/Plan9-Archive/9ferno
[2] - https://en.wikipedia.org/wiki/Limbo_(programming_language)
[3] - https://inferno-os.org/inferno/man/2/alphabet-intro.html
This isn't true, one can statically compile the BEAM for Linux exactly the same as the JVM. Here's an example: https://github.com/yoshi-monster/static_erlang/
On my relatively powerful workstation, Erlang/BEAM takes about 7 minutes to compile.
We're working around this currently by having a fat devcontainer image, pre-built with Erlang inside (from source) by our CI. It chews through CI minutes unavoidably due to how docker layer caching works.
It would be awesome to just download and unpack a tarball, regardless of which distro you're using.
I get that if you've gone through the pain of learning it you get a system with some very nice properties. But casually suggesting "maybe try nix" is a bit like telling someone who wants to listen to Mozart "maybe try playing a piano".
A suggestion: Please add a "Overview" section in the beginning to provide the big-picture architecture since without that it would be hard to understand your code.
PS: In case you didn't see it, my comment here mentions some documents that you might find useful for your implementation - https://news.ycombinator.com/item?id=45883694
See also The Erlang BEAM Virtual Machine Specification by the OG Bogumil Hausman himself ! Note: This document describes BEAM as it was in 1997. BEAM has grown and changed significantly between then and the time this note was added (2012). This information is mainly for historical interest. - https://www.cs-lab.org/historical_beam_instruction_set.html
Together, they should provide a lot of insights into ERTS/BEAM.
I hope that's preserved and one day published as e.g. the old MIT AI lab file system snapshots were.
(Robert Virding or Bjärne Däcker might well have a copy of the Prolog code to share if asked nicely.)