æ/Isogeny

Isogeny makes all configuration dynamic.

2022—01—05 Wed · Ælfsyg

Clojure CLI apps using GraalVM

Clojure, like other JVM languages, excels in long-running tasks1. But I was always jealous of the languages that I'd used for scripting and command line tools which can't wait a second for a JVM to start for each invocation. Despite its slow startup time, the JVM shines at peak throughput. Some times we want one, sometimes the other. For tasks that have a very short lifetime (~1s), we need Ahead of Time compilation....

2021—12—14 Tue · Ælfsyg

Clojure's rarer threading macros: some-> and cond->

I use Clojure's threading macros perhaps more than I should, but I do so because they mimic the way I think about the code I write. A lisp programme is a tree and yet most of the programmes that we write are, or should be, lines of functions acting on a datastructure1 2. The value of threading macros 1 2 (* 3 (+ 2 (- 10 (+ 10 (/ 2 2))))) ^ To grok this code I have to start from the bottommost leaf, in this case (/ 2 2), yet it is at the line's far right contrary to where it is natural for me and most of the world3 to start reading....

2021—12—09 Thu · Ælfsyg

An 8-year-old Clojure bug, resorting to Java

Dodge a Clojure bug by using Java and tools.build

2021—12—01 Wed · Ælfsyg

æ/alias+ns

Macros that makes namespace aliases easy. https://github.com/aelfsyg/alias-ns.git Qualified keywords have ballooned in popularity since the release of spec with Clojure 1.9. And thankfully so! A creed amongst Clojurians is that maps should be open to modification, meaning that I should be able to add data to a map without worrying that it will break its consumer, and that when processing maps we shouldn't remove data using something like select-keys without good reason....

2021—11—24 Wed · Ælfsyg

UK newspaper subscriptions

How much does a subscription cost?

2021—11—19 Fri · Ælfsyg

æ/Rashomon

See things from another perspective; Clojure functions that build datastructures from events.

2021—11—19 Fri · Ælfsyg

Correlation and causation IDs

This is a very useful pattern that I see rarely used. When working with systems that pass messages, it can be difficult to later reconstruct a conversation or the sequence of events. It is second nature to us to assign entity IDs1 to messages, but two other IDs will help us to understand the structure of conversations. One is a correlation ID. This is used to tie the conversation together....

2021—11—18 Thu · Ælfsyg

æ/Demesne

You don't understand a pattern until you can implement it — domain-driven design, CQRS, event sourcing.

2021—11—17 Wed · Ælfsyg

Event Sourcing

This article is in the process of being written. Introduction State isn't stored. We rebuild it every time we need to query or do something to it. It has its drawbacks, but it does allow us to do things that would be impossible otherwise. We can view out system's history with new perspectives, or add in missed past events. Our view of the past is necessarily wrong for any complex system and yet we design systems that lack any way to account for that....

2021—11—17 Wed · Ælfsyg

æ/read-time.el

An Emacs function that tells you how long it takes to read things.

2021—11—16 Tue · Ælfsyg

dired-listing-switches and ls

Have you ever been unsatisfied with the way that dired1 lists your files? Ever wished it wouldn't show you the group and owner for every file despite them all being exactly the same? Want to get those directories out of the way of your files? … enter dired-listing-switches. The first time I saw this variable set in another person's init.el I thought it must be a kind of magic....

2021—11—13 Sat · Ælfsyg

Creating private org directories

Org directories made private.

2021—11—10 Wed · Ælfsyg

Revisiting the Baader–Meinhof phenomenon

I will update this post as events unfold. In a previous post, I explained how I set out to test the Baader–Meinhof phenomenon using a randomly chosen set of five topics which I would look out for to determine an average time until they were seen again. Subconscious seeking? Events <2021-10-23 Sat 22:05> — Looking for more topics to extend the group to 10 or 15, the first I found that I had heard of already was… a Robbie Williams album....

2021—10—30 Sat · Ælfsyg

Serialising with Java generics

Serialising and deserialising with Java generics and TypeReferences.

2021—10—27 Wed · Ælfsyg

Testing the Baader–Meinhof phenomenon

Why do I keep seeing certain things again and again?

2021—10—23 Sat · Ælfsyg

æ/bang.el

Use DuckDuckGo's !Bangs from the comfort of Emacs!

2021—10—20 Wed · Ælfsyg