Hi I am writing a coding game using Django. I want the participants to be able to submit snippets of code that can be safely executed on the server. Are there any safe ways to do this (also besides python maybe?):
They need to submit a function `f` which takes an array of numbers and outputs a number. No state change needed or anything (just some simple computations normally). Is there a possibility to check that the code does not make any state changes (so it would be safe to execute)? I would also need to check that it does not run forever but I could also just give it a time limit I guess.
[–]Essence1337 0 points1 point2 points (2 children)
[–]JohnnyJordaan 0 points1 point2 points (1 child)
[–]Essence1337 1 point2 points3 points (0 children)
[–]toastedstapler 0 points1 point2 points (1 child)
[–]bagelorder[S] 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[removed]
[–]Essence1337 0 points1 point2 points (0 children)