Settings

Theme

CodeCube: Docker-powered Runnable Gists

hmarr.com

33 points by hcm 12 years ago · 5 comments

Reader

h43z 12 years ago

I'm currently building a platform for students to learn programming where you can join a "classroom" and watch the other students (or teachers) editors. My first idea was also to post the code to the server and then compile,run it and send the output back. The problem with this method is that there can't be any interactivity in your code, like it is with CodeCube. I think of such things like in C scanf(). So for now every user that joins gets a ubuntu linux box which is provided by docker. So I'm using term.js and pty.js which spawns this minimalistic box and connects /bin/bash via websocket to the client. The code the client writes in his editor can now have scanfs and other interactive functions and is compiled and executed in his own little shell.

  • hcmOP 12 years ago

    This is actually something I'd quite like to do with CodeCube - it wouldn't be hard at all. Replace SSE with websockets, attach to the container's stdin as well as stdout, add something like term.js, and it'd work a treat.

gyre007 12 years ago

This is such an excellent use of Docker (and golang) ! I really wish this was integrated into Github so that you could run Github gists in your browser.

sesm 12 years ago

How is it better than ideone.com?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection