7 ms·
I agree up to the last point. You can catch panics at the thread level right? I mean, more generally, what is Erlang implemented in?
by ThemalSpan 4y ago
I agree up to the last point. You can catch panics at the thread level right? I mean, more generally, what is Erlang implemented in?
- d3ckard 4y agoIn C. You don’t operate on thread level directly, threads are just executors of processes managed by VM, usually the same amount as vCPU cores.
- Idiot_in_Vain 4y ago>> I mean, more generally, what is Erlang implemented in? Pure magic, that can't be recreated in any regular language :)
- Arch-TK 4y agoErlang is implemented on top of BEAM which has its own scheduler and schedules its own idea of lightweight processes.
- dolmen 4y agoIt looks like features that the Go runtime provides.
- ModernMech 4y agoOf course you could implement a language like Erlang in Rust, but I think the point is that you would have to do exactly that in order to do in Rust what Erlang does at the language level.
- dmitriid 4y ago> I mean, more generally, what is Erlang implemented in? "Any sufficiently complicated concurrent program in another language contains an ad hoc informally-specified bug-ridden slow implementation of half of Erlang." - Virding's Law ;) So first you have to implement all those things. And then use them.
- octacat 4y agoYou can in C/C++. Though, the point is that erlang has a strategy how to clean and recover from such error (some data can be lost, rarely we can crash the whole system for some errors). I mean, you can write erlang-way in almost any language, just in this case you need to adopt all the libraries to follow the same principles. Some languages implement similar error handling strategy by just creating a separate process per request (hello, php). We know how to clean after a worker dies (just let the worker die). Just in that case supervisor strategy is very simple.