News for hackers. Stuff that matters.
Re:Elixir v1.4.0 released by pmontra on Wednesday January 04, 2017 @07:22PM (#13323532)
If all you need in js/wasm is the functional layer of the language, that could be easy.

If you want to add processes, that could be very hard.

If you also want the supervisors, that's difficult but probably not has much as adding Erlang style processes.

Re:Elixir v1.4.0 released by lawik on Thursday January 05, 2017 @05:55AM (#13326184)
AFAIK the VM creates a thread per core (by default) and schedules Processes across those threads and stuff. I'd say this might be possible to do with Web Workers. Sounds like it could be fun, probably a challenge to make it fast.
Re:Elixir v1.4.0 released by pmarreck on Wednesday January 04, 2017 @07:28PM (#13323581)
What's stopping a compile of Erlang to JS via LLVM and Emscripten and just taking the expected performance hit?
Re:Elixir v1.4.0 released by Xixi on Wednesday January 04, 2017 @07:48PM (#13323699)
Erlang doesn't compile to machine code, but to bytecode that runs into the Erlang VM. So you would probably have to run the Erlang VM on top of javascript... I'm not sure whether it's possible, but it sure sounds heavy.
Re:Elixir v1.4.0 released by int_19h on Thursday January 05, 2017 @03:10AM (#13325576)
With WebAssembly, you should be able to compile the Erlang VM itself to it.
Re:Elixir v1.4.0 released by bryanjos on Wednesday January 04, 2017 @08:51PM (#13324023)
There is the LLVM backend in Erlang as of version 17. I haven't seen much info on it. I haven't seen anyone try to go the whole process from Erlang code to LLVM to Emscripten to JavaScript. I am interested to know what hurdles there might be, performance, etc.