47
\$\begingroup\$

Here is my scenario.

  1. I pose a programming puzzle. It might be golf, or might be something else, but I don't specify the language.
  2. Some posts a answer that looks really good, but I don't have a working environment to test it.
  3. ???
  4. Profit!

Let us compile a list of free execution environments reachable over the internet.

One answer per answer, please, and list the protocol and host as well as as much detail on the available execution environments as possible.

\$\endgroup\$

migrated from codegolf.stackexchange.com Feb 16 '11 at 14:53

This question came from our site for programming puzzle enthusiasts and code golfers.

  • \$\begingroup\$ Just now I'm looking for a ruby 1.9 shell. \$\endgroup\$ – dmckee Feb 10 '11 at 18:47
  • 1
    \$\begingroup\$ I'd like to know where I can test windows powershell answers \$\endgroup\$ – gnibbler Feb 10 '11 at 22:16
  • \$\begingroup\$ @gnibbler, sandboxing powershell doesn't seem like an easy proposition. \$\endgroup\$ – Peter Taylor Feb 11 '11 at 9:18
  • \$\begingroup\$ also matlab or mathematica \$\endgroup\$ – gnibbler Feb 11 '11 at 11:52
  • \$\begingroup\$ ...anyone want to set up a VM? :) \$\endgroup\$ – Nathan Osman Feb 18 '11 at 17:14
  • \$\begingroup\$ @gnibbler: for matlab some of the answers should work with octave, which is free. For Mathematica there is Mathics, and it also has an online interpreter, but unfortunately that's not that feature-ready :( \$\endgroup\$ – SztupY Feb 13 '14 at 17:13
  • \$\begingroup\$ The There's a fiddle for that! site currently lists 26 fiddle sites, some of those supporting multiple languages. \$\endgroup\$ – manatwork Oct 28 '16 at 12:06

32 Answers 32

45
\$\begingroup\$

Try It Online

Try It Online has been created by Dennis and currently supports the following practical and recreational programming languages. (the snippet loads the current list)

<h3>Practical</h3><div id="practical"><ul></ul></div><h3>Recreational</h3><div id="recreational"><ul></ul></div><script>var request=new XMLHttpRequest;request.open("GET","https://tio.run/languages.json"),request.onreadystatechange=function(){var languages,languageArray,id,language,i,item,anchor,j;if(request.readyState==XMLHttpRequest.DONE){languages=JSON.parse(request.response),languageArray=[];for(id in languages)language=languages[id],language.id=id,languageArray.push(language);for(languageArray.sort(function(languageA,languageB){return 2*(languageA.name.toLowerCase()>languageB.name.toLowerCase())-1}),i=0;i<languageArray.length;i++)for(language=languageArray[i],item=document.createElement("li"),anchor=document.createElement("a"),anchor.href="https://tio.run/#"+language.id,anchor.textContent=language.name,item.appendChild(anchor),j=0;j<language.categories.length;j++)document.getElementById(language.categories[j]).appendChild(item)}},request.send()</script>

\$\endgroup\$
  • \$\begingroup\$ Why not use jQuery to vastly simplify the GET request? It's already loaded by SE, so there won't be a noticeable performance hit, and the code would be significantly cleaner. \$\endgroup\$ – Mego Jun 27 '17 at 6:50
  • 2
    \$\begingroup\$ As it is, I can simply copy-paste the code from TIO's frontend. To take advantage of jQuery, I'd have to rewrite it. Also, I wouldn't consider anything that uses jQuery clean. :P \$\endgroup\$ – Dennis Jun 27 '17 at 14:01
27
\$\begingroup\$

Ideone.com can compile/run over 40 languages, including Brainf**k and Whitespace.

