Representing rationals with Integer Constraints

This is a quick and dirty post attempting rational (fraction) math with Prolog's integer constraint library. CLPFD works well for integer math, but it is not built to handle decimal values. This limits where you can use CLPFD, if a domain has even a single non-integer value, you'll have to …

more ...

Adding an Easter Egg to our Numeronym Predicate

In yesterday's post we wrote a Prolog predicate for 'bookend numeronyms'. Ian Brown wrote an Emacs extension with a similar goal, but in that extension he included an Easter Egg in the examples:

Some examples of (numerical contraction) numeronyms:

  • i18n --- internationalization
  • a11y --- accessibility
  • c14n --- canonicalization
  • o11y --- observability
  • e14n --- Andreesen Horowitz …
more ...

Logical Numeronyms

Have you ever wondered about kay eights? What it is? Where it comes from? and why does it keep showing up everywhere?

Numeronyms are abbreviations that involve (you guessed it) numerals. They come in many forms, but in one common subcategory …

more ...

Minimal Shared Logic

I've been thinking about a non-existent language for evaluating expressions on multiple data resources. It's key properties are:

  • Limited capability
  • Easily interpreted
  • Global references to cross-application data models
  • Logic owned by the backend

The fastest way to grok what I'm proposing is through a code snippet. Imagine this JSON object …

more ...

A simple Clojure macro using &env

I am slowly building up the ability to work with Clojure macros. This was my main motivation for learning the language, since I want to learn a new way of thinking.

Here's a simple macro I wrote as I was learning. It doesn't do much. It uses the built-in &env …

more ...


Implementing an Iseq-conforming linked list in Clojure

I write this article as I bumble around trying to wrap my head around Clojure. This article serves mostly to document my journey to accomplish the simple task of implementing a linked list. On the face, this is relatively simple:

(defrecord RListNode [value next])

(defn r-first [ln] (:value ln))
(defn …
more ...

Complexity

Complexity is a hot-topic and catchy phrase. Everyone agrees "Complexity is bad" and "simplicity is good", but the terms continue to be muddled in mixed meaning and over-use. This page serves as a series of notes on the terms. I don't agree with all the theories here, I'm just penning …

more ...

Thoughts on Spec-ulation (Rich Hickey)

In Rich Hickey's 2016 talk Speculation he argues that too often library authors break backwards compatibility. Instead library authors should aim to maintain backwards compatibility potentially indefinitely.

Much of the talk is spent creating a framework for understanding backwards compatibility when it comes to software (and specifically Clojure). This is …

more ...

Getting started with Reactor

Reactive programming offers a powerful paradigm for handling asynchronous and event-driven code. When working with reactive frameworks, it's important to understand the distinction between two key timelines: the Construction Timeline and the Subscription Timeline. In this article, we'll explore these timelines, their significance, and the potential bugs that can occur …

more ...