Besides caching difficulties, the program also needs to kept running for
much much longer, which means much more resource usage when there are a lot
That being said, if you run playground locally, I don't why it can't
support interactive programs as it's already using websocket for transport.
Thanks for the input -- definitely some things I hadn't considered.
I will continue writing Learn Go to use the Go playground without an expectation of this happening anytime soon. The section on branching with if would be more realistic if the conditions for branching weren't hardcoded values or cached random numbers -- but it's not the end of the world.
Playground is not supposed to be interactive platform. I would say implementing this feature requires another different beast than what we have. Don't want to be a party pooper but does it make sense to leave such bugs open when we cannot solve them, @andybons ?
#3806 (comment) suggests that using an input field / textarea might be simpler way of implementing this, and would actually allow to cache (and share) the program.
Essentially it's just a static buffer this way, which is attached to the NaCL sandbox's stdin.
If you guys think it makes sense to give it a try, I'd be happy to take over.