4 ms·
you could mitigate side-effects by running all of lighttable in a VM, assuming no files and creating all the ones you need. Network requests could be intercepte
by nightpool 15y ago
you could mitigate side-effects by running all of lighttable in a VM, assuming no files and creating all the ones you need. Network requests could be intercepted. The key to make this workable would be sensible defaults, allowing you to just open it up and start a new project instantly, and allowing custimization for complicated projects.
- stcredzero 15y agoAll you need is a VM, a good standard library with mostly functions with minimal side deffects, a way to save all runtime state, and a way to log every change and replay them in case of a crash.
- prospero 15y agoThe side-effect could also just be updating a mutable hash-map, which has much of the same issues, and isn't something that you can sandbox.
- stcredzero 15y agoIn Smalltalk, this isn't a problem. Our Dictionary instances are mutable. Usually, we realize it while continuing the debugging/editing (they happen at the same time) and we either rewind the stack a little further to get a new instance of the dictionary, or we can easily undo the side effect. It usually happens in less than the amount of time you took to read the previous sentence.