List of supported languages:

  • Ada
  • Assembler
  • Assembler
  • AWK (gawk)
  • AWK (mawk)
  • Bash
  • bc
  • Brainf**k
  • C
  • C#
  • C++
  • C++0x
  • C99 strict
  • CLIPS
  • Clojure
  • COBOL
  • COBOL 85
  • Common Lisp (clisp)
  • D (dmd)
  • Erlang
  • F#
  • Factor
  • Falcon
  • Forth
  • Fortran
  • Go
  • Groovy
  • Haskell
  • Icon
  • Intercal
  • Java
  • JavaScript (rhino)
  • JavaScript (spidermonkey)
  • Lua
  • Nemerle
  • Nice
  • Nimrod
  • Objective-C
  • Ocaml
  • Octave
  • Oz
  • Pascal (fpc)
  • Pascal (gpc)
  • Perl
  • Perl 6
  • PHP
  • Pike
  • Prolog (gnu)
  • Prolog (swi)
  • Python
  • Python 3
  • R
  • Ruby
  • Scala
  • Scheme (guile)
  • Smalltalk
  • SQL
  • Tcl
  • Text
  • Unlambda
  • Visual Basic .NET
  • Whitespace

Pros & Cons:

  • Pros:
    • support for many languages
    • you can store your program there, together with parameters/sample input
  • Cons:
    • You have to obey some form and usage conventions to use IDEONE, like how to name your main-class in Scala.
    • The amount of CPU-time to run your program is limited
      • compilation time: 10 seconds,
      • execution time: 5 (by default and for not logged in users) or 15 seconds (this can be set from account settings page),
      • memory usage: 256 MB.
    • The version of the language used may be old (as is the case with R and Octave)
    • For more restrictions, see the FAQ (Threads, Network, ...)
\$\endgroup\$
  • \$\begingroup\$ ...and integrate with my UserScript FTW! \$\endgroup\$ – Nathan Osman Feb 18 '11 at 17:13
  • \$\begingroup\$ They even have an API! This has got to be added to my script. \$\endgroup\$ – Nathan Osman Feb 18 '11 at 19:05
  • \$\begingroup\$ Nvm. I went with Codepad. IDEOne has usage limitations that could drastically affect the script. \$\endgroup\$ – Nathan Osman Feb 19 '11 at 4:41
  • \$\begingroup\$ Does Codepad have an API? \$\endgroup\$ – Dogbert Feb 19 '11 at 8:55
  • \$\begingroup\$ Codepad doesn't allow regex, though. At least not PCRE-style ones. \$\endgroup\$ – nyuszika7h Mar 2 '11 at 14:19
  • \$\begingroup\$ Ideone supports whitespace?! Weird.. \$\endgroup\$ – Beta Decay Oct 1 '14 at 14:55
  • \$\begingroup\$ There are also certain modules that don't work. Like Python's turtle. \$\endgroup\$ – mbomb007 Sep 13 '16 at 15:35
11
\$\begingroup\$

Tutorials Point Coding Ground has a ridiculous number of available IDEs and terminals. Some may require registration, some versions may be old/outdated.

Terminals:

  • CentOS
  • IPython
  • Lua
  • Memcached
  • Mongo DB
  • MySQL
  • Node.JS
  • Numpy
  • Oracle
  • Octave
  • PowerShell
  • PHP
  • R Programming
  • Redis
  • Ruby
  • Scipy
  • Sympy

IDEs:

  • Ada (Gnat)
  • Algol-68
  • Angular JS
  • Assembly
  • AsciiDoc
  • Awk
  • Bash Shell
  • Befunge
  • Bootstrap
  • Brainfuck
  • C
  • CSS-3
  • Clojure
  • Cobol
  • CoffeeScript
  • C99 Strict
  • C++
  • C++ 0x
  • C++ 11
  • C#
  • Dart
  • D Language
  • Embedded C
  • Erlang
  • Factor
  • Fantom
  • Falcon
  • Fortran-95
  • Forth
  • F#
  • Free Basic
  • Groovy
  • GO
  • Haxe
  • Haskell
  • HTML
  • ilasm
  • Intercal
  • ICON
  • Java
  • Java 8
  • Java MySQL
  • JavaScript
  • Jquery
  • Julia
  • KSH Shell
  • LaTeX
  • Lisp
  • LOLCODE
  • Lua
  • Matlab/Octave
  • Malbolge
  • Markdown
  • MathML
  • Mozart-OZ
  • Node.JS
  • Objective-C
  • OCaml
  • Pascal
  • PARI/GP
  • Pawn
  • Perl
  • Perl MySQL
  • PHP
  • PHP MySQL
  • PHP Web View
  • Processing.js
  • P5.js
  • Prolog
  • Python
  • Python-3
  • Python MySQL
  • Rexx
  • reStructure
  • Ruby
  • Rust
  • R Programming
  • Scala
  • Scheme
  • Smalltalk
  • SML/NJ
  • Simula
  • SQLite SQL
  • Tcl
  • Tex
  • Unlambda
  • VB.NET
  • Verilog
  • Whitespace
\$\endgroup\$
  • 3
    \$\begingroup\$ I can never get codingground to work. \$\endgroup\$ – Riker Feb 8 '16 at 15:23
9
\$\begingroup\$

codepad.org lets you paste code into a web interface and shows you the results. It compiles/interprets several languages: C, C++, D, Haskell, Lua, OCaml, PHP, Perl, Plain Text, Python, Ruby, Scheme, Tcl.

\$\endgroup\$
  • \$\begingroup\$ Codepad is now supported by my UserScript. \$\endgroup\$ – Nathan Osman Feb 19 '11 at 4:38
9
\$\begingroup\$

DataBot

Thanks to the work of myself (Mego), VoteToClose, quartata, and CᴏɴᴏʀO'Bʀɪᴇɴ (and building upon the work of ProgramFOX et al.), a chat bot named Data has been built that can run code for several different languages. Stop by the PPCG Code Snippet Chat Bot room to see it in action.

Languages supported:

If you want a language added to the bot, feel free to ask one of us in the chat room.

\$\endgroup\$
  • \$\begingroup\$ Note that this itself may also be considered a programming language in the near future. \$\endgroup\$ – Addison Crump Feb 8 '16 at 22:31
  • 1
    \$\begingroup\$ This chat room has been frozen for inactivity. \$\endgroup\$ – mbomb007 Apr 19 '17 at 18:40
8
\$\begingroup\$

Golfscript

http://golfscript.apphb.com/

This is a website that I built, due to the fact that there were no options for running GolfScript online.

Please note that it's experimental; if you notice any bugs, please let me know at golfscriptweb.feedback++@gmail.com.

Edit:

Please note that the script executes as if it were run from the command line with no arguments. This means that the stack already contains an empty string. If you need to test a script that takes arguments, do the following:

  • use a semicolon (;) first, to pop the empty string off the stack.
  • write the string containing the parameters
  • write the script

Here is an example of a script that uses the string arg as a command line argument: http://golfscript.apphb.com/?c=OwonYXJnJwoKezJiYXNlfn0leyt9Kg==

Update 2012-10-25

New feature requested by fjdumont - hotkey for the Run button: CTRL+ENTER

Update 2013-02-20

Modified website design to make it a bit more usable on mobile devices.

\$\endgroup\$
  • \$\begingroup\$ how does one provide stdin input? \$\endgroup\$ – boothby Jun 28 '12 at 21:20
  • \$\begingroup\$ @boothby generally, in Golfscript you provide input as shown here: golfscript.com/golfscript/tutorial.html (see the "input and output" section). In the website, you just discard the stack and then place a string on it. This behaves as if that string were read from STDIN \$\endgroup\$ – Cristian Lupascu Jun 29 '12 at 5:00
  • \$\begingroup\$ @boothby this example demonstrates a program that takes 5 5 1 3 3 5 2 4 as input from STDIN: golfscript.apphb.com/… \$\endgroup\$ – Cristian Lupascu Jun 29 '12 at 5:01
  • \$\begingroup\$ I would love to see an accesskey for the run button... :) \$\endgroup\$ – fjdumont Oct 24 '12 at 5:55
  • \$\begingroup\$ I restarted the app and it's working again. My log does not contain anything suspicious; I'll need to see it's not logging that information. \$\endgroup\$ – Cristian Lupascu Mar 13 '13 at 12:55
7
\$\begingroup\$

I believe I now have a solution.

I have integrated Codepad support into my UserScript. When using the script you will see:

Notice the [Run] link on the right. Clicking this will launch the code in Codepad and let you view the output. It's not perfect, and it's not a complete solution... but it works :)

Note: as of v0.35, you can even run code blocks in the markup preview as you're writing your answer.

\$\endgroup\$
7
\$\begingroup\$

APL

Note that "APL" is a rather vague term and a program written for one of these interpreters is unlikely to work with one of the others.

  • GNU APL
    • Free software, runs on Linux. It's a bit sparse on features.
  • NARS2000
    • Free software, runs on Windows. APL2-ish, has quite a bit of extra features.
  • Dyalog APL

    • Full-featured commercial software, but by registering, you can get a free non-commercial license for the latest version on any platform. Alternatively, you can live with the pop-ups and nag screens of the unregistered version. Has built-in GUI support, unlike any of the others.
  • TryAPL

    • Runs in your browser, implements a subset of Dyalog 14.0. The subset really isn't big enough. Notably missing are the system constants and functions (the -functions), and evaluate (). Nevertheless, simple functions will work, just don't try any I/O.
  • ngn/apl
    • Also runs in your browser. Dyalog 14... ish. (In fact, Dyalog 14 seems to have lifted some extensions from this.) Free (both kinds) implementation, but kind of quirky, for example ⎕IO is stuck to 0 and it doesn't support -function definitions. Allows inline Javascript, for if you ever get the urge to write a web app in APL.
\$\endgroup\$
  • \$\begingroup\$ I think it should be noted that train parsing is different in ngn than Dyalog. \$\endgroup\$ – lirtosiast Nov 26 '15 at 18:13
  • \$\begingroup\$ @ThomasKwa I actually spoke with ngn about that and he's implemented trains as atops now to match Dyalog's behavior. \$\endgroup\$ – Alex A. Dec 26 '15 at 23:10
  • \$\begingroup\$ @AlexA. Awesome; ngn's a lot more golfy then. \$\endgroup\$ – lirtosiast Dec 26 '15 at 23:12
5
\$\begingroup\$

alwaysdata.com has a free 10MB account and supports multiple versions of at least these

PHP
Python   2.4, 2.5, 2.6, 2.7, 3.1
Ruby     1.8.6, 1.8.7, 1.9.2
Perl     5.10
Java
Lua      5.1
OCaml
Erlang

Also many others that people have used for golfing, such as bash/sh/csh/ksh/tcsh/fish/zsh/dc

\$\endgroup\$
4
\$\begingroup\$

repl.it is a free online interpreter/compiler I use for quite a few languages.

It can run:

  • Ruby
  • Python
  • Python3
  • C
  • Java
  • C++
  • QBasic
  • CoffeeScript
  • C#
  • JavaScript
  • LOLCODE

And more.

\$\endgroup\$
3
\$\begingroup\$

http://tryruby.org/

Provides a version 1.9 interpreter, but they have disabled pasting into the text field, and there is no easy way to interact with the standard in-/out-put.

\$\endgroup\$
3
\$\begingroup\$

SQL (Including PL/SQL, T-SQL, MySQL, etc.)

While IdeOne may offer an SQL interpreter, to fully leverage SQL you need a database schema and a server to host it. Not to mention, ANSI SQL is more or less dead and every variant of the language has its own ways of implementing all the things that aren't covered in the standard.

