mat-hek

mat-hek

Membrane Core Team

Popcorn lets you run Elixir code in the browser via WebAssembly. It builds on top of AtomVM, a tiny Erlang VM. It’s early stages and breaks sometimes, but you can run Elixir code and even Elixir and Erlang compilers right from the browser.

We created some cool examples too - check them out at popcorn.swmansion.com, and the repo is available at

github.com/software-mansion/popcorn

Happy hacking :wink:

Showing Posts 1 to 10

mat-hek

mat-hek OP

Membrane Core Team

What do you mean by ‘regular’? It’s definitely slower than the BEAM

Schultzer

Schultzer

Great, how much slower, would the reduce latency make up for the loss of performance.

When I talk about regular, then I mean standard release. We tend to run the VM on servers, this as I understand would allow us to run our code on the client, in this case the browser.

D4no0

D4no0

How so? Isn’t the whole point to have better performance but not all BEAM features?

arcanemachine

arcanemachine

Awesome. Glad to see the dream of Elixir-in-the-browser is being kept alive!

AstonJ

AstonJ

This is really cool! I just cross-posted on EFS in the AtomVM forum :icon_biggrin:

mat-hek

mat-hek OP

Membrane Core Team

Great, how much slower

We don’t have proper benchmarks yet. For now, we focus on stability.

would the reduce latency make up for the loss of performance

That’s, of course, dependent on the use case and expected latency, so you’d need to benchmark your particular scenario :wink:

this as I understand would allow us to run our code on the client

That’s correct, I wanted to make sure I got it right

mat-hek

mat-hek OP

Membrane Core Team

No, it’s quite the opposite :smiley: The goal is to run Elixir code on the client side. It would enable features like IEx or HexDocs examples running in the browser, but also local-first applications in Elixir. We aim to provide as many BEAM features as we can, if they make sense in that context, and good enough performance for these use cases.

14
Post #8
dkuku

dkuku

Hi. I asked about this at ElixirConf, but my question wasn’t clear. :slight_smile: I’m referring to something like this: GitHub - cocoa-xu/nif_call: Call Erlang/Elixir functions from NIF. · GitHub. Could Atom be embedded as a library to have an Elixir runtime inside C, like the embedded Python interpreter? If so, would calling simple Elixir code be faster? Right now, using a NIF with an Elixir callback is complex. Maybe embedding AtomVM in a NIF would offer better performance.

mat-hek

mat-hek OP

Membrane Core Team

Okay, I got it now, thanks for clarifying :slight_smile: I think it should be possible to embed AtomVM as a NIF, but I’m not sure if it’s worth the effort. You would either need to effectively start the AtomVM just to execute a particular function, or have one running and communicate with it. Maybe the second way would be a bit faster than sending a message to the BEAM, but way more complex. Another problem is that the function wouldn’t have access to anything you already have running on the BEAM, and execution on AtomVM would be itself slower than on the BEAM.

But I can see the potential to use AtomVM for small, frequently executed scripts, as it seems to start faster than the BEAM.

Where Next? Top

Trending in Announcing Top

restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 12366 136
New
type1fool
WebAuthnLiveComponent WebAuthnComponents See this post about renaming the package. Passwordless authentication for Phoenix LiveView app...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
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
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
kip
In 2021 I started a new library called Tempo with the objective of modelling time as a set of intervals - not as instants. In 2022 I gave...
New
quatermain
Hello, I’m sharing my plugin here in forum after some time so it has time to mature and proof yourself. I use Claude Code daily on a pr...
New

Other Trending Topics Top

KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
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
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews