4 ms·
Andrew Gerrand wrote a nice overview of how the go playground works: https://blog.golang.org/playground https://blog.golang.org/playground Im pretty sure the s
by remus 10y ago
Andrew Gerrand wrote a nice overview of how the go playground works: https://blog.golang.org/playground https://blog.golang.org/playground
Im pretty sure the source code is available somewhere, though usage isn't very well documented. There's periodic requests on golang-nuts about how to get your own version up and running.
- Manishearth 10y agoThanks. Looks like the reason the time functionality is restricted is to avoid DOSes and server load, not to prevent against side channel attacks (which like I said are possible anyway with mutexes and channels). The rest could be pretty easily implemented via docker or some other sandboxing method (the time stuff sort of can be handled too, but it's trickier). It might be more vulnerable to load, but it will be able to work with a pristine Go toolchain and provide options like switching between versions; much like the Rust playground.
- fjl 10y agofaketime is very useful on its own. We use it to run network simulations in accelerated time. https://github.com/ethereum/go-ethereum/blob/master/p2p/discv5/sim_test.go#L37 https://github.com/ethereum/go-ethereum/blob/master/p2p/disc...