Hacker News new | past | comments | ask | show | jobs | submit login
Runnable – jsfiddle for everything (runnable.com)
303 points by jbverschoor on June 2, 2014 | hide | past | web | favorite | 100 comments

It's pretty strange to get root access to a server, even though it's just a Docker VM. We can install anything we want, compile any C code we want, DDoS and spam anyone we want... The machine is also crazy loaded right now, with 100% load on all cores (according to htop that I installed from the package repo), almost run out of RAM and disk space decreasing fast.

We are a bit overwhelmed by the load right now, didn't expect to get hit by HackerNews today :) We are spinning up more servers

This is a good problem :)

You guys have a very nice looking product.

I'd be willing to bet that someone has already run a fork bomb just to see what would happen.

Yes, I'm from Runnable. People have tried fork bombs. We are pretty good and cleaning them up. Please do not try this and let other users enjoy the platform

I'm sorry to say I did run a piece of java code to see how it handled creating many threads.. Didn't mean to cause any harm. I was just curious.

I installed ghc just to see if packages could be installed, sorry if that caused you problems.

that seems fine to me

Speaking of GHC, you guys should work on supporting Haskell.

Why wouldn't you use a normal user and not root ? This seems overly dangerous

We follow an honor-based system. If a user abuses root access, we take their privileges away

Nice, but some users are not "honorable". And you make it super easy and quick to make accounts, no confirmation, just enter some email address. (not that i'm complaining about that part, i like easy signups... but it may open you to abuse).

I've always liked http://ideone.com/ for testing snippets. Bewildering array of supported languages including esoterics.

I've just ran a full rails application. It creates the database etc and then allows you to browse the site.

They provide company accounts. Seems kind of nice to have a full working piece of code working within a few seconds.

I can think of stripe, facbeook or any other company that provides an api.

The only problem with a full working application is that it's easier to miss what steps should be taken.

Nifty, but this one has a higher purpose. It can run an entire project in a framework.

What's the monetization model? This looks awesome, but it needs a way to pay the bills if its going to survive.

First thing i looked was a "pricing" page to send to my company bean counter!

i want that installed internally so we can send live code instead of boring pastebin links

I too wonder this. I assume runnable, jsfiddle, plnkr, etc. make money somehow, but I've always been curious as to how? I love the services and really appreciate them, but I don't get it.

Any ideas?

We are bringing down the unit economics of running the site to keep it up affordably. Apart from that, Runnable will continue to operate as a free service for developers.

We need the help of the community to maintain the site/content. If you'd like to help, feel free to drop me an email - yash [@] runnable.com

In the case of jsfiddle almost everything runs on the client, so the operating cost should be relatively low.

Best not to advertise compatibility with everything unless you are sure that it really is compatible with everything. Otherwise it is too easy to mislead people (who will load the site, check for their favorite language, not see it and never come back)

Losing those people is probably a support win.

Yes, it is always difficult to provide support to people trying to use languages that you do not support.

Where are they running the code? I could easily write malicious code that would crash the machine on which the code would be running on.

I may be wrong here but to address a comment above, my hunch is this is spawning a light, short-lived VM for this, which doesn't eliminate security concerns but would be sandboxed enough to make it tougher.

I was trying to get some info on environment in C++ but unfortunately,

> Oh no, there's a problem with Runnable!

Yep, there's playpen[0] that's ultimately used as a security sandboxing. This is what's used on the new Rust playpen area: http://playtest.rust-lang.org/ (Not fully ready, still needs some beautifying -- that's why it's on playtest and not the play subdomain).

[0]: https://github.com/thestinger/playpen

Actually, after playing around the system doesn't seem to be ephemeral, so hopefully something along the lines of Docker as mentioned below.

transpile it all into js and run in node! (I know this may be limiting for some features/libraries, but only a matter of time.)

See https://www.destroyallsoftware.com/talks/the-birth-and-death... on taking this to an "extreme" -- linux, Gimp on X windows, even Chrome -- transpiled and running in a firefox tab.

Why crash the machine when you can use it? Let's say someone wanted to run a ton of background processes to make a ton of requests to some server for whatever reason.

My guess, something like Docker. It only matters if you can break out of the Linux container.

Even if the code is sandboxed, it's possible to run outgoing attacks from something like this. The same is of course true of traditional server rentals, EC2, and any other service that gives you an OS instance of your own. The difference, though, is those are (ostensibly) less anonymous.

It used to be trivial to break out of docker containers, if you had root within them. I suspect that is still the case.

Is this serious or just some spreading some FUD? Can you show me an example? Honest question

Please see this example - http://blog.bofh.it/debian/id_413


Example here: http://blog.bofh.it/debian/id_413

* Got root in the countainer.

* You "know" where that is mapped to on the host, because it is based on the UID of the container which is set as the hostname.

* You configure a trigger to run a script, using that knowledge.

* Code happens on the host, outside the container.

The above example is about LXC and sysfs. We are talking docker which uses aufs.

Indeed, this is an LXC attack, rather than docker-specific.

But, that said, the attack works as specified against docker 0.11.0. Largely because guests do have sysfs mounted at /sys.

They may have sandboxed it, using something like lxc-containers.

It seems to be a mix of languages and frameworks. For example, it doesn't list Python, but it does list Django. No Javascript, but jQuery and Node.js (Angular programmers are out of luck).

There does seem to be a Python option below the fold.

It has Node.js, which I guess is JavaScript. Or do you want direct access to V8?

Edit: If you expand the list of supported languages, it shows Python too.

Yeah, but node.js is a framework, not pure js, and I suspect it doesn't do DOM-related stuff. jQuery is probably better suited for general in-browser javascript.

This reasoning seems fundamentally confused, so I feel like clarifying some concepts:

On Runnable you can create basic client-side JavaScript files to be run in the browser (without jQuery) and do window and DOM manipulations.

Node.js isn't a framework for the browser (like jQuery), but a server application platform (with a bunch of objects and functions).

"Pure js" doesn't exist as an environment. It runs within a parent environment (e.g. a browser or a server) and manipulates the global objects in that environment.

JavaScript is just a language specification, and can be implemented in any environment. (For instance, it's implemented in Adobe Illustrator.)

Yes, but jQuery is not the only way to use javascript in the browser. Why that restriction?

Ok, got you. If you use the "Create New" button in the top right corner, you get the option to create a "JS" project.

The project template comes with jQuery pre-installed. However, it can easily be removed.

I guess the people behind Runnable assumes that it's more convenient to have to remove jQuery than having to add it for each new JS project, and personally I agree with that assumption.

Hope this helps!

I noticed that the terminal supports vim and nano. Wish it supported emacs, but I'm still impressed.

apt-get install emacs24-nox

This is cool. I'd love to have some sort of GitHub (or just Git) integration. That would be powerful.

It would be awesome to just open a project on github & run it without downloading / installing. Great tool to tinker & learn. Add some profiling tools to the mix while you are at it. Imagine you are trying to decide between 2 different libraries or frameworks. You could just fire them up in Github & try out for a bit before making up your mind. Would be nice to generate compile & generate binaries on the fly too instead of downloading them from 3rd party sources.

Runnable is a great example of a product that really understands their core use case and does it very well. They use Docker as the recipe-structure on the runner image.

For your use case, we have been rewriting Codenvy for the past three years, both the IDE and the underlying infrastructure. The new system now also uses Docker as a tool for recipe construction of builder images and runner images. We then layer on an endpoint structure that we call Factories, which allows for automatic environment provisioning inclusive of code (from git or svn), the builder type (mvn, gcc, etc) and the runner environment which can be a pre-packaged solution (managed by Codenvy) or a custom environment as defined by a specialized docker recipe in your project space. The factories are just URL formats to make embedding or sharing entire environments (for cloning) easier.

If you'd like early access to the next gen system, people can write me tyler at codenvy, and we'll get you hooked up. We've been in alpha since early Jan and will go public beta in another month or so. We are just cleaning up some remaining items.

As cool as this is, I am honestly curious how you could monetize such a service? When I have some ideas I am trying to implement, I always try to see how you can get at least the cost of running a service back in. I don't like the thought of taking seed money from some investors without having a plan for making money. So how would you monetize this?

Edit: Please don't say advertising, that would be probably the most obvious choice, however still... Are there other ways?

This really is an awesome site, and I was really impressed when I first discovered it. It's like having a nitrous.io box provisioned on the spot in whatever stack you want, for something as simple as a 3 line snippet of code to a full on project (although probably not the best place for that). I hope more people start using it and contributing to the examples, it's really nice to be able to walk through full-stack snippets

Here's some system specs they are running your code in:


Executing Build Command: javac /root/HelloWorld.java

Executing Run Command: java -classpath /root HelloWorld

Cores: 4

CPU Arch: amd64

Total Mem (Bytes JVM sees): 236257280

Max Mem (Bytes JVM sees): 3506438144

Free Mem (Bytes JVM sees): 235023784

Root Dirs: /

Get OS (direct output): Linux

Get OS (sanitized output): Unix/Linux

OS Arch: 64

Process exited successfully



to be specific it is an Amazon EC2 m3.xlarge instance running with magic inside

You should hack in Swift. Would bring extreme amounts of traffic as Swift only runs on OSX and behind paywall.

Awesome, I love the multiple file approach. This is what I've started to realize holds backs a lot of similar services. (Especially jsfiddle). I'm glad someone was able to capture something I've been looking for.

And of course I'm going to have to bug you for TypeScript support!

If anyone is looking for a similar system but more focused on collaboration and working on code in real-time, check out: https://coderpad.io

The target use case is interviews, but it works well for a wide variety of use cases as well.

Also http://codepad.org/ which is a lot more bare bones but free.

codepad.io $50 a month. runnable appears to be free atm.

I think you're paying for the latency in this case

It looks very nice indeed but I wonder why there is .net and not just c#. It might actually be better because this way you can have all the web functions too but might take a bit more for simple things.

Heh, I had the same thought and was able to hack it pretty fast: http://runnable.com/U4x1Dioc6NMZvMy0/linear-scales-in-c-like...


I found a full working rails app, which does everything from creating the database to running the webserver.

What I'm actually interested in is how they suddenly got on nr 2 in google :-)

The service looks great, I just wanted to comment: when I opened the page, my immediate thought was "is this done by Heroku? This page looks a lot like heroku"

Cool! If this had python 2 + pygtk .. python 3, gobject introspection + gtk3 it would be awesome, since it's a pain to set people up with these.

Does anyone know which tools this would use? Eg. Apache Thrift can compile definition files to different languages. But i don't think that is used.

Very nice! This is actually better than a "jsfiddle for everything", as it has tagged and searchable snippets.

I suddenly came across this on google (pos 2) when searching for a simple cropping example with jquery + carrierwave.

Looks pretty cool!

I like it. Any way to get third-party python libraries (e.g. numpy, scipy) to work with it too, in a python project?

pip install scipy in the terminal should work

Quite choppy at the moment so it's hard to play with, but how does this differ with ideone.com ?

I must say I'm impressed. And its response time is not bad either. But.. how will it scale?!

Similar to http://codecube.io/

I'm missing plain old C? You could use the C++ one but an extra one for C would be nice.

For some crazy reason I thought Objective C would be included. Still awesome though.

This might just be the Hacker News effect, but it currently seems unacceptably slow.

Didn't know about this one... Looks cool for sharing snippets at StackOverflow

Congrats to Yash and the gang, great to see some GT grads doing exciting things!

Would be nice if UI takes complete screen, particularly the code editor.

I'd really like CLisp or Scheme. Other than that, it looks good.

This is going to be great for stackoverflow answers!

Python 3 please...

python3 works (3.3.1 by default but you can install anything) see this example : http://runnable.com/U4yefk00JdINRGsH/python3

What's added value compared to ideone.com?

It's really not even comparable to ideone.com. You get a full VM provisioned for your snippet/project and you choose what stack you want

I'm sad theres no scala support

Here's a Hello World example in Scala: http://runnable.com/Uw_ujq9LvIEQywP8/hello-world-in-scala

This would be almost trivial on top of the existing Java support as well.

No perl? Really? Sheesh.

no go?

Here are some examples in Go: http://runnable.com/go

Hmm am guessing this site is getting a lot of traffic at the moment.

Just tried selecting Flask and got: Oh no, there's a problem with Runnable!

"Everything"? Where's Erlang? Where's Lua?

You can actually create your own example with Erlang or Lua :) We provide a person VM for you to use and share. Simply start with a base example like (runnable.com/new/bash) install the compilers you need and click publish!

Thanks! It would be nice to see support for real languages.

How do you define that?

Didn't find Haskell.

And where's Cobol?

Registration is open for Startup School 2019. Classes start July 22nd.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact