by davydog187 on 5/13/25, 1:03 PM with 77 comments
by rickcarlino on 5/15/25, 2:22 PM
by interroboink on 5/15/25, 6:31 PM
This is not embedding the C Lua runtime and compiler, but rather a
complete implementation of Lua 5.3. This feat is made possible by the
underlying Luerl library, which implements a Lua parser, compiler,
and runtime, all in Erlang.
Okay, that's actually pretty cool (:Also a sign of Lua's maturity and popularity, that it's got various independent implementations (LuaJIT, this one, perhaps others I don't know about).
by _acco on 5/15/25, 7:17 PM
When sandboxing user code in another runtime, you need to serialize the data to and from that runtime. That comes with a performance penalty.
So, for example, if you sandbox code in WASM, you need to pick a transport data format, like JSON. You need to serialize Elixir data structures into JSON, send it to WASM, and then deserialize the result. For a high-performance data pipeline, this adds up!
But if your sandbox is in the host language, no serialization/de-serialization is required. You can execute the sandboxed language in microseconds.
I wrote more about this here: https://blog.sequinstream.com/why-we-built-mini-elixir/
Wish this library existed just a couple months ago!
by Philpax on 5/15/25, 2:22 PM
by davydog187 on 5/15/25, 3:43 PM
by gilgamesh3 on 5/15/25, 3:55 PM
I am trying to understand why would anyone prefer to use Lua to create script instead of Elixir, which supports running scripts. While Lua has lots of users the language just have too many wrong design choices. If I had the choice between Elixir and Lua for scripts I would use Elixir every time.
by joshprice on 5/15/25, 2:04 PM
by pentacent_hq on 5/15/25, 6:38 PM
by rdtsc on 5/15/25, 6:04 PM
by dlojudice on 5/15/25, 8:59 PM
by jkaufmann_ on 5/15/25, 5:42 PM
by dpflan on 5/15/25, 4:00 PM
https://dashbit.co/blog/running-python-in-elixir-its-fine
It certainly is more attractive in implementation. Well done!
by iLemming on 5/15/25, 5:12 PM
by binary132 on 5/15/25, 5:51 PM
by codingbear on 5/15/25, 4:41 PM
by xvilka on 5/15/25, 2:15 PM
by behnamoh on 5/15/25, 2:17 PM
I'm sure there are people who think Elixir/Phoenix >> <other-solutions>, but for me it was a nightmare.
OTOH, the language is beautiful as it's macros all the way down.