6 ms·
Mostly the Erlang mailing list. http://erlang.org/mailman/listinfo http://erlang.org/mailman/listinfo As an Erlanger, and maker of a NIF -> Rust library I was
by im_down_w_otp 10y ago
Mostly the Erlang mailing list. http://erlang.org/mailman/listinfo http://erlang.org/mailman/listinfo
As an Erlanger, and maker of a NIF -> Rust library I wasn't allowed to open source (sadly), I can tell you I think this is excellent. My current science project is trying to rebuild some small components of BEAM and the Erlang Runtime System in Rust that are currently in C.
Mostly the above is an exercise in understanding the internals of BEAM better, because my ideal end state is to figure out what it would take to make an Erlang/OTP-like library for Rust (with task/thread/process/whatever preemption)... which is actually what originally drew me to Rust 3-4 years ago back when it was shaped more like a systems-Erlang (task supervision hierarchies, etc) and less like a renovated-safe-C/C++.
- kibwen 10y ago> As an Erlanger, and maker of a NIF -> Rust library I wasn't allowed to open source (sadly) Presuming that this happened on company time, I'm curious to know if there's a company using Erlang+Rust in production or if this was just a fun side project. :)
- im_down_w_otp 10y agoYou are correct on the first count. On the latter... I've always been a fan of Twitter's mutual opt-in requirement for DM chatting. You're being followed. Which feels really weird and funny to write. But it'll be reasonably obvious.
- deleted 10y ago[deleted]
- tormeh 10y ago>Rust 3-4 years ago back when it was shaped more like a systems-Erlang (task supervision hierarchies, etc) and less like a renovated-safe-C/C++ Wow, any chance Erlang-like supervision and actor model in general might make a comeback in Rust? I'm sure the Erlang guys has thought about this, but no static type checking makes me a bit nervous. Erlang can be surprisingly strict (a good thing) in some ways, but as far as I can tell, you only discover any failures at runtime.
- yellowapple 10y agoOne could probably discover failures at compile-time with Erlang/Elixir as well, especially if one is diligent with typespecs and/or pattern matching / destructuring. For example, if I have the following Elixir function definitions: def foo({:bar, bell}), do: IO.puts("got a barbell: #{bell}") def foo({:baz, bell}), do: IO.puts("got a bazbell: #{bell}") Subsequently calling `foo({:bat, "some value for bell"})` should be detectable by the compiler and thus generate at least a warning. We can luckily catch it relatively easily and painlessly at runtime with Erlang's normal insistence on process supervision trees, but it's still a crash that could be easily avoided without having to jump into the realm of full-blown "defensive" programming.
- fenollp 10y agoDyalizer solves your example already. But finding race conditions is another problem entirely. Have a look at Concuerror and PropEr.
- moosingin3space 10y ago> any chance Erlang-like supervision and actor model in general might make a comeback in Rust? As a library, sure, but like green threads, actors aren't ideal for a systems language.
- pjmlp 10y agoThe guys at ETHZ thought otherwise with Active Oberon.
- moosingin3space 10y agoInteresting. Were actors available at the kernel level? If so, how?
- pjmlp 10y agoNot actors. I should have been more explicit, as I was referring to green threads.