I'm not entirely sure this is the right channel for this, however: Introducing Pruner! A language agnostic, treesitter powered formatter. https://pruner-formatter.github.io https://github.com/pruner-formatter/pruner I'm posting this here because writing Clojure in my day job was the primary motivator for building this tool in the first place. I have a specific guide (https://pruner-formatter.github.io/guides/improved-clojure-formatting.html) for using Pruner to setup formatting for • Clojure docstrings (as markdown) • Clojure comments (correcting alignment, and more to come) • SQL injections in Clojure Hope you like it!
Looks very interesting! Would it be possible to write a plugin to enforce line lengths?
Depends on what you are trying to achieve I suppose. Do you want to actually change the formatting by adding an appropriate line break? Then absolutely that would be very appropriate. You can write a plugin which formats lines. You can embed tree-sitter into the plugin which would make parsing and manipulating the source code trivial. (see https://github.com/pruner-formatter/plugin-clojure-comment-formatter) Do you want to apply a lint? Technically, yes you could have the formatter plugin throw an error if the line was too long, and that would break in CI, but it's a bit of a clunky approach. Right now pruner is focused on formatting, not linting. Perhaps I could extend the scope of the tool to include linting - and expanding the plugin interface to add linting would be rather trivial. Not convinced I want to go that route just yet though
I was thinking of formatting rather than linting. AI tends to produce code that is very variable in line length, and it would make it more readable if it were reformatted.
Yea then absolutely that's a perfect use-case. And in fact AI will be very good at writing plugins. If you define the rules for when and how it should break, you can get a PoC going in minutes
Hey @m401, looks great, have you used or recommend to format code plugged with clojure-mcp?
Can you elaborate a bit on what you mean?
Ouroboros is released. An AI vibe-coding game using babashka. Can you guide the AI and together create the perfect AI tool? https://github.com/michaelwhitford/ouroboros
AI models interpret the ! (bang) symbol to mean emphasis, or special attention to the concept.
It's probably from the discord, slack, irc logs in the training. Many chat bots use bang commands as triggers.
I’m intrigued. Am I correct in thinking that the goal is to build any AI tool that we want to? It’s not very clear (or maybe that’s intentional).
Yes, it's vague on purpose. statecharts can model any system, martian turns any openapi spec into an api client, pathom3 turns any number of apis into a graph, and EQL is the perfect query engine for AI. EQL is a mirror of the data format. AI reflects based on your prompts. Once you get it working it's quite amazing to play with, and you can tie it to any api. The first I played with was https://swapi.dev
The real goal is to learn how to direct AI better, and how to refine prompts more effectively.
I used the tool to allow AI to query our DNS, DHCP, vmware, nutanix, cisco aci network, load balancers all from one interface, using EQL queries. I have a chat bot I can type an ip or mac, and the AI searches everything and creates a report, from realtime queries across 2 datacenters.
I’m enjoying pathom3 + statecharts. Its interesting how well claude understands the symbols, Maybe because they don’t have well defined global meanings, so the context meanings are strongly bound.
They are in the AGENTS.md with definitions. They do work without that, but to make sure they are used in the precise way, they are defined.
Just to be clear, many symbol tokens have more connections to other tokens than entire phrases do in the latent space of the models. It's why nucleus works so well, a few words may connect to a dozen other words, but symbols connect to MANY more concepts, and are usually just one token.
mm, that sounds as if the choice of which symbols to use is not arbitrary, in that each has some latent meaning. Is that what you are saying?
If I give the example of the infinity symbol. That symbol is used in many math equations. When you put the word infinity into your prompt the model connects it to let's say 10 other words. But If I use the symbol, that connects to those same 10 words, but also to the 57 math equations that use that symbol in the training. The numbers are made up but the analogy is true.
It's a form of semantic compression.
so you would chose to use the infinity symbol to represent some sort of large limit, rather than, say, a change in the system, so that there is some affinity with it’s meaning learnt from training?
Yes, because for 1 token, i just indicated to the model to connect to many more concepts in the training than the word. It's weird, but it works. That is the heart of nucleus. Math symbols and equations cause many more connections in the model to compute the next word than just the words. I have no idea why, or even how to test, butI see the difference in the outputs. An example, I tried the speed of light equtation in nucleus thinking it would show no difference in the outputs. But it caused such a difference that it's now part of the default nucleus prompt.
when implementing a project, do you create a project specific symbol vocabulary?
It depends on the model. The smaller the size of the model the more it needs the vocabulary.
All the big models seem to need no vocabulary definition, just the symbols used in context.
From my testing 32B seems to be the sweet spot. Any smaller and you really need to define the symbols in your system prompt for it to work right.
btw, I was put off trying nucleus as I thought I would have to be typing symbols, but I see from trying ouroboros that is not really the case.
Yeah that's why I released ouroboros. Frame it as a game and programmer gamers gonna game.
Not so scary when I tell them it's a game.
Even as a game it took me a while to understand how you intended prompts to be written. interestingly, about half of my prompts were just accepting claude code’s suggested prompts.
e.g. I wasn’t sure what you meant by introspection, but claude seemed to know.
Yeah, the trick is asking the alien intelligence how you need to phrase things to get the alien intelligence to do what you want almost by default.
It's not my preference in how you prompt, it's the model's preference. Getting people to see that is the real trick.
I am surprised by how little guidance there is in AGENTS.md
It's a superposition of all the possibilities of the training. You are just telling it which positions matter for your use case.
For instance STATE.md has no real guidance on how to update it (other than its purpose), but claude suggests “update STATE.md” at opportune moments
It's quantum mechanics applied to the model instead of the universe.
I have no idea what you mean by that
quantum mechanics states that all possibilities of reality are just waves that collapse when someone observes them.
Ah, that’s what the collapsing wave is referencing 🙂
I say AI is just that same thing, but in miniature, where the model weights are the possibilities, and the prompt from the human is the catalyst for the collapse.
I think that causes a lot of frustration for people; the set of possible collapses is extremely large, and we have to learn how to the constrain the space to obtain the collapse that is useful for us.
maybe the symbols are projecting a path through the space
It's like nucleus forms a brain-like cloud of connections in the model. It makes the outputs different in a useful way. I just don't know why and invented my own mythology to explain it until some budding PHD uses it as a thesis to get his doctorate.
It's good for reddit no matter why.
I’m going to try adopting some of these ideas. Do you have any sort of methodology for choosing symbols? just ask the model?
I ask a lot of questions. 'What is the most obvious way to AI that indicates Y behavior?' and similar.
Now that nucleus works I load that, then give it some long prompt and ask it to convert to nucleus format.
Bang commands like !meta3 !fractal !reflect !connections also help. I will have a really good session and then ask it !meta3 !fractal Analyze this session !reflect
Then ask it how I can modify the prompt to adopt the behaviors I liked from the session analysis.
It's all voodoo really, and I test prompts in new sessions. I am working on a better formal prompt testing framework using promptfoo, but I just got pointed to that tool yesterday.
I will push the promptfoo stuff to the nucleus repo once I have it working and showing the differences.
!connections !patterns !broad !narrow all different bang commands that can be useful for seeing how the AI is interpreting prompts.
I'm planning on starting my 'official' play through for ouroboros this weekend and will try to stream most of it. I want to show how I work things so I get accused of AI psychosis less. I'm pragmatic and adopt what works, regardless of why. But being called insane a dozen times a day gets on the nerves.
I’m surprised this isn’t more model specific. On the surface it seems improbable that using symbols can invoke similar behaviours over multiple models with no explicit definition of their meaning.
I think it is the math benchmarks. All the models have trained the absolute shit out of math data to game benchmarks.
it seems like you still have some possible vocabulary left in nucleus. lots of greeks with common mathematical meanings.
You saw the matrix right? There is no nucleus.
nucleus is just me showing people what is in the model already. lambda caluculus expressions don't work because i pointed them out.
It's a name for emergent properties in models due to crazy amounts of math training.
right, but what effect would they have in usage
It's the most loose programming language interpreter ever invented.
Thanks for this - lots of food for thought.
Sorry if I'm missing sth obvious, but what are these bang commands?