top | item 4201132

4 min Emacs screencast inspired by Bret Victor's Inventing on Principle

163 points| magnars | 13 years ago |emacsrocks.com | reply

34 comments

order
[+] mark_h|13 years ago|reply
Awesome!! That guy is steadily doing some amazing publicity for emacs.

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

[+] arnemart|13 years ago|reply
This was done as a lightning talk the night before the Web Rebels conference in Oslo in May. I was there, and Magnar completely killed it. Awesome stuff.
[+] michael_michael|13 years ago|reply
A note for the author regarding Dropbox's "uncool" headers: Adding `?dl=1` to the Dropbox link will automatically prompt users to download the file upon clicking, and save you from having to write the disclaimer asking users to right-click and "Save As..."
[+] magnars|13 years ago|reply
Ooh, very nice. I'll fix that straight away. Thanks!
[+] tikhonj|13 years ago|reply
Wow, that is awesome!

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!

[+] magnars|13 years ago|reply
Yeah, that would be pretty cool. I'll be making something along those lines to aid me while I'm making that bouncy ball into an actual game. I wouldn't know how to start making it general purpose, but as a wrapper around canvas and requestAnimationFrame it is definitely doable.
[+] chamakits|13 years ago|reply
This is some amazing stuff. As a fan of emacs, but having no experience with javascript, I would like to be able to recreate this personally, and possibly use this as my training ground. I know the purpose of the post is to show a short video of something impressive, but could you consider providing the code samples and maybe even a guide of the code?

Regardless of whether you can or not, it truly is some amazingly impressive work. Thanks for sharing!

[+] sdgs86|13 years ago|reply
I've been a vim user since I was ten years old, but emacs is impressing me more and more. The learning curve for setting up some of these plugins is pretty high; does anyone have a tutorial so I can get this up and running?
[+] tikhonj|13 years ago|reply
Actually, most plugins are easy. The problem is with plugins that need to interface with external programs--getting both Emacs and some program, like a browser, to cooperate can be tricky.

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.

[+] thomasfl|13 years ago|reply
I can recommend Magnar's and Christian's emacs settings. All those fine tuned micro optimizations for emacs make you feel like a rock star programmer:

https://github.com/magnars/.emacs.d

[+] agumonkey|13 years ago|reply
It's like an accelerated ride through emacs infos. Lots of straightforward valueable options. Thanks
[+] Aykroyd|13 years ago|reply
I love these kinds of demos. REPLs are great... it makes me want to go back to using emacs.
[+] mattdeboard|13 years ago|reply
Oh man, definitely going to get this up-and-running tomorrow. This is awesome, potentially.
[+] espeed|13 years ago|reply
This cool -- definitely digging into this tomorrow. I use swank-clojure every day, and it's incredibly productive to see real-time results as you type. I didn't know there was a swank-js. Is there by chance a swank-python out there somewhere?
[+] klawed|13 years ago|reply
Awesome! Emacs was my first love and while we still hang out, it's not like it used to be. But this inspires me to make some time in my life for more. Also, I love the keyboard clicks. Sounds like a Das Keyboard, to me.
[+] edwinyzh|13 years ago|reply
Has Bret Victor expected his amazing Inventing on Principle presentation would inspired so many of us? Me included, check my profile :)
[+] wavephorm|13 years ago|reply
Now he needs to do a 4 hour step-by-step tutorial on how he set up Emacs to do this.
[+] magnars|13 years ago|reply
The biggest problem for me was conflicting versions of SLIME.

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-...

[+] mattdeboard|13 years ago|reply
This thread is a little stale but magnars' .emacs.d repo isn't quite sufficient to explain what's going on. Follow his instructions for installing slime-js and swank-js, then you'll need the ``setup-slime-js.el``.

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.