Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Rustler is a library for writing Erlang NIFs in safe Rust code. Parent comment
A NIF is basically VM code that undergo some minor limitation and runs at full speed.
BEAM is not a sandbox and will (probably) never be.
The most important lesson Erlang teaches is that there could be no recovery from crashes from the same code that crashed.
That's why in OTP Supervisors are in the shape of a tree, each level is responsible for its children and only its children.
If you need control on some process tree, you start another supervisor to supervise it and so on.
The same goes for the VM: if you need to supervise the VM, you start an external process to check its status.
A crashed process is better than a process that misbehaves.
Non locality of error handling is the only way to be really fault tolerant.
There are no comments on this comment yet.
A NIF is basically VM code that undergo some minor limitation and runs at full speed.
BEAM is not a sandbox and will (probably) never be.
The most important lesson Erlang teaches is that there could be no recovery from crashes from the same code that crashed.
That's why in OTP Supervisors are in the shape of a tree, each level is responsible for its children and only its children.
If you need control on some process tree, you start another supervisor to supervise it and so on.
The same goes for the VM: if you need to supervise the VM, you start an external process to check its status.
A crashed process is better than a process that misbehaves.
Non locality of error handling is the only way to be really fault tolerant.