Web-based REPL's for many languages

I only just recently learned the term “REPL”. It essentially means “command line”. You type code in, it runs, you see output.

Read, Eval, Print, Loop.

JavaScript

We’re web folks ’round here, so JavaScript makes for an easy example. The “console” in your browser’s DevTools is a REPL for JavaScript.

javascript-repl.gif

There is a console on CodePen as well, which can be useful because you can create examples that link to REPL output:

codepen-repl-output.png

You could also think of CodePen as a REPL for HTML, CSS, and JavaScript, alongside a variety of preprocessor languages like Sass, Less, Stylus, CoffeeScript, etc.

Future JavaScript

Babel is a compiler that turns future-syntax JavaScript into current-generation JavaScript. You can play with Babel right on their website, and they straight up call it a REPL:

babel-repl.png

CoffeeScript offers their own as well:

coffeescript.png

Ruby

repl.it is a a web-based REPL for a bunch of languages, including Ruby.

ruby-repl.png

You can save your examples for later reference as well.

Python

Skulpt lets you run Python entirely in the browser.

python.gif

PythonAnywhere also has IPython, an online interpreter.

ipython.png

PHP

repl.it seems to be a good choice here again:

php.png

For the record, repl.it supports an impressive number of languages, so if you’re looking for a specific one, you might try there first.

many-languages.png

Java

Java REPL has a console that is as simple as it gets:

java.png

Swift

IBM makes a REPL for Swift. They call it a sandbox, which is a common name for these kinds of things.

swift.png

Clojure

Clojure is weird. I enjoyed TryClojure because it not only allows you to write/execute Clojure, but also walks you through learning it interactively:

closure.png


Happy coding!

About the Author Chris is a web designer and developer. He writes about all things web at CSS-Tricks, talks about all things web at conferences around the world and on his podcast ShopTalk, and co-founded the web coding playground CodePen. More by this Author