I made a Logicboard.com — A collaborative code editor with code-replay feature.<p>Code-replay lets you run the coding session like a movie, I wrote a blog post on how I implemented this: <a href="https://logicboard.com/blog/code-replay" rel="nofollow">https://logicboard.com/blog/code-replay</a><p>You can try out the demo here: <a href="https://logicboard.com/demo/:replay" rel="nofollow">https://logicboard.com/demo/:replay</a><p>And play around with the code editor here: <a href="https://logicboard.com/demo/" rel="nofollow">https://logicboard.com/demo/</a><p>Logicboard also has an REPL shell, just type "start()" and hit enter in the output area.
This allows outbound network access, allows program execution (within the container) and more.<p>You might want to restrict some of these things before Amazon shuts your account down for abuse requests.<p>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.<p>`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
As nacs said, this is a really bad idea - you should take it offline or prevent network access ASAP.<p>I just ran a couple of Python scripts that grabbed the ec2 instance metadata and the HN front page.
My editor <a href="https://webide.se/" rel="nofollow">https://webide.se/</a> use operational transform for undo/redo, collaboration, and code replay for macro and tutorials.
I think Heroku also started out as an editor, but pivoted to "code-execution as a service".
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.<p>That said it’s pretty smooth and actually usable on mobile. Pretty polished too.
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.<p>In case of REPL, you send STDIN to websocket and get STDOUT as response.
All code execution happens in separate Docker containers.