Ron Garret here. AMA.

Is Lisp + message passing a bridge too far? ie https://lfe.io/ Does Lisp on the BEAM hold any appeal for you?

I don't know what Lisp on the BEAM is (and neither does DDG).

With regards to LFE, I don't really see the point. But that might just be because of the kinds of coding I do. I've never written high performance massively parallel code. Message passing might have a benefit there (that is what the big win with Erlang is supposed to be) but I'm generally skeptical of designing the language semantics around the needs of the compiler rather than the programmer.

In particular, I don't see what Erlang could possibly do that could not be done by a CL compiler that noticed when a method was dispatching only on the first argument. The semantics of that are equivalent to the semantics of message passing, and so the code that such a compiler emits could be identical in both cases. But I don't actually know Erlang so it's possible I'm missing something.

With Erlang it's necessary to separate the compiler from the VM. You are working around what the VM wants but the compiler is not a problem. The VM acts a bit like an operating system that can schedule its own processes and processes can send each other messages. In order to receive a message a process has to have a receive block and be capable of receiving the message (with an applicable pattern match). When a process is waiting for a message, it is set aside by the VM so it consumes very few resources (just a bit of memory). It is woken up when it receives a message. This way a single 'program' can have many things going on at once and it is never blocking. From the programmer's perspective it feels like you are writing synchronous code but you are getting async behaviour 'for free'.

wrt LFE specifically, Robert Virding, one of the founders of Erlang, really likes languages and Lisp in particular so he wrote one for the BEAM. It just has some special accommodations to be able to send/receive (and I think pattern recognition too).

That actually sounds pretty cool as a runtime environment. Is the VM programmed in byte code, or is it native code? What back ends are available? What is the runtime written in?

The BEAM (runtime?) is written in C. There is also an effort to rewrite it in Rust (https://github.com/lumen/lumen). Some functions are built into the VM but most of the supporting 'standard library' (OTP / Open Telecom Platform) is written in Erlang. The (main) compiler is written in C. So it's all C or Erlang afaik.

It is ported to every major flavour of OS.

I don't know what 'back end' means in this context.

> It is ported to every major flavour of OS.

There also used to be an implementation of the BEAM VM directly on Xen: https://github.com/cloudozer/ling / https://web.archive.org/web/20190507184436/https://erlangonx...