Naming considered MOSTLY harmless
This is a continuance of a thought that I'd briefly mulled over on twitter to some reaction. No point in summarizing as it's only a few characters: "In #Clojure I find it best to try and avoid naming anything except for the tools (fns and constants) used to construct a running system."
The reactions were great, as I would more or less expect, namely trying to drive at the thrust of why I would say such a thing. "What are examples of things I would avoid naming?" "By naming do I mean assigning to a Var, or something else?" and "My examples are primarily stateful things, is this to cure live programming woes?"
I'll do my best to expound on my reasoning in more detail, become more crisp in defining what I mean, and perhaps persuade you to strive in the vicinity of this same goal.
Mac OS X 10.6.*, ruby 1.9.2, and rvm
I've been running into some complications trying to get ruby 1.9.2 installed by RVM on OS X 10.6.3. This is likely not an original problem, but I got it to work. My environment is pretty crufty, I have an oldish Macbook Pro that came installed with 10.4, and has had an upgrade path including 10.5. Macports, and it's ruby interpreter were on my system, as well as the default Mac ruby, and a ruby source tarball installation.
I had since uninstalled all rubies except for the 1.9.2 source tarball, and uninstalled Macports in favor of migrating to Homebrew.
My specific problem is working on a project in which the .rvmrc specified ruby-1.9.2-p0, and rvm install ruby-1.9.2-p0
did not act as expected. I received the error
readline.c:1292: error: 'username_completion_function' undeclared (first use in this function)
Starting with brew and rvm installed I then needed to do some more:
Install readline:
brew install readline
Cleanup to only one version of readline:
brew cleanup readline
Link the brew install to /usr/local:
brew link readline
Install with rvm passing args to autoconf:
rvm install 1.9.2-p0 -C --enable-shared,--with-readline-dir=/usr/local
No compile errors, and proper readline support! Yay. My thanks to George at Plataforma Tecnologia for this solution.
Git & Cerberus
Looking at this past article is a good start as most of the problems to be solved are similar or the same.