Chinese Zodiac Time for Emacs
In the spirit of Chinese New Year, I hacked up a small extension for Emacs to render the current time of day using emoji and Chinese characters:
In the spirit of Chinese New Year, I hacked up a small extension for Emacs to render the current time of day using emoji and Chinese characters:
Wherein I argue that Clojurians should be a touch more embracing of
Java interop and that java.time
is actually good.
(This post is regarding a very particular issue at the intersection of Emacs, Clojure, and CIDER, so most readers can probably skip it, but I figured the solution deserved to be somewhere on the internet.)
CIDER has this awesome feature via clj-refactor where it can
automatically add missing libspecs to your ns
form as soon as you
type an aliased var name using an :as
alias you have previously used
for that namespace:
You can define a preferred set of (:as
) aliases via
cljr-magic-require-namespaces
in your Emacs config, and, whether
you’ve done that or not, CIDER tries hard to be smart, offering you
choices if you’ve previously used the same alias for different
namespaces in different places in your project (e.g. s/
for
clojure.spec
some places and the same for clojure.string
in other
places).
Moreover, CIDER evaluates the namespace form, bringing in the new requires, allowing you to just keep typing and coding, without breaking your flow.
This is all fantastic, but I ran across one particular scenario where
this kept biting me: my user
namespace.
From the department of How Did I Never Learn This in 12+ Years of Clojure? comes today’s tip:
Did you know you can generate a thread dump (+ memory usage information) from a Clojure REPL with a single keystroke? I sure didn’t.
After the news from the Clojure/conj that Datomic is now free, I was excited to get home and upgrade and access newer features and high-availability. Herein are notes from how that upgrade process went that I hope will be helpful to anyone else upgrading, including difficulties I had running the official Datomic AMIs.
The Taiwan Beats Showcase is probably my favorite music event at SXSW, and I make a point to catch it every year.
This year I put together a playlist of songs by all of the performing artists for my friends at the Austin chapter of Taiwanese American Professionals.
I don’t know why I’m quite so tickled by this, but today I learned
that you can make multi-line git
commit messages by passing multiple
-m
arguments:
I’ve long thought it was a little funny that Emacs doesn’t provide an easy way to run a shell command on the current file. It turns out it does, but it’s not as obvious as you might expect.
Creating a Docker image isn’t particularly difficult, but I never do it often enough to remember the incantations required. Yesterday I needed a Docker image for running CI jobs on Circle CI. There are some great pre-built images out there, but I couldn’t find the combination of Java 17, Leiningen, and Node that I was looking for. This is a quick guide to how to build your own image with the tools you need.
Earlier this week, after responding to a post on
ClojureVerse, I got curious about re-implementing the basics
of Emacs’s regexp-opt
function in Clojure. I thought it would be a
fun little coding exercise so I decided to take a stab at it during a
few spare minutes in my day and was very pleased with the concision
and clarity of the result.