@ceepee 4d
I'm curious if anyone would like to use the code-execution as a service. It's basically a websocket based API where you send a blob of code and get execution result as response.

In case of REPL, you send STDIN to websocket and get STDOUT as response. All code execution happens in separate Docker containers.

@nacs 4d
This allows outbound network access, allows program execution (within the container) and more.

You might want to restrict some of these things before Amazon shuts your account down for abuse requests.

You're basically handing everyone on the internet an EC2 instance to do literally anything with -- it'll be minutes to hours before this gets abused.

`uname` output from the container for example: Linux a976bf3f5ff7 4.14.193-113.317.amzn1.x86_64 #1 SMP Thu Sep 3 19:08:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

@Takennickname 3d
Where is the code being executed?
@andrewstuart 3d
Is that code mirror?
@pcthrowaway 3d
Nice use of phoenix liveview (I'm assuming). The app is really smooth, and executes rust faster than the official rust playground
@andrewstuart 3d
As nacs said, this is a really bad idea - you should take it offline or prevent network access ASAP.

I just ran a couple of Python scripts that grabbed the ec2 instance metadata and the HN front page.

@brazzledazzle 3d
Just to add to the other voices: executing untrusted code can be extremely dangerous. There’s so many ways to shoot yourself in the foot. I’m not sure if container boundaries are sufficient but each repl shouldn’t share a namespace with the others at the very least.

That said it’s pretty smooth and actually usable on mobile. Pretty polished too.