Re:Advanced Programming Languages (2009)
by platinumrad on Tuesday May 05, 2020 @06:59AM
(#23078639)
Elixir is a BEAM language and therefore not designed for computational throughput.
[ Parent
| on HN ]
Re:Advanced Programming Languages (2009)
by krebs_liebhaber on Tuesday May 05, 2020 @07:01AM
(#23078656)
That's true - it's why I said you need a native library (something like numpy, but as a NIF) to back it up.
Re:Advanced Programming Languages (2009)
by neutronicus on Tuesday May 05, 2020 @08:34AM
(#23079306)
I think the main issue you face here is that there is already a big C/C++/Fortran ecosystem around distributed computation, one that happens to be very well impedance-matched to numerical linear algebra, and one with which experts in numerical linear algebra are intimately familiar (MPI).
Why bother with Erlang as a thin wrapper over C++ when C++ has the necessary facilities already?
There's Matrex, which is based on CBLAS and has some integration with IElixir, Jupyter's kernel for Elixir.
Also someone seems to be doing interesting work to integrate with GPU at https://github.com/sasagawa888/deeppipe2
Of course that's not to say that Elixir is ready to replace Python tomorrow. I just wanted to mention interesting projects in this area.
What is it specifically about BEAM languages that make them not good for computational throughput?
Re:Advanced Programming Languages (2009)
by krebs_liebhaber on Tuesday May 05, 2020 @09:57AM
(#23080049)
Immutability and thread-safety - if you want to get a value from one concurrent process to another, you have to copy it and send it to the other process. You can circumvent this by using a smart-pointer / reference to mutable data, which is manipulated by native code. One example would be a ResourceArc[0] in Rustler.
[0] https://docs.rs/rustler/0.22.0-rc.0/rustler/resource/struct....