TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

CodeCube: Docker-powered Runnable Gists

33 点作者 hcm超过 11 年前

3 条评论

h43z超过 11 年前
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.
评论 #6586619 未加载
gyre007超过 11 年前
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超过 11 年前
How is it better than ideone.com?
评论 #6586353 未加载