Online code repl for pretty much any language.

#4 Product of the DayApril 19, 2015
Would you recommend this product?
No reviews yet
It's awesome to see on PH! It's a side project that we launched on HN[1] almost four years ago. And since then,'s open source technology has been used by educational platforms like udacity and codecademy. And in addition to the obvious use case of programmers testing their code and sharing on stackoverflow, it's being constantly used in the classroom by teachers everywhere from university professors to coding meetups like Girldevelopit. For 3 years we haven't done much with it. However, recently, fueled by the pressure from it's organic growth and people hunting us down and sending us emails asking for improvements and features; we've been dedicating more time to improve it and recently launched a few more features: 1. User Accounts (although it's been used by millions of people since launch, I never saw the need for user accounts until recently when people started asking for it) 2. Embeds. You can embed runnable code snippets on your website or blog (think Gist that you can run). Here is an example from my website: 3. Added a bunch more languages and will continue to add more. 4. API You can build your own educational platform or tool like [1]:
@amasad It's a pretty cool website. I browsed your code out of curiosity. Where is the part where it actually executes code? For instance with Java or C, how are you sandboxing it?
@jrpickhardt Thanks for posting this, Jeff! We used to run all user code in the user's browser using a library that we wrote called JSREPL That worked fine for us and other companies building on top of it. And we where able to launch and scale without the expenses of remote code evaluation. However, it's *really* hard to compile interpreters like CPython and Ruby to JavaScript and have them run in all the different browsers. It took as a year the first time around. And even when you do, you don't get a complete emulation of the development environment, there's a lot of things that are missing, like writing to disk or creating subprocesses. When I got back to working on this earlier this year, I decided to do it this time on the server, provided I do it cheaply and safely. I wrote the service in Go and the sandboxing is done via Docker, the service runs on AWS and makes use of auto-scaling. It's also completely decoupled from the website to make sure user data isn't compromised if someone was able to gain access. As a side-effect of this, I was able to open this up as a service and have a few paying customers I'm thinking of open sourcing this, but I need to make sure I have the time to maintain it.
@amasad Yeah, server-side seems way better. Is this a Python interpreter? How was this file generated? This is crazy.
@jrpickhardt Yes, that's the client-side one. We still use it for Python 2. Python 3 is server side. It uses emscripten to compile to JS, you can see the source here
@amasad Great stuff, this is very useful as an online learning, education, and testing tool. I'll be sure to use it when posting examples on stackoverflow