I use GPS daily, and I wonder if anyone has set it up to use AI-tools with it (and if it is possible at all)
Or should I migrate to VS Code and the plugins available there?
The video mentions Ruu, but as someone mentioned in the forum, it already has its successor.
I’d like to get AI to write some skeleton code for say a new communication protocol.
For me, they are often described, in a word doc or a pdf doc. it is usually a doc stating how the envelope looks like (unique ID, msg-type) and a number of messages that the envelope can contain. eg
Order_Assignment (move this id from pos A to pos B)
Order_Report(This id arrived at B now)
Status report for positions (this position is now occupied/free)
…
It is usually some kind of TCP/IP proprietary protocol I get from some vendor. It would be nice to feed it a pdf - that is usually not fully covering everything - and get some code from it. Then there is different styles of making it. In ada83 the use of variant records was common, today it is tagged types. There is also different views on using one or two sockets.
Another thing to do would be pointing an AI to the existing code base and ask it for improvements, and perhaps sparkify what can be written in spark. This is code that is usually heavily dependent on data in databases. it is not embedded.
But how do I even start? The field of AI and new engines moves so fast so its overwhelming.
One big pain is that LLMs aren’t really well-suited for many files, at least WRT online UIs. — This means that GNAT’s limitation (Note: it is not Ada’s limitation) for having one compilation unit per file gets really messy/onerous really quickly.
To help you out, here’s a little batch-file that generates a concatenation of all your ads and adb files recursively within the subdirectory:
@echo off
:: Testing
rem === CONFIGURATION ===
set "OUTPUT_FILE=Project"
rem type "%%F"
for /r %%F in (*.ad?) do (
echo Processing: %%F
(
echo -- File: %%~nxF
echo.
type "%%F"
echo.
echo.
) >> "%OUTPUT_FILE%.ada.txt"
)
You can then feed in your entire codebase as a textfile.
That seems strange to me. I never had problems that an AI did not understand the code base due to the amount of files (using Mistral Vibe Pro or Copilot).
As to the original question: as a long time Emacs user I have not yet found a good integration. So I still use the AI in a separate window. Emacs reloads a file as soon as the AI makes any changes to it. That works quite well. I can also easily point the AI to exernal docs containing requirements or specs. You practically always have to correct the generated output anyway. (BTW, Copilot is a very appropriate name in my opinion. We as programmers still sit on the pilot’s seat.)
The only place that I will use LLMS is in a web browser and for good reason. I also haven’t found them all that useful except for simple scripts. After singing it’s virtues I have since found even NoteBookLM now renamed Gemini something “grounded” in a manual will still pull some complete nonsense from the internet even for simple and obvious fully specified matters. Even making up extra arguments for OpenBSD pf.conf syntax when “grounded” in just the pf.conf manual. I will watch this video at some point though. I’m sure AdaCore will have made or be making it as good as it can be.
The trend right now is using a separate CLI tool like Claude Code. There’s also one for Google (Antigravity) and Grok (Grok Build) or you can use free tooling like pi.dev. The idea is you tell it what to do in “plan” mode and then it does it. You can use this to edit code, but I use this a bit where the output isn’t a code change, but instead to explain something about the code or look for bugs. People are now using “loops” in which AI executes until some end point, sometimes for hours.
From what I’ve seen, using a VS code extension or fork which is aware of where you’re editing and can provide direct assistant seems to be losing momentum. I found Gemini’s (precursor to Antigravity) very useful when debugging SPARK proofs, but this extension has been discontinued. Inline code editing is super helpful when you’re just trying to remember how to do something or add some boilerplate.
There are different ways of using AI. I’ve talked to people who review code, some who don’t review it at all, some who use it like google, and other ways. I recently wrote an article about the philosophical difference between using AI to do the actual work versus assisting you, which you might find helpful: Software and AI - Plotting vs. Pantsing
I just copy code snippets to Grok and ask for help. Grok looks at the problem and makes a suggestion, which I then paste back. That works quite well and is completely independent of the IDE.
I also have Visual Studio Code with Copilot, and it doesn’t work nearly as well. Copilot constantly tries to suggest code, guessing what I want. Those guesses fail about half the time and interfere with normal code completion. The real problem is that Copilot is only guessing (for example, what a type is named), while the actual code completion already knows. On top of that, having it constantly look at the code burns through the free tokens very quickly.
Copy/paste into Grok works much better because you’re not just giving it a snippet — you’re also telling it what transformation you want. Things like “Can you help me write the body for this spec?” or, very usefully, “Here’s a spec — write a GNATdoc for it.” My code documentation is much better now. The same approach works for SPARK too: “Can you help me write contracts for this procedure?”
My suggestion for how to set up AI in your IDE: don’t.
You misread what I’m saying then; I’m saying the LLMs I’ve used have terrible UI (and organizational) usability which, in turn, makes interacting with them onerous.
Same. Though I do think some of the issues your talking about would be resolved with a locally-hosted LLM (eg the manuals).
This is a good thing to keep in mind.
Sometimes it gets a bit ‘blurry’ on the assist vs do the work; for example I have an unfinished implementation/port of an API — enough that it has structure enough that a huge chunk is repetitive — would handing it to an LLM and saying “fill in the rest” be the one, or the other?
Possibly but then my gaming laptop fans would be blaring and I would be short of RAM. Semantic search would be useful without generation and recoll has been experimenting with it.
Most analysis of LLMs for code generation seem to suggest an overall negative impact and reports of engineer reductions are often covers for other business issues or have gone terribly wrong. The latest Monday dot com job reduction reports have more to do with currency exchange costs/changes than AI apparently.
Create a space that you can control that only has what you need. Use a docker container, a VM, a separate machine. DevContainers in VS Code are very useful for this
Add just the auth that you need for .ssh/GitLab/GitHub and ideally scope the tokens to have just the access that you need
In my case, my CLI has access to GitLab and it can create issues, PRs, comment on them, push, pull, commit. Much easier to tell the CLI ‘take the current changes, put them on a new branch and create a MR to main, merge when the pipeline is green’ then to manually go through and babysit those steps. YMMV
Use your favourite LLM in CLI mode, I have been mainly using Claude, but I have used Codex as well. I use --dangerously-skip-permissions, which is why I run this in a separate space
Open VS Code and connect to said space (Docker, or Remote-SSH, usually the latter for me), this helps you visualize what the CLI is changing)
Use GitHub/GitLab PR/MR to see what the agent is modifying
Expert points: Run multiple CLIs, give them a different personality, one to develop, one to critique like a reviewer, one to manage test-cases. This helps prevent context pollution
The frontier models are fairly good at creating Ada, though they sometimes fall back to non-idiomatic Ada constructs. The review process helps for that. The open models are trailing a bit.
I was exploring where the understanding of the problem and solution exist. This is based on my experience of “what the code is claimed to do” often differing from “what the code actually does”. That’s also assuming that anyone remembers what it was supposed to do.
If AI is converting understanding autonomously into code, then it’s “doing the work” since the conversion of that understanding will be lossy. The understanding will now be in the code. I consider everything else “assistance” because you’ve established and are maintaining the mental model.
AI is a tool and whether it is used well or to its fullest potential is up to you.
Telling it exactly what you want, what it can or cannot do as well as providing the right amount of context to the LLM is very helpful. I believe there are also specific AI skills on using tools like gnatprove.
I personally use opencode’s free models (deepseek v4 flash free) and with proper guardrails AI assisted dev has been going well.