Working on PHLAME, the Glamin replacement.
You'll get a kick out of this one.
What I'm doing is training a small neural network to behave like a compiler. It takes code and turns it into a framework an agent can use to execute operations natively, using frozen weights and learned representations.
Watching Glamin work was fascinating. The agent treated this functionality like a reflex.
Problem was, Glamin used mutable vectors which made debugging after the fact impossible.
Architecturally, this was a dead end.
PHLAME is my second attempt at an AI-native language, incorporating the lessons of the last project.
I’m still doing feasibility testing, working through the mechanics with a basic parser and neural networks doing the heavy lifting.
A language that is bad at math
First samples are compiling. This is where I made a big discovery.
It thinks 2 + 2 = 6.
But then it keeps walking, gets to 8, and realizes something has gone wrong.
Yes my friend, I've invented the first programming language that's bad at math.
Does that count for anything?
I bet it doesn't.
Turns out, the system isn’t bad, it just needed an architectural decision.
So I'm going to build an asynchronous request mechanism directly into the learned execution architecture. The system doesn't need to do math, or other key pieces of deterministic functionality, so much as it needs to know WHEN to call for them.
Representations and behavior
Now, onto some compiler theory!
Some of the architectural ideas here came from my work on Ruby Tumbler, an experimental Ruby-to-native compiler I’ve been writing. There, I’m exploring ways to translate between different intermediate representations without breaking anything.
As long as I can preserve and verify the relevant behavior on both sides, the representations themselves can look completely different.
Which opens up some interesting possibilities. Fun fun!
Put fluidity on the right layer
Another mistake I made with Glamin was trying to invent a totally new language. And not just any language, but something so alien, you would have to be either an LLM or a PhD to understand what’s going on.
This is a problem because vectors don’t think in terms of logic trees the way programmers do. Instead, they think in terms of distance.
Doing it that way does have its perks. Cyclomatic complexity drops to zero, but then you’ve got the learning curve.
That’s why, this time, I wanted to do it differently. Since we’ve learned the lesson about intermediate representations, it’s now possible to create something that a human can reason through and find cozy, while still taking advantage of the agent’s priors, and giving the system something it can use.
The source code can have conventional syntax, functions, classes, and control flow.
The backend can use learned associations and vector distances to select behaviors, with deterministic machinery providing operations and guardrails.
Two very different worlds, connected by a single system.
Probably.
I'm still working on it.