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.
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..."
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!
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.
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!
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?
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.
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?
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.
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.
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:
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.
[+] [-] mark_h|13 years ago|reply
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
[+] [-] michael_michael|13 years ago|reply
[+] [-] unknown|13 years ago|reply
[deleted]
[+] [-] magnars|13 years ago|reply
[+] [-] tikhonj|13 years ago|reply
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
[+] [-] chamakits|13 years ago|reply
Regardless of whether you can or not, it truly is some amazingly impressive work. Thanks for sharing!
[+] [-] magnars|13 years ago|reply
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
[+] [-] sdgs86|13 years ago|reply
[+] [-] tikhonj|13 years ago|reply
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.
[+] [-] jhickner|13 years ago|reply
[+] [-] thomasfl|13 years ago|reply
https://github.com/magnars/.emacs.d
[+] [-] agumonkey|13 years ago|reply
[+] [-] Aykroyd|13 years ago|reply
[+] [-] mattdeboard|13 years ago|reply
[+] [-] espeed|13 years ago|reply
[+] [-] CmdrKrool|13 years ago|reply
http://news.ycombinator.com/item?id=4185960
http://tkf.github.com/emacs-ipython-notebook/
[+] [-] klawed|13 years ago|reply
[+] [-] JoelMcCracken|13 years ago|reply
[+] [-] justinhj|13 years ago|reply
[+] [-] msutherl|13 years ago|reply
[+] [-] baggers|13 years ago|reply
[+] [-] edwinyzh|13 years ago|reply
[+] [-] wavephorm|13 years ago|reply
[+] [-] magnars|13 years ago|reply
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
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.
[+] [-] unknown|13 years ago|reply
[deleted]