TIL: lein search

This’ll be a quick one: let’s say you know what library you want to add to your Clojure project; how do you figure the exact string / version to add to your dependencies? Search Clojars / Maven Central? Google for the project’s GitHub page? Leiningen users actually have a quicker answer:

Where Should My user.clj File Go?

Clojure programmers often use a user.clj file to contain bits of development tooling and code experiments that are not considered part of the underlying project. This file has the “magical” property that it is automatically loaded by Clojure as it starts up, without needing to be referenced explicitly in the project’s code. Clojure will happily load this file from anywhere on the classpath1, which begs the question: where should I put my user.

Working Faster in Emacs by Reading the "Future"

There are a number of times when using Emacs that a command asks for an input string—e.g. a search string—and offers an intelligent default value you can accept simply by hitting RET. That’s fantastic when the default is exactly what you want, but what about when it’s almost what you want? Do you really have to manually type out the whole string? This is Emacs after all!

TIL: Clojure #inst Reader Literal Shortcuts

I’m a big fan of the Today I Learned microblog that Hashrocket runs. The TIL format of simply sharing what is new and useful to the author encourages Hashrocket’s engineers to share practical knowledge when they might not otherwise find the time if they needed to write a wordy introduction or conduct a topical deep dive. Beyond that, it also gives license for the author to share something that is new to him or her–and likely many others–without any implicit suggestion of blazing new technological trails.

Escaping Clojure Exceptions

Given the following code, it’s pretty obvious that we’ve handled the inevitable exception and we’re going to return :handled, right?