DEV Community

Hidden Developer
Hidden Developer

Posted on

The Grimoire and Latent Space

For over forty years I have been fascinated by programming, and the fascination has always been rooted in the same thing: the experience of creating something apparently out of nothing, using nothing but my own thoughts.

There is no raw material. No canvas, no clay, no timber. There is only the space between what I intend and what I can express, and the slow, iterative work of closing that gap. I begin with an idea — an imagining, sometimes sharp, sometimes barely a shape — and I start capturing it in code. Each statement is an attempt to say what I mean. Each execution reveals where I didn't quite say it. A small adjustment here, a rethink there. The thing I am building talks back to me through its failures, and through that conversation, it takes form.

I have always thought of this process as something like discovering a grimoire. Not writing one — discovering one. Each line of code is an incantation that I did not fully understand until I spoke it and saw what it summoned. The completed program is a spell that, once all its clauses are right, produces the solution as if by conjuring. The magic was never in any single line. It was in the accumulation, the patient layering of intent upon intent until the whole thing coheres and something real emerges from something that was, moments before, entirely imaginary.

This is what has kept me coming back. Not the solutions themselves — those are fleetingly satisfying. What keeps me is the act of creation. The journey.


The arrival of AI capable of writing code raises a practical question: can I hand over the cognitive load of creation? Not the typing but the imagining. The imagining-into-existence.

Considering it that way, a question arises.

Where do those ideas live before I reach for them?

When I sit down to solve a problem, the solution does not arrive fully formed. It emerges. I reach for something — a pattern, an approach, a structural intuition — and it is there, available to be grasped. But where was it before I reached? Is it purely the product of my own mind, the accumulated residue of everything I have learned and experienced? My conscious knowledge and my subconscious experience, firing together to produce candidates that I then select from?

I think the answer is yes, but the yes is more interesting than it first appears. Because what I am describing is not retrieval. It is not like opening a filing cabinet. It is more like reaching into a space of possibilities — a vast, high-dimensional space shaped by every problem I have ever encountered, every solution I have ever seen, every conversation, every failure, every late-night debugging session — and plucking from it a candidate that feels right. The conscious mind does the plucking. But the space itself is built from both conscious and subconscious experience, and it contains far more possibilities than I could ever enumerate.


In the world of AI, we talk about latent space. This is the internal, high-dimensional representation that a neural network builds from its training data — a vast landscape of encoded relationships, patterns, and possibilities that the model navigates when generating a response. The model does not retrieve answers from a database. It moves through latent space, and what it produces is shaped by the topology of that space.

If latent space is the product of an AI's training, is my own accumulated experience not my own latent space?

I believe the answer is yes.


Recently I came across the concept of nāma-rūpa.

Nāma-Rūpa is a Buddhist philosophy, the name is a compound from Pali and Sanskrit: nāma means name, rūpa means form. Having lived in Malaysia, I recognised the words — nama and rupa — and that recognition attracted me.

The philosophy is very deep but what resonated with me were the ideas that to name something is to participate in giving it form and to perceive form is already to have named it. The first direction is intuitive — a programmer names a function and, by naming it, begins to define what it does. The second direction is subtler: when I look at a sprawling piece of code and suddenly see "this is a state machine," the recognition is itself a naming act. The form was there, latent. Naming it made it available for thought.

This viewpoint enabled me to express everything I have written so far in a single sentence.

By naming something, I give it form and pull it from latent space

When I name a function, I help give it form. When I name a variable, I help give it form. When I name an architectural pattern — "this is a pub-sub system," "this is a state machine" — I am reaching into the latent space of my experience and selecting a form by the act of naming it. The name is the handle. The latent space is the source. The form is what appears.

It is, at least to me, a useful description of what happens when a programmer creates. The latent space is real — it is the structured, high-dimensional encoding of everything you know and have experienced, most of which you could never articulate directly. Naming is the mechanism by which you reach into that space and collapse a cloud of possibilities into a specific form.


And this single formulation, By naming something, I give it form and pull it from latent space, allows me to approach my objective of passing the cognitive load of creation to AI.

I need to create the environment where the AI can name things from its own latent space and, by naming them, give them form. That environment is the subject of the next planned essay.

Top comments (0)