Is Bono Secretly Fraternising With Wall Street Elites?

I’d like you to imagine the walls
and ceiling bubbling
with mournful yak eyes,
a bestial froth;

the secret fraternity peering
into the room
from their occluded dimension.

I’d like you to imagine a thousand
larks shrieking “cui
bono cui bono” and falling
charred out of the sky

into your lap, spread with elite
gingham, the better to receive
eternal benediction.


(Being my own response to Uut Poetry’s “Clickbait” challenge)

Monday Poem: Arthuriana

i)

The mythos is as you find it: chauvinistic
heralds, their spurs snagging in damp bracken,
yomping from chapel to tourney; roaring
metal-heads clashing amid pennants. Perfidy
reversed through jeopardy. Names that are supposed
to mean something: Bewmaynes, Belvedere.
An order not sustained and not brought down
by unruly interventions – Merlin, le Fay –
so much as by its own propensity
for needless questing; as if each hard-won
consolidation were the pretext for another
narrative fling: a voiding of premises
as of horses, so scrambling to its feet
to meet upright the panting enemy.

ii)

Ripples spreading from the blade-tip.
The king’s breath ragged
among the reeds.

Ruin on the field,
incontinent armour spewing
stout blood into the soil.

The barge drifts
with its burden: the helmet
lifted and set aside;

the raw hands
in smeared gauntlets
folded over the wound.

Octarine vs Rekord: Design Comparison

Rekord is an excellent Java 7 library by my friend and sometime colleague Samir, which overlaps in several respects with my Java 8 library Octarine. The similarities are due both to a common ancestry (we both used to work on a codebase that made extensive use in testing of Nat Pryce’s make-it-easy) and an ongoing process of looking in on each other’s code from time to time to see if there’s anything worth pinching. More generally, I think myself and Samir have been scratching similar itches: we’ve both suffered under the tyrannical reign of Java Beans, and have both wanted to find better ways of dealing with record types in Java.

One major design difference between the two libraries has to do with their approach to type tagging. A Rekord is always a Rekord<T> of some particular type T, and is always constrained to use keys which are connected to that type:

The first type parameter in each of the Key<Sandvich, T> declarations identifies that key as one that can be used when creating Rekords of type Rekord<Sandvich>. This means that common key names that might occur in multiple contexts are kept separate by the type system. This helps you to avoid constructing a Rekord<Sandvich> containing a Key<Hair, Style> field. The Sandvich type acts as a kind of namespace for keys.

In Octarine, a Record is just a Record: it can contain key-value pairs using any keys you like. There is a reason for this. I wanted Octarine to move away altogether from the ORM pattern of mirroring types in a domain (database tables, for example) in the record types that represented values taken from that domain. The reason is that we are often interested in records that span domains; for example, if I join the Person table to the Address table, to get a record that represents a person together with their current address, that record will contain values drawn from the columns of both tables.

With Octarine, it’s quite legitimate to define collections of keys that refer to the columns in different tables, but to compose records that use keys from several such collections. Disambiguation of keys is done by prefixing the key name with the name of the interface it’s defined in, for example:

Where Octarine uses type tags is in validation – given a Schema<T>, you can use it to extract a Valid<T> from a Record. It’s up to the schema to determine which keys are permitted/required, and with what values. Schemas can also be permissive, doing just enough validation to ensure that a record can be used in the expected way, but not objecting to the presence of unfamiliar key-value pairs. This seems to me to be the right way to deal with data at the edges of a system, where code that works with an older version of a protocol should not necessarily fail just because a newer version adds a few extra pieces of information. From the point of view of some code that works with Persons, the presence of some Address fields is neither here nor there.

Among the merits of Rekord’s approach is that it enlists the help of the compiler in making sure that data held in Rekords is coherent: there is a real sense in which a Rekord has a type, even though it is not an instance of that type in the traditional sense. Octarine trades off a bit of safety in the interests of flexibility, but also provides a mechanism for tagging records with types that can be used to verify that they are suitable for particular purposes. There’s no reason why each library could not be extended to support the other’s more/less permissive approach (as Karg does, for example, with its support for both typed and untyped keys).

Weekend gloss: Olaf

The idea here is that having posted a poem on the Monday, I post a short gloss on it at the weekend…

Olaf is a “dream poem”, written a short while after the birth of my son Oliver. I had had a strong sense that this tiny infant belonged to a kind of dream-time, that his birth and early infancy were a process of slow awakening to the world, and that in his newness he was also somehow very ancient. I don’t mean that I imagined him to be the reincarnation of some old, much-transmigrated soul, but that he had not yet fully entered time. Without believing in any sort of species-memory or anima mundi, I felt that this newborn existed in a common ancestral before-time with every other newborn who had ever lived. (A few years later my grandad Ted picked up a red-faced and squalling Ruby, Oliver’s recently-arrived younger sister, and said teasingly, “You think you’re the first, don’t you?”). So Olaf, who appears to be a Norse warrior of some kind, is my dream of Oliver dreaming himself as Olaf, who at the end of the poem appears to be re-entering the dream-time himself as he falls into REM sleep (he may also be dying).

Olaf in his woundedness and exhaustion seems to blur somewhat into his surroundings, his own breathing mirrored by the trees leaning in and out in the wind. Nature is busy around him, with midges and minnows moving in their own patterns. Much later, in Cold World, I made a speculative connection between such human-independent natural processes and the hidden life of the unconscious, recovering from the “ground-zeroing” of consciousness inflicted by dejection. Coleridge’s phrase “the secret ministries of frost” suggested to me that a frozen world could still be in process. You have to trust that something is happening without being manifest, without giving any sign of itself. Olaf’s world is warm – he is “connected to nature”, as one says – but it is also coming apart, weakened at the joints, so that inner and outer life flow into each other. The vision here is ecstatic rather than dysphoric, subjectively overflowing rather than withdrawn, like Hopkins in one of his better moods.

I’m sentimental about the poem, and can’t really tell (and don’t really care) whether it is a good one or not: for me it recalls new-parenthood, as a dazed, sleep-deprived, slightly psychotic state which affords access to a strangely familiar kind of bliss.

Higher-Order FizzBuzz

Clojure (paste into an instarepl to see outputs):

Java 8:

Conclusion: Java 8 is an acceptable functional programming language.

%d bloggers like this: