nsuchy

nsuchy

With WebAssembly just getting started do you guys think that one day we’ll be able to run Elixir in the web browser and use it to do similar tasks that Javascript does today?

Showing Posts 1 to 10

peerreynders

peerreynders

There’s no BEAM on any web browser … web assembly or not. So what’s the point?

Sequential programming without the concurrency goodies doesn’t make for a compelling use case.

OvermindDL1

OvermindDL1

It’d be entirely possible to make a backend for the compiler (like HiPE is for example) that compiles to webassembly.

Do note, webassembly is NOT just for running in the browser, it is a standard that defines a base bytecode for sandboxed execution. There are webassembly runners in C, Java, even an FPGA washing machine (yes really), none of which have Javascript or any of Javascript’s calls or libraries. It is just another backend, like x86 or ARM.

11
Post #2
kelvinst

kelvinst

Whooooa!! Very good idea! Do you think it would be hard to write a new browser on top of BEAM? And of course, support to execute any BEAM code? Is there a BEAM-JS for backward-compatibility? So many ideas coming on! That would be heaven!

kelvinst

kelvinst

Looks like there is a start on it called ErlyJS. But it feels abandoned. Here is a post about it and here is a fork of the original project, which is not available on Google Code anymore.

nsuchy

nsuchy OP

Thanks for letting me know that. So once it’s fully ready you’d be able to securely isolate Elixir code from the operating system? That sounds really useful :slight_smile:

OvermindDL1

OvermindDL1

Technically you could compile the BEAM VM to it now (though single-core mode), probably just need to fill in a few (many) wrapper functions as necessary for ‘OS’ interactions and/or faking. :slight_smile:

leifericf

leifericf

I just listened to episode 323 of the Software Engineering Radio podcast today and was struck by similar thoughts. They broached the topic of concurrency issues with WebAssembly and how shared-memory (:scream:) multi-threading (which relies on SharedArrayBuffer) was incapacitated due to unforeseen security issues (SharedArrayBuffer and timing attacks, “Meltdown and Spectre”).

At that point, BEAM dinged in my head.

Either having a web browser built in top of the BEAM or having modern browsers use BEAM as a virtual machine in which to execute WebAssembly or something similar to that. In the extreme, maybe BEAM byte-code could even be a viable alternative to WebAssembly.

Perhaps having Elixir compile to WebAssembly would be interesting. As I understand it, one must use C++ or Rust for that right now (and Go is also adding support for it). WebAssembly has some issues with garbage collection (or, rather, lack thereof) which might make that difficult.

dbern

dbern

Wow. @DockYard is thinking of investing time to explore compiling @elixirlang and the BEAM to #wasm. Very ambitious and exciting. #ElixirConf

— David Bernheisel (@bernheisel) September 6, 2018

Looks like Dockyard is considering investing in this idea.

LTheGreats

LTheGreats

Is there any news on weather or not Dockyard is still working in compiling the BEAM to WASM?
(or other organizations or people working on a similar project)

msand

msand

There’s at least:
https://github.com/jamen/elixir-wasm

And elixirscript can run Elixir in JavaScript, and might run in Wasm later on
https://github.com/elixirscript/elixirscript
https://github.com/elixirscript/elixirscript/issues/454

Seems AtomVM can run erlang in Wasm
https://github.com/bettio/AtomVM/issues/30

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
AstonJ
Since we have deprecated our Erlang sections (as we have dedicated Erlang Forums now) let’s add this thread for those who’d like to post ...
New
maennchen
:warning: Security advisory: Decimal DoS vulnerability A vulnerability has been published for decimal where very large exponents can cau...
New
Null-logic-0
What IDE or editor are you using for Elixir development? Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New

Other Trending Topics Top

marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
webofbits
Aludel - LLM Evaluation Workbench Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews