Browser-based Coding Playground
April 8, 2015 11:08 AM   Subscribe

Coding Ground is an amazingly comprehensive set of free online terminals and IDEs for about 100 different computing languages. The list includes Unix languages (bash, ksh, awk), cross-platform languages (Ruby, Python, Perl, Java, etc.), web languages (coffeescript, Go, Dart, jQuery) MS Windows-specific languages, markup languages (CSS3, HTML, Markdown), and even a bunch of esoteric languages (Malbolge, LOLCODE, Brainf**k, and Whitespace). These (appear to) run in fully sandboxed Docker-based containers.
posted by mcstayinskool (37 comments total) 71 users marked this as a favorite
 
I want to like it, but between the Service Unavailable messages (when trying to execute the Bootstrap IDE sample) and the big honking ads I'm not sure this is viable.
posted by gwint at 11:26 AM on April 8, 2015


but between the Service Unavailable messages (when trying to execute the Bootstrap IDE sample) and the big honking ads

I've been playing with this for a few days and have experienced neither of those things. The latter is perhaps not an issue on my browser because I use AdBlock, the former...dunno, haven't had connection issues.
posted by mcstayinskool at 11:32 AM on April 8, 2015


I think that "Whitespace" is the coolest concept for a language I've ever heard of!
posted by Chocolate Pickle at 11:53 AM on April 8, 2015


Doesn't do anything for me. The page flashes when I click on one of the links but nothing opens.
posted by octothorpe at 11:53 AM on April 8, 2015


Can someone explain Docker/containers to me?

I've been given the high level explanation that it's like a VM but with no guest OS. I just don't understand what environment/libraries are presented to the contained apps -- the host OS? If so, how do you customize your container's installed libraries and configuration according to what the app needs? It's not just a glorified chroot jail, is it?
posted by weston at 12:07 PM on April 8, 2015


Weird, the PHP loads just fine but mysql, c# and others seem to just do nothing. WTF?
posted by symbioid at 12:13 PM on April 8, 2015


Docker is basically a glorified chroot jail, but with a really nice system for installing packages inside. And yes, you have to include all dependencies inside the container -- but Docker provides really nice tools to make this easy to do, and is fairly smart about saving disk space so you don't have 1000 copies of the same libraries for 1000 containers.
posted by miyabo at 12:16 PM on April 8, 2015 [5 favorites]


I'm now getting lots of Service Unavailable and issues like symbioid describes. I have to think it's shuddering under load, as this was fine in my testing over the past couple days.

I have also now tested across a bunch of browsers in both Linux and Windows, and Internet Explorer seems to be the problematic browser (I know, right?). Firefox, Chrome, Chromium all did fine. I also got to witness the ads when using IE, and I would agree that I don't like that. That part at least is easily fixed by using AdBlock and not IE.
posted by mcstayinskool at 12:20 PM on April 8, 2015 [1 favorite]


Can someone explain Docker/containers to me?

I think miyabo summed it up nicely, but a co-worker of mine recently wrote about what Docker is.
posted by mcstayinskool at 12:22 PM on April 8, 2015 [1 favorite]


Will have to check these out further - I tried the shudder Cold Fusion shudder one, and it didn't work (Firefox/Win8). For quick ColdFusion/Railo testing, though, I use CFLive.
posted by foonly at 12:25 PM on April 8, 2015


I use both adblock and firefox. I even removed flashblock due to recent wonkiness and just do an "ask to activate flash" which is for the most part just as useful. So I get the ask to use flash for the php. I don't even get a "service unavailable" it merely does the loading throbber for a cycle or two then reloads the main page. Though I think you're right, it's prolly just overloaded.
posted by symbioid at 12:26 PM on April 8, 2015


I've always found it amusing, mostly because I am old, that virtualized applications allow you to run many virtual systems on one virtual system on many virtual systems on a single hardware server of sufficient size. It's like little fractal datacenters unfolding into an increasingly unmanageable mess.

Docker is a way of keeping the many-virtual-machines-on-one-machine thing sort of rational, and it's really good at it, but it introduces its own layer of opaque administrative responsibilities to an ever deepening stack. Tools like Ansible and Chef help with the managing-many-virtual-machines-on-many-machines thing, while also introducing their own administrative and development issues (don't get me started on Chef's cutesy naming conventions).

Meanwhile, we're baking in storage and networking into the app stack as well with SDN and new cloud storage technologies with stuff like OpenStack.

There are way too many moving pieces, and not enough qualified devops people to keep the plates spinning. There's a real opportunity to consolidate and simplify this stuff.

(And I also find it amusing they have Malbogle but not APL. I'm not certain if that says something about the site maintainers or APL.)
posted by Slap*Happy at 1:00 PM on April 8, 2015 [3 favorites]


sio42: “i can't wait to get home and see if this works on my chromebook!”
If it doesn't, I know that Nitrous.io does because I use it on mine.
posted by ob1quixote at 1:06 PM on April 8, 2015


Also tangentially related, a friend linked Docker Exec to me this morning.
Docker Exec is a collection of Docker images capable of executing code in many different programming languages without requiring a single compiler or script interpreter on your machine.



Docker Exec allows you to run code in a compiled language just as easily as you can for interpreted languages. This is useful for speeding up your ability to try things out in compiled languages.
You can install it local and it's pretty rad.
posted by ob1quixote at 1:15 PM on April 8, 2015 [1 favorite]


I'm getting the Service Unavailable message, too.
posted by Thorzdad at 1:22 PM on April 8, 2015


Docker is the best thing ever for software QA. Need a new server to run a test against? Just spin one up and there it is. We have it all rigged up with Jenkins so you can fire up a new build, deploy all the components in their own separate containers and then run the regression tests all with one button push. Awesomeness.
posted by octothorpe at 1:30 PM on April 8, 2015


> Docker is a way of keeping the many-virtual-machines-on-one-machine thing sort of rational, and it's really good at it, but it introduces its own layer of opaque administrative responsibilities to an ever deepening stack.

So it's essentially VM/CMS all over again?
posted by scruss at 3:35 PM on April 8, 2015


teach mother nature how to code! ,saracsm,
posted by brainimplant at 3:51 PM on April 8, 2015


So it's essentially VM/CMS all over again?

Docker is primarily a tool for administrative convenience. Literally everything Docker does could be accomplished with built-in Linux features like LXC and unionfs that have existed for a decade or longer, plus some simple shell scripts to glue them together. And that's basically what Docker started as, although it's gotten fancier over time.

What makes Docker different is that it's super easy to containerize entire applications with a lot of the messy details taken care of for you. That's what's truly new. Don't look for some revolutionary operating system technology, because it isn't there.
posted by miyabo at 3:57 PM on April 8, 2015


So it's essentially VM/CMS all over again?

Yeah, and Amazon is actually, for-real, literally charging you for computational time by the minute. This is the endgame of the Unix/microprocessor, network-is-the-computer revolution: timesharing mainframes.

If you'll excuse me, I'm going to go downstairs, fire up my old Sparcstation running OpenBSD, and dream about the cool futures that were in my past, heartened slightly by the notion that blockchain-based apps are going to make most client-server apps seem clunky and old fashioned in a couple years.
posted by Slap*Happy at 4:00 PM on April 8, 2015 [6 favorites]


but it introduces its own layer of opaque administrative responsibilities to an ever deepening stack.

That's so 2014. Now we have DockPuppet to automate away the tedious Docker configuration management details! It's simple -- you can use its new YAML DSL to record configurations detected by DockWorker into system-specific catalogs containing resources and resource dependencies (called "Dockets"). When you deploy to a new system, it's as simple as matching your app to the right Docket and running the reverse tool WorkerDock.

Right now it's a little bleeding edge, though -- only works on MRI 2.2.x, and there's a few gem issues reported...

"Now you have two problems."
posted by weston at 6:36 PM on April 8, 2015 [3 favorites]


Yeah, it's really slick - if my DockPuppet's Docket violates my BND condition, the thread-safe Moderator function resets my value to "null."
posted by Slap*Happy at 7:20 PM on April 8, 2015


What is the point of this, vs just running the code locally? Just its use as a safe sandbox? I mean, vim and emacs will run on a toaster these days, and I'm sure there are lots of odd FOSS compilers available.
posted by Canageek at 8:23 PM on April 8, 2015


Well considering the name of the site, I'd imagine it's for their users to learn languages and try it out, without the need of the user to invest in downloading/installing/worrying about configuring, etc...

I don't know if that's a good idea or not (learning how a language environment is setup is important, and since each sort of system has their own way (GCC is not MSVC even though they both do C/C++ (and more)). Here you have a standard method for their users to learn how to code and get to the gritty details of programming.

What I'd love to see is this concept as a portable system. Let me download these dockers and plug them in EASILY as an end user. I've never fucked with dockers/containers, etc... How cross platform are they? It looks heavily Linux based (and apparently coded in Go?) I mean, why do I have to install any particular system and run through that whole process to install python, etc... with each system separately listed on my system in its own way instead of centrally managed... Docker apparently makes this easier (in some sense), but is it only really good for servers? As a person who just wants to fuck with languages here and there, can I use something like this on my machine to centrally manage language installations along with their command lines/ides?

I imagine I'd need Linux to do that, since Docker is tied to that. Is there anything similar for Windows?
posted by symbioid at 9:36 PM on April 8, 2015 [2 favorites]


symbioid: “I imagine I'd need Linux to do that, since Docker is tied to that. Is there anything similar for Windows?”
There's a windows binary for Docker Exec that I linked above. I haven't messed with it much, but it's not an installer. It's a static executable. It says it'll do Bash, C, Clojure, CoffeeScript, C++, C#, D, Erlang, F#, Go, Groovy, Haskell, Java, Lisp, Node JS, Objective C, OCaml, Perl, PHP, Python, Racket, Ruby, Rust, and Scala.
posted by ob1quixote at 10:03 PM on April 8, 2015 [2 favorites]


My bad. It does need a Docker install. Still messing with it.
posted by ob1quixote at 10:31 PM on April 8, 2015 [2 favorites]


So, I'm not sure how to get dexec to talk to a standard Windows docker install, but you can invoke the dexec containers from inside Boot2Docker, e.g. echo '(println "Hello World")' > foo.clj; docker run -t --rm -v $(pwd -P)/foo.clj:/tmp/dexec/build/foo.clj dexec/clojure foo.clj
posted by ob1quixote at 11:46 PM on April 8, 2015 [1 favorite]


> What makes Docker different is that it's super easy to containerize entire applications with a lot of the messy details taken care of for you. That's what's truly new.

Oh, so like OS X then. Or static builds.

<weak_fist_pump>yay …</weak_fist_pump>
posted by scruss at 5:25 AM on April 9, 2015


It's like I have a mental block on the subject.

I used to, and it lasted decades, until I ran face first into a career-impacting administrative problem I couldn't fix without it. I couldn't find a script to steal that would do what I needed.

Then I realized I knew how to write a bash script from scratch all along by looking up various parts of the problem - how do I validate an IP address in regex? How do I generate a random password? How can I store user input into a string? - and I knew how to glue all the solutions together, and piece out where and how things aren't working. In the end, I had a program that could generate a configuration file for a variety of network edge appliances based on user inputs, and it could tell if the user was feeding it malarky.

Then when I realized the other people on my team who could most benefit from the script had Windows PCs, re-implementing it in python and exporting it as a standalone executable was, well, not simple, but not as all-fired hard as I'd been convincing myself it was, and without anywhere near as much looking stuff up on google required as the first go 'round.

I'm still not a programmer, but I can munge what I need to in order to do things I can't do by hand, and using a variety of tools. It's also kind of fun.

You've been marinating in this stuff as long as I have, so once the light comes on, you'll be running rather than walking.

I take my car to the mechanic and know a good plumber, but it's very useful to know how to change my oil and put on a spare, or to clean out the drain and replace the toilet flapper. It saves all kinds of time and money.
posted by Slap*Happy at 6:46 AM on April 9, 2015 [1 favorite]


DockWorker

awww. Not "Stevedore"?
posted by Zed at 8:48 AM on April 9, 2015 [3 favorites]


Is it just me, or is the current focus on "everyone must learn to code or else" kind of weird? We don't all fix our own cars or plumbing.

It is far from just you. Most people aren't programmers, and there are even a lot of programmers who aren't very good at it! I am computer-savvy, but I am not a programmer.

The furthest I've gotten is cobbling together some VBA code in Excel in order to take some of the manual work out of some recurring sales reports I had to make for a job. And for that I was able to find most of what I needed on an internet forum and just tweak it slightly- I didn't have to write my own code from scratch.

I think the coding education issue should be reframed for the most part. It would be helpful to teach people on a broad level what they might be able to do with code that could help them in their lives on a practical level. But pretty much any specific programming language tutorial I've attempted to put myself through has not been compelling to me at all.

And don't let anyone tell you that you must lack intellectual curiosity if you don't learn to code, because that's crap. There are plenty of other things to be curious about.
posted by wondermouse at 2:05 PM on April 9, 2015 [2 favorites]


Better to compare programming to writing. Not everyone writes novels, but everyone is expected to be able to write a letter or essay.
posted by I-Write-Essays at 8:50 AM on April 10, 2015 [1 favorite]


And as any literate person knows, you can't write an essay without a try-catch statement!
posted by I-Write-Essays at 8:56 AM on April 10, 2015 [2 favorites]


Is it just me, or is the current focus on "everyone must learn to code or else" kind of weird? We don't all fix our own cars or plumbing.

You're definitely not alone because this criticism happens on almost every thread that has to do with learning to code. If someone posted a link to a DIY car repair or plumbing site, I might not get anything from it, but I'm not going to complain about attempting to empower others with knowledge.

I don't think everyone should learn to code. I don't know any actual human being that thinks everyone should learn to code. There are certainly a few code learning sites that say that everyone should, but that's mostly just (bad) marketing. Also, this site is not that.
posted by mcstayinskool at 8:12 AM on April 11, 2015


Speaking of docker and windows...

Microsoft creates containers for Windows. Apparently, this is in conjunction with Docker, also (and announced last October, which - IIRC, is probably around the time they also made the big announcements regarding opening up .NET (not just the Roslyn compiler, which was announced earlier than that even)).
posted by symbioid at 5:20 PM on April 11, 2015


awww. Not "Stevedore"?

That's naturally the title of the OS X app that provides a beautiful design-driven GUI interface to DockPuppet.
posted by weston at 3:46 PM on April 13, 2015 [1 favorite]


Docker without Docker.
posted by weston at 10:31 AM on April 26, 2015 [1 favorite]


« Older The Dose Makes The Poison   |   Water, Water, Everywhere Newer »


This thread has been archived and is closed to new comments