That's where SQLFiddle.com comes in, with support for building a schema in a host environment and then querying against it.

Presently-available host environments:

  • MySQL 5.5.32
  • MySQL 5.6.6 m9
  • MySQL 5.1.61
  • Oracle 11g R2
  • PostgreSQL 9.3.1
  • PostgreSQL 9.2.4
  • PostgreSQL 9.1.9
  • PostgreSQL 8.4.17
  • PostgreSQL 8.3.20
  • SQLite (WebSQL)
  • SQLite (SQL.js)
  • MS SQL Server 2012
  • MS SQL Server 2008

Very handy!

\$\endgroup\$
3
\$\begingroup\$

Pyth

Online: https://pyth.herokuapp.com/

Download: https://github.com/isaacg1/pyth

Call with

python3 pyth.py <program>
\$\endgroup\$
3
\$\begingroup\$

CJam

Official Online Interpreter (cjam.aditsu.net).

\$\endgroup\$
3
\$\begingroup\$

ESFiddle

Not to be confused with ES6Fiddle. ESFiddle allows for running ES6 and ES7 experimental features such as array comprehension and the exponentiation operator which no other transpiler does.

ESFiddle Screenshot

ESFiddle also has syntax highlighting, and icons for console.error and console.warn. It also supports implicit output. You can even create permalinks to link to in your answers.

\$\endgroup\$
3
\$\begingroup\$

Anarchy Golf

Anarchy Golf performance checker (link: http://golf.shinh.org/check.rb). It lets you run programs in those 111 languages:

(sorry, the list takes up quite a lot of screen space)

  • ><>
  • A+
  • Ada
  • Aheui
  • Arc
  • Asymptote
  • AWK
  • Bash
  • Bash (builtins)
  • BASIC
  • bc
  • Befunge
  • Befunge-98
  • Brainfuck
  • Burlesque
  • C
  • C#
  • C++
  • Chapel
  • CLC-INTERCAL
  • Clojure
  • COBOL
  • Common LISP
  • Crystal
  • Curry
  • Cyan
  • D
  • D-compile-time
  • dc
  • DOS
  • Erlang
  • Euphoria
  • FerNANDo
  • Fish
  • FlogScript
  • Forth
  • Fortran
  • gas
  • gnuplot
  • Go
  • GolfScript
  • goruby
  • Grass
  • Groovy
  • gs2
  • Haskell
  • Hexagony
  • Icon
  • Io
  • J
  • Java
  • JavaScript
  • jq
  • JVM
  • K
  • Kite
  • Labyrinth
  • Lazy-K
  • LilyPond
  • LMNtal
  • Logo
  • Lua
  • m4
  • make
  • Malbolge
  • Maxima
  • Mind
  • Minus
  • MNNBFSL
  • Nemerle
  • ObjC
  • OCaml
  • Octave
  • PARI/GP
  • Pascal
  • Pefunge
  • Perl
  • Perl6
  • PHP
  • Piet
  • Pike
  • Postscript
  • Prolog
  • Python
  • Python3
  • QCL
  • R
  • REBOL
  • REXX
  • Ruby
  • Ruby2
  • Rust
  • Scala
  • Scheme
  • sed
  • Smalltalk
  • SNOBOL
  • Squirrel
  • Tcl
  • Universal Lambda
  • Unlambda
  • VHDL
  • Vim
  • wake
  • Whirl
  • Whitespace
  • x86
  • xgawk
  • Xtal
  • z80
  • Zsh
\$\endgroup\$
2
\$\begingroup\$

I had that problem with pi-day golf on SO, the winning solution used the BSD variant of dc. Luckily I was able to confirm the answer on my silenceisdefeat.com which cost me $1. Seems to be dead now though. I guess I'll need to use a VM next time

EDIT: found the silenceisdefeat.com server has been upgraded and is now called saga.silenceisdefeat.net. Seems to be a quad core with 2GB ram

it has:
Python 2.4 2.5 2.6
Ruby 1.8.6
Perl 5.10.1

\$\endgroup\$
2
\$\begingroup\$

Simply Scala is a webinterface for interactive coding experience. A REPL (run-evaluate-print-loop).

You don't need to extend the App-class like in IDEONE.

\$\endgroup\$
2
\$\begingroup\$

The following website provide an online IDE for Piet.

\$\endgroup\$
2
\$\begingroup\$

Virtualization

Perhaps obvious, but might be helpful.

Most languages have compilers/interpreters/emulators available for free download (google is your friend). What may be harder is that those compilers/interpreters/emulators may only be available for a limited set of common OSes, for example bash on *nix or powershell on windows. While many of us will have what I consider the three common OSes (Linux, OSX, Windows) available at all times, this is not necessarily a given.

One way around this is virtualization. These days it is a simple matter to install a virtualization environment on your workstation of choice, and then install arbitrary OSes in VMs.

Common virtualization environments (some with free downloads) include:

Then you'll need to find the OS to run in the VM.

  • Linux is very easy to find. Ubuntu is often recommended for non-Linux users and IMO has a wealth of support information online
  • Windows VMs for testing are available here
  • OSX. Hmm, ok you'll need Apple hardware for that to comply with the EULA (even though recent OSX can be installed in a VM)
\$\endgroup\$
2
\$\begingroup\$

Codio

https://codio.com/ offers free Ubuntu virtual machines accessible in the browser. The following languages are available out of the box:

  • JavaScript (node)
  • Ruby 2.1.5
  • Python 2.7.3
  • Perl 5
  • Java 1.7

It's possible to install a lot of other languages/platforms, for example:

  • C# (Mono)
  • PHP
\$\endgroup\$
2
\$\begingroup\$

R

Julia

It's good to note that, at least for me, Coding Ground rarely works.

\$\endgroup\$
2
\$\begingroup\$

Rollapp

You can use Rollapp for text editors like emacs, brackets, and there are some IDEs in the 'coming soon' section. It does not support sharing very well, but if you are looking to run other people's code the IDEs may work when they come out (or if they come out). Hopefully they will make Eclipse available and we will have a full java IDE on the web!!

links:
https://www.rollapp.com/app/terminator - run bash and perl etc
https://www.rollapp.com/app/eclipse - eclipse, hopefully will work soon

\$\endgroup\$
2
\$\begingroup\$

Making Future Posts Runnable Online with Stack Snippets

Has interpreters for a lot of esoteric languages.

Labyrinth

That is a Labyrinth interpreter I wrote. (It doesn't support bigintegers yet.) It has a fairly useful debug feature that allows you to see the pointer moving around.

\$\endgroup\$
2
\$\begingroup\$

jq

https://jqplay.org ­– Not written by the language's developer himself, but the official jq Manual also uses it to run its examples.

jq play is more an interactive playground, so the checkboxes to emulate the command line switches not seem to be settable through GET parameters, like the Filter (q parameter) and JSON (j parameter) inputs can be. (They fixed it. Now it can generate a permalink with the complete setup.)

\$\endgroup\$
2
\$\begingroup\$

Burlesque has on online shell here The interpreter can also be downloaded on the official webpage and installed locally.

\$\endgroup\$
1
\$\begingroup\$

Pyke

Online: pyke.catbus.co.uk

\$\endgroup\$
1
\$\begingroup\$

Fourier

Whilst also available on http://tryitonline.net, the full version of Fourier (with delays and screen clearing) can be found permanantly on http://beta-decay.github.io/editor.

\$\endgroup\$
1
\$\begingroup\$

.NETFiddle

If most of the time, I will use Tio for .NET snippet. It is good to know about .NETFiddle.

  • .NETFiddle supports C#, F# and VB.
  • .NETFiddle compiles with .NET 4.5 or Roslyn 2.0
  • .NETFiddle allows to use NuGet Packages !
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .