programming
Unique shell helper for Emacs
Unique shell helper for Emacs

To launch a shell in Emacs, you can use M-x shell. However, when you want to launch another one, you have to name the second shell.

Batch Compiling with Aquamacs Emacs

I needed to batch compile some files recently, and I had to lookup how to do this with Aquamacs. It’s pretty simple. If Aquamacs is at /Applications/Aquamacs, then this will work: /Applications/Aquamacs\ Emacs.app/Contents/MacOS/Aquamacs\ Emacs -nw -batch -f batch-byte-compile /path/to/elisp-file.el

Emacs Lisp – Block Commenting Ruby Code

These days I’m working to become proficient in Emacs (I’ve recently switched from Vim, as Greg mentioned on his blog). With that comes all kinds of things like org-mode, yasnippet, and lots of keyboard combinations. A part of this current effort I’m learning Emacs Lisp right now. There’s probably a better way to do block comment [...]

Squared Euclidean Distance on Hashes in Ruby
Squared Euclidean Distance on Hashes in Ruby

For some simple analysis I’m doing, I needed a routine to calculate squared Euclidean distance in Ruby on two hashes. The squared Euclidean distance d2 between two n-dimensional vectors x1 and x2 is: I needed this calculation for values corresponding to the intersection of the set of keys for two hashes. I came up with [...]