Light Table and interactive live coding


LightTable 0.6.2 has been released recently. It now supports Python and graphics can be embedded directly into the interactive console.


LightTable changed a lot since it was first announced on Chris Granger website, especially regarding the core UI. It now features a plugin manager and inline evaluation, including graphical displays from IPython.

Since I was recently talking about Racket Scheme and its capabilities to display inline graphics, much like Emacs Geiser does, I believe I should just finish this post that I started more than a month ago.(a) Here is a basic example with code from Matplotlib demo gallery:


LightTable is pretty fast and reactive, and it offers an interesting model for live coding session.(b) And, well, it's now open source. Maybe it could be a good alternative to IPython Qt console or even HTML notebook one day.

It's quite interesting that Emacs, and to some extent Vim, comes with full-featured inferior modes and REPLs for most common languages, while Sublime Text (ST) and its sublimeREPL package offers far less powerful functionnalities, although it has long been hailed as the definitive text editor. Personally, I can never remember more than 10 keyboard shortcuts--and I experienced the same frustation with Textmate before, which is why I still prefer Emacs over other editors: I can just type M-x followed by some keywords (ido takes care of the rest) and I get things done in few seconds. There also a menu bar, which can be convenient at times (yes, I know, we don't really need a mouse, but I use my trackpad :). Finally, there is a package manager which facilitates the installation/updating of additional packages.

However, it is interesting to note that we can interact with a live Racket shell in ST as well. Here is a screenshot of sublimeREPL running under ST3 with the same sample Scheme code as before: (The Racket package should be installed prior to running the Racket REPL, and racket must be in your $PATH.)


However, to be fair it looks like the R REPL has been enhanced. Last time I checked, their REPL was displaying strange characters when R expressions were being sent to it (this was last year with ST2 since SublimeREPL was not available for ST3). Now it looks ok, although I haven't gone far with it:


Note that diving into litterate programming with knitr requires a couple of additional packages, namely SublimeKnitr, EnhancedR, and LaTeXing, but see Using knitr with LaTeXing for more information.

As a sidenote, although I recommend to my students to use RStudio when working with R, I think ST really is a good editor and this is what I would recommend to them in place of Emacs whose learning curve is certainly steeper.


(a) This post is pretty old, and LighTable is now at version 0.6.5.

(b) Session provides yet another "Live-Coding Environment for Clojure".


Articles with the same tag(s):

El Capitan
Why I am still using Emacs
Tmux and OS X
OS X Yosemite
Some useful Mac Apps for data scientists
Collecting email usage statistics from mu
From Beamer to Deckset
Fixing some critical keyboard shortcuts in OS X terminal
A modular configuration for Emacs
Common lisp on Mavericks