Remix.run Logo
▲ EGreg 11 hours ago

I’m sure you can. This is much more of a modern solution than Lua was in the 90s.

▲Rohansi 9 hours ago | parent [-]

Depends what you consider modern? You get a much better isolation model with Lua because you can use separate Lua VM (isolates), explicitly expose only what's needed, and set your resource limits for them.

▲EGreg 7 hours ago | parent [-]

I consider Javascript more modern

A lot of people don’t want to have to write Lua, to eg handle clicks on buttons. And how would you embed Lua scripts safely on the web, anyway?

▲Rohansi 2 hours ago | parent [-]

You don't have to write Lua. As you've already said in a different comment, it isn't a problem in QuickJS because it has memory limiting built in. IMO that's the right way to do this - instead of transpiling JS to try and make it safe you should run it in a virtual machine like QuickJS/Lua/etc does.