Abstract Nonsense

A place for musings, observations, design notes, code snippets - my thought gists.

A Character Study in Alliteration

I came across a short alliterative poem about Rorschach I wrote a good while back after reading The Watchmen:

Manic milieu meets maimed mien,
moralising meandering misanthropic menace,
metes most morbid measures masked,
macabre murmurs marry much moribund musings,
massacring measly men mirthlessly

I don’t know why I decided to pick ’m’ here for the alliteration, but I often enjoy writing such whimsical snippets. I’m not sure what you’d call this, but I suppose ’extreme alliteration’ or reverse lipogram would suffice. I quite like the whole field of constrained writing, it’s quite fun thinking about how to slot words into constraints just-so. Apparently there was (is?) a group of French mathematicians and writers who similarly delighted in such pursuits… the Oulipo (Ouvroir de littérature potentielle).

Amazingly, I asked ChatGPT who it thought the poem was about, with no other context provided, and it nailed it (link to chat).

Code minimisation for ethical learning from LLMs

Like many people nowadays, I find LLMs an invaluable tool for learning new concepts or vibecoding in unfamiliar stacks and langauages. It’s undeniably a massive accelerator when it comes to quickly iterating and learning.

But it has its downsides. There’s a strong argument to be said that by offloading the challenge of learning something new, your core critical thinking atrophies and your ability to focus slides down the slippery slope of instant gratification.

However, there really are only so many hours in a day, and there are far too many days of learning to fit in. So a Faustian bargain I have done…

A useful exercise I employ is “how far can I cut this code down before it stops working”? LLMs seem to love overdoing things, even when instructed against it. I find the code produced by LLMs to be full of single-use functions, over-zealous try-except clauses, and overdone encapsulation. (Of course, the same could be said of any idiomatic Java programmer).

Of course, concision is not the sole determiner of ‘good code’, whatever that may be. But I think there is something to be said that parsimony is an ideal to strive for.1 Everything in computer science is just a long walk up a Ladder of Abstraction, after all.

In any case, I find that the sheer act of this “code minimisation” helps distill how the code works the way it does and I find myself learning huge amounts along the way.


  1. This may also be a case of Stockholm Syndrome: my statistical modelling professor was particularly zealous about parsimonious linear models… ↩︎

Haptics at 300kph

Apple released a new “Haptic Trailer” for their new F1 movie - you can check it out in the Apple TV app. It’s a pretty neat experience, I’d never thought about adding haptics to a playback experience, but it really does add another dimension of immersion.

I was curious on how it was implemented, and stumbled across a great blog post that really shook it out for me… I’m sure it’d get horrifically overused, but it’d be interesting to see whether this gets adopted into more media streams in the future.

Building animations in Manim with LLMs

Manim is a Python animation engine designed to build animated mathematical explainer videos (examples here) created by Grant Sanderson of the superb YouTube channel 3Blue1Brown.

A couple years ago I wanted to write my own mathematics explainer videos with Manim, but found the learning curve to be pretty steep at the outset.

The user experience has since improved dramatically - in large part because of the Manim Community Edition, but also because there’s now enough samples in recent LLM training runs that they can produce workable Manim code!

I stumbled across a neat website (GitHub) that allows you to prompt either a SOTA LLM or a fine-tuned GPT-3.5 model and have Manim code generated and rendered in-browser. The quality is passable at best (and I’ve observed better results prompting whatever default model ChatGPT is serving up as of writing), but the barrier to entry just dropped remarkably. I can jump right in with a MVP and start tweaking!

Also shoutout to a cool project I stumbled along on the way: ManimWeb, a Dart-backed engine to build interactive maths animations for the web. Development seems to have died a few years ago, but the Fourier Transform example is neat to play around with.

An aside on retro gaming on Mac

I’m not much of a gamer. In fact, I don’t think I’ve played any games in the past decade.

But I do have very fond memories of playing a couple games on an old translucent iMac G3 in the school computer room in primary.

On some late night Wikipedia rabbit hole I ended up on the page for Antz and was reminded of the old-school-cool games I’d played: Bugdom and Nanosaur.

It turns out, they’re been immortalised and ported to run on macOS with Apple Silicon. You can download them (for free): Nanosaur and Bugdom2. They run like a charm and with beautiful graphics scaling to boot!

Meditations by Marcus Aurelius

I picked up a beautiful copy of Meditations by Marcus Aurelius in a cute bookstore in Korea (Chiltern Publishing, translated by A.S.L Farquharson).

I purchased it mostly on a whim - it’d been a while since I’d read any true classics, and the bind was truly delightful (it’s this beautifully embossed, textured cover with a gilt silver coating across the paper edges).

The book overall? It’s filled with Stoic aphorisms and pithy existential ruminations. How ‘meditative’ that is to modern sensibilities is up to the individual. Though you do get the occasional good nugget of advice like:

The mountain mouse and the town mouse, and the fright and scurry of the latter.1

Though it must be said that it truly is surreal to read a piece of text immortalised in the canon of literature. In that vein, it was fascinating to see lacunae (“[corrupted text missing]”) mid-sentence. I always wonder what happened to that particular excerpt and how and why it became lost to the sands of time.

Well, I guess one epithet is indeed true enough - don’t judge a book by its cover.

There are some selected quotes that touch on themes of honesty, existentialism and metaphysics that I liked the gist of:

  • Continually and, if possible, on the occasion of every imagination, test it by natural science, by psychology, by logic.
  • Speak both in the senate and to every man of whatever rank with propriety, without affectation. Use words that ring true.
  • The Universal Nature felt an impulse to create a world; and now either everything that comes into being arises by way of necessary consequence, or even the sovereign ends to which the ruling principle of the world directs its own impulse are devoid of reason. To remind yourself of this will make you clamer in the face of many accidents.
  • The sun appears to be poured down and indeed is poured in every direction but not poured out. For this pouring is extension, and so its beams are called rays from their being extended. Now you may see what kind of thing a ray is by observing the sun’s light streaming through a chink into a darkened room. For it is stretched in a straight line, and rests so to speak upon any solid body that meets it and cuts off the flow of air beyond. It rests there and does not glide off or fall. The pouring and diffusion of the understanding then should be similar, in no way a pouring out, but an extension, and it should not rest forcibly or violently on obstacles that meet it nor yet fall down, but stand still and illuminate the object that receives it; for that which does not reflect it will rob itself of the light.

  1. Which I have since learned is an allusion to one of Aesop’s Fables ↩︎