Remix.run Logo
▲ Rohansi a day ago

What you are saying here is completely different to what your GitHub readme says. You say it protects the host's environment there but here you say it actually doesn't so use a real sandbox.

> This could be the next Lua, for instance, but for the modern era and far safer.

It isn't the default but you can sandbox all of this with Lua already. Including limiting CPU and memory use.

▲EGreg 11 hours ago | parent [-]

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.