Background: The issue came up because as a couple of months go by and new Large Language Models are released with larger amounts of tokens being trained into models, the question of how much J knowledge is already baked into these newer models? How much bleed in is present in the base model from other languages that are more traditional in their processing of expressions (python, C/C++, Java, etc)? The models are usually able to produce J code but it tends to look like a directly transcribed python or C program without taking advantage of common J idioms. In the future as we approach General Artificial Intelligence we would expect that a model like a human can apply J knowledge with less bleed in from the way other programming languages work. In the mean time if you like programming in J how do you make the most out of what is currently available in the vibe coding arena?
Current state of programming with LLMs: agentic programming: Without going through ancient history (less than a year ago) in how agentic programming came about, this is the main method people use AI to code programming projects. There are many agentic platforms available (Claude Code, OpenCode, PI, Grok Build CLI, etc). Essentially these are the new IDE, so to speak, of programming. Agentic platforms are able to round trip a question to an LLM, obtain code, place it in your project file system, run the code report back any errors, obtain corrections to those errors, and present you with a working set of code.
Benefits to the J programmer: First if you are working on a J programming language project the agentic platforms can take care of deploying project directory to GitHub and provide you with source control. It can take care of all of the little headaches that aren't part of J programing itself. You can concentrate on the meat and potatoes and the agentic platform can take care of things like logging, putting things in try/catch blocks, catching edge cases, even commenting/documentation. In a very basic form agentic programming is like having a templating system where you can concentrate on the fine points of your task in J.
Keeping J relevant: This was on many people's minds during meetings. If these models are just better at Python/C etc and almost anything can be done in those languages what does that mean for J? I won't go deeply into this other than to say J is relevant to me. If AI is going to be useful to me it will let me do things the way I enjoy having them done. J is terse in its expressions, it takes me less time to review J code than almost any other language. When I see a more elegant way of doing something in J I get a feeling of satisfaction that I don't get from any other programming language. I do believe by getting agentic platforms to produce reasonable J code that J will move along much as it has in the past. People looking for new ways of doing things will happen upon it and either get hooked or cast it aside much of how things have happened with array languages since the 60s.
My conclusion: Come up with a best practice for setting up an agentic programming platform for J that is both cost effective and competent at producing J code. In essence the more people that are able to dump their J coding projects to GitHub because it's just a side effect of how they use an agentic platform the more chance you have of someone finding something useful in J. The more J code on GitHub the more J knowledge there will be for the next generation LLMs. Digital evolution will take care of the rest.
Current Best Practice: From our meetings and from my own experience Claude Code is probably the best platform to run for agentic coding. It's the one probably everyone has tried when coding in J. So there is a human knowledge base in the J programming world. It's very popular in general. From the experience of others they are able to get useful J programming done with the anthropic $20/month subscription. For a limited time (now until July 19th) Anthropic still allows the $20 subscriber to access Fable. This is by all accounts the best model out there so if you are new to agentic programming you will get the cutting edge experience of using an agentic platform for J programming. Once you have a subscription and download claude code. You run Claude Code, it will ask you to sign into your subscription. You then can just tell Claude Code to set itself up to do a J programming language project. For security purposes I would set up a separate user account on your machine dedicated to Claude Code. Do not give that account administrator privileges. This should protect you from Claude Code going haywire and deleting stuff you don't want deleted.
Improving J knowledge on the agentic platform: This comes down to context injection. With the current frontier models having 1M tokens of context a good amount of J knowledge can be provided as the basis of its current working memory. Speaking in terms of Claude Code there are a number of ways to provide this.
1) the initial prompt can include a summary of the J programming language, that it is an array language from JSoftware.com, it was developed by Kenneth Iverson the creator of APL as the next generation array language to APL. It is different from traditional programming languages in that it has no operator precedence other than the typical use of parenthesis and the expressions are parsed from right to left. If you are in doubt as to how an expression will be parsed use parenthesis to enforce which parts of an expression should be done first.
2) Claude.md and Agent.md files. For these I usually have Claude Code read through a corpus of files that come with installation of the J programming language that I converted to markdown format. These include Jphrases, the JPrimer, Nuvoc pages. I tell Claude Code to distill these down and set up the Claude.md and any agent files with the information from these that will facilitate J programming. You can hand edit these files and add information if you feel the LLM didn't provide detailed enough information. These files are essentially the agentic platform memory and provide some persistence of knowledge through out a project session.
3) My MCP servers, Previously I sent a message about the MCP servers I have up and running that have indexed the JSoftware.com website source and the old J Forums. The website source is package as files and they have been indexed with Xapian. Documents like JForC are there and because chapters are split off into files the indexing is able to drill down to a much smaller part of the document that can be retrieved and presented to the LLM to read and understand. The Forum emails are indexed by thread so that an entire thread can be presented to be read and the LLM can decide what pertinent information is available in the thread to use. In just some simple use I have found that even lesser models can find some good J code by using these servers.
4) j-mcp this gives direct access to the J interpreter without having to use BASH and the J console. While not context injection I believe from what I have seen so far in my experience that constant calling of jconsole starts to make the LLM believe it is doing a Java project. While BASH shell access is pretty fast the j-mcp should actually speed up the turn around of J code interpretation.
5) Claude Code already has the ability to search the web so if it can't find the information from these dedicated sources it can do a more general web search. I haven't experimented with it but I would guess there would be a way to prioritize where it searches so you target J code repositories on GitHub and other array oriented websites before it broadens the search to more general areas about the project at hand.
What you should expect: By setting all this up you will get a usable J project in a matter of minutes. Yes you will need to manually code review at this point. But as you do more projects and find common misunderstandings you should be able to setup a code review agent and get the simple stuff taken care of before you need to do your final human code review. Now you are dealing with the details you care about. Getting the pertinent functionality into acceptable J code with good use of J coding idioms.
Tom