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

woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
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
anuaralfetahe
Hello Published a new library - ProcessHub! ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
rodloboz
I’ve started working on a new library to run SQL queries and do basic business intelligence. Think “Blazer for Elixir.” Currently it fe...
New

Other Trending Topics Top

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
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
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
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews