I came across this post talking about numerical speed in Clojure, so I thought I would try out the equivalent in Common Lisp (Clozure CL) on my Macbook:
CL-USER> (let* ((arr-size 3000000)
(double-arr (make-array arr-size :element-type 'single-float)))
(dotimes (i arr-size)
(setf (aref double-arr i) (random 1.0)))
(time (loop for i from 0 below arr-size
summing (aref double-arr i))))
(LOOP FOR I FROM 0 BELOW ARR-SIZE SUMMING (AREF DOUBLE-ARR I))
took 45,649 microseconds (0.045649 seconds) to run.
During that period, and with 4 available CPU cores,
45,558 microseconds (0.045558 seconds) were spent in user mode
57 microseconds (0.000057 seconds) were spent in system mode
45 milliseconds, not bad.
Our industry, the global programming community, is fashion-driven to a degree that would embarrass haute couture designers from New York to Paris. We’re slaves to fashion. Fashion dictates the programming languages people study in school, the languages employers hire for, the languages that get to be in books on shelves. A naive outsider might wonder if the quality of a language matters a little, just a teeny bit at least, but in the real world fashion trumps all.
Steve Yegge, Foreword to “The Joy of Clojure”
Woof … I’ve discovered fire!
$ lein repl
REPL started; server listening on localhost port 13859
Putting it to use with some clojure plugins:
mkdir -p ~/.vim/autoload ~/.vim/bundle
curl -Sso ~/.vim/autoload/pathogen.vim https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim
git clone git://github.com/tpope/vim-fireplace.git
git clone git://github.com/tpope/vim-classpath.git
git clone git://github.com/guns/vim-clojure-static.git
execute pathogen#infect() at the top