Hacker News new | ask | show | jobs
by tomh- 5404 days ago
Lisp: http://dl.dropbox.com/u/2196687/lisp-keystrokes.png
3 comments

My experience with Lisp is minimal, and I'm a Vim guy, so I may be totally wrong about this, but...

Doen't nearly all serious Lisp developers use Emacs? And doesn't Emacs have piles of shortcuts for wrapping/unwrapping/manipulating s-expressions? I'd imagine that the resulting number of parens is wildly different than the number originally typed.

Can any experienced Lispers comment on this? Where can I find a cheat sheet of such shortcuts?

Not an experienced Lisper, but yes, you're right. If you made heatmaps of the original keystrokes, for a Lisper using Paredit, there would likely be a decent highlight on the open paren but almost nothing on the close, as Paredit inserts parens in pairs. Hitting ( inserts ().

I don't think Paredit isn't included in Emacs, but here's the relavent page on the Emacs Wiki: http://www.emacswiki.org/emacs/ParEdit and here's a cheatsheet: http://www.emacswiki.org/emacs/PareditCheatsheet

There's also something similar for Vim, or at least something bundled with slimv, which is more than just Paredit (supporting something like SLIME) http://www.vim.org/scripts/script.php?script_id=2531

Most Emacs lispers turn on Paredit after a little while. The major win there is never having invalid structure to your code, but there is the handy side-effect of never having to type a closing paren: http://www.emacswiki.org/emacs/PareditCheatsheet

Note the images in the article are done by static analysis of text files, which is very different from measuring what people actually type.

The "-" key isn't even lukewarm which seems odd to me given what little I know about lisp.
I thought that to, until I saw the note saying Paul Graham wrote it. Arc is noticeably terse, and avoids the use of - key wherever possible.
Ah! That explains it; thanks!
What corpus did you use to generate that?