

4 min Emacs screencast inspired by Bret Victor's Inventing on Principle - magnars
http://emacsrocks.com/e11.html?

======
mark_h
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
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
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
Ooh, very nice. I'll fix that straight away. Thanks!

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

~~~
tikhonj
Well, I doubt you could make it arbitrarily general-purpose.

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.

------
chamakits
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!

~~~
magnars
I wrote a little bit about installing swank-js a couple of posts up. You can
also check out all my emacs-settings on github
[https://github.com/magnars/.emacs.d/blob/master/setup-
slime-...](https://github.com/magnars/.emacs.d/blob/master/setup-slime-js.el)

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>

~~~
stenmorten
Cool, but how about the rest of the code, for the "game"?

~~~
magnars
That last link there is all there is of the "game" for now. :-)

------
sdgs86
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
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
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
It's like an accelerated ride through emacs infos. Lots of straightforward
valueable options. Thanks

------
Aykroyd
I love these kinds of demos. REPLs are great... it makes me want to go back to
using emacs.

------
mattdeboard
Oh man, definitely going to get this up-and-running tomorrow. This is awesome,
potentially.

------
espeed
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?

~~~
CmdrKrool
I haven't tried it yet, but this "Emacs IPython Notebook" that was posted a
few days ago looks similar, and their docs say that it's "like SLIME".

<http://news.ycombinator.com/item?id=4185960>

<http://tkf.github.com/emacs-ipython-notebook/>

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

------
JoelMcCracken
Really glad someone is doing emacs screencasts. Awesome job magnars!

~~~
justinhj
Many people are. I did a couple for my eredis project that let's you interact
with Redis over an elisp repl or create/edit tables dynamically in a buffer
from redis keys etc <http://www.youtube.com/watch?v=ZP0MOaRueHU>
<http://code.google.com/p/eredis/> disclaimer: I am not as cool as magnars

------
msutherl
SuperCollider is exactly like this, but for sound synthesis:
<http://supercollider.sourceforge.net/>

~~~
baggers
And there is an awesome Clojure interface for it called Overtone.
<http://vimeo.com/22798433>

------
edwinyzh
Has Bret Victor expected his amazing Inventing on Principle presentation would
inspired so many of us? Me included, check my profile :)

------
wavephorm
Now he needs to do a 4 hour step-by-step tutorial on how he set up Emacs to do
this.

~~~
magnars
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-...](https://github.com/magnars/.emacs.d/blob/master/setup-slime-js.el)

~~~
Kototama
I have the same problem. So how does ELPA resolve conflicting SLIME versions?

~~~
magnars
From what I can understand, it doesn't. Backwards compatability is usually
good. However, there was a breaking change in 2011 sometime. The slime-js in
marmalade relies on the SLIME in marmalade, which is from 2010.04.04 - and
works with that. Same for clojure-swank. So by removing the newest SLIME, it
worked for me.

