4 min Emacs screencast inspired by Bret Victor's Inventing on Principle
emacsrocks.com
emacsrocks.com
This is a "live" video he did, slightly longer at 18 minutes, but with lots of javascript refactoring, etc: https://www.youtube.com/watch?v=p3Te_a-AGqM
I think it would be cool to combine it with a small JavaScript library that could make things like the transformation between animation and just drawing a path automatic. I doubt this would be too difficult, and it would make going between them much easier if you didn't have to change your code significantly.
There is no question that I'm using Swank-js for all my web development now!
I was thinking about maybe building on top of some existing framework. I think there are various existing libraries that help you create shapes and animate them; I imagine you could make something very useful by hooking onto the various methods in a library like that.
Regardless of whether you can or not, it truly is some amazingly impressive work. Thanks for sharing!
The only thing missing there is the packages installed through package.el, which would be slime-js in this case.
And here's the code for the bouncing ball: https://github.com/magnars/blockout
I don't think there can be a general tutorial for setting things like this up. The issues with this plugin are going to be due to your browser or JavaScript engine; the issues with a different plugin are going to be due to LaTeX or GHC or whatever program you're interfacing with. So the problems are probably going to be unique to each particular plugin rather than uniform across all plugins.
Installing swank-js is a breeze with npm, but the installation instructions tell you to get the newest version of SLIME from their svn. That didn't work so well, since my clojure-swank already relied on an older version.
Simply installing slime-js from marmalade instead made all the difference.
As for my settings, they are public on github. https://github.com/magnars/.emacs.d/blob/master/setup-slime-...
I modified his version of it to decouple it from what I gather are a couple of his other repos (specifically js2-refactor, and another unknown). You can get it here:
https://github.com/mattdeboard/dotfiles-emacs/blob/master/se...
Simply put that file somewhere on your ``load-path``, then add ``(require 'setup-slime-js)`` to your .emacs/init.el. Reload everything, and you should be good to go.
Note that the in-emacs REPL is still pretty broken for me vis a vis entering code directly at the prompt. e.g. trying to enter an array causes swank-js to throw an exception. Not sure if that's because of my setup or not.
Maybe it will resolve your issue of you put this at the top of the file?
(require 'slime)
(require 'slime-js)
The swank-js documentation says it depends on js2-mode too. Are you using that? At least I have no issues with entering arrays in the repl.