4 ms·
Not if done correctly. Have a look at this link: https://github.com/void4/notes/issues/41 https://github.com/void4/notes/issues/41 There is no issue with just
by 7373737373 5y ago
Not if done correctly. Have a look at this link: https://github.com/void4/notes/issues/41 https://github.com/void4/notes/issues/41
There is no issue with just limiting resources (unless there is unpredictable overhead). It doesn't have to be hardware resources either, it could be abstract/higher level resources like interpreter steps or managed memory slices.
I'm creating a series of VMs to show that this is possible, like rarVM, the recursively sandboxable virtual machine: https://esolangs.org/wiki/RarVM https://esolangs.org/wiki/RarVM
Showcase: https://www.youtube.com/watch?v=MBymOp6bTII https://www.youtube.com/watch?v=MBymOp6bTII
When calling a function you can specify how many interpreter steps it can run until it aborts (and optionally gives you a continuation so you can "refill" and resume it later).
Stackless Python can do this too, but unfortunately due to the reasons discussed above will never be a safe language, also this specific mechanism works only in trusted environments since the called function has the ambient authority to increase its own resource limits: https://stackless.readthedocs.io/en/2.7-slp/library/stackless/pickling.html https://stackless.readthedocs.io/en/2.7-slp/library/stackles...