| ▲ | EGreg a day ago | ||||||||||||||||||||||||||||||||||
It’s not the job of a language to solve everything. Sometimes the solution belongs in sandboxing and virtual machines. You should be isolating untrusted code anyway. SafeScript was just inspired by Google’s CaJa project from 10 years ago. My Qbix Webserver started rewriting PHP before loading it, and I wondered what if I could start over and just reduce the language the way JSON reduced it to just data, and was wildly successful. I chose JS as the base because it’s everywhere. I then made it also execute inside PHP. I made it auto-await every promise so it could work in non-evented environments like vanilla PHP. This could be the next Lua, for instance, but for the modern era and far safer. Having said that… there may be some static analysis you could do, to conservatively overestimate how much memory any given program could waste, and reject those that COULD waste it. The nice thing about static analysis is you only have to run it once per particular script. | |||||||||||||||||||||||||||||||||||
| ▲ | Rohansi a day ago | parent | next [-] | ||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| ▲ | ranger_danger a day ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||
Why are you trying so hard to defend programs that can crash by blaming it on their runtime environment? | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||