Ask HN: What would an ideal programming language for the use by AI look like?
1•Koshkin•50m ago
People train, and force the ai to program, in languages that are designed for humans; what could a better if not ideal programming language for the AI to use look like? How would the AI get trained on such a language in the absence of an extensive pre-existing code?
Comments
PaulHoule•23m ago
It was a subject I thought about 10 years or so back when I was thinking about systems that were basically rule-based. Back in the day my idea was that the language should eliminate many kinds of accidental complexity and should share many attributes of "low-code" systems, a particularly exotic idea I had at the time is that it is a serious weakness of mainstream programming languages that they express computations as a tree which is serial in nature and could do a bit better if they experienced computations as a graph which for one thing makes parallelism more explicit (we were working on data crunching not because we thought analytics was the prize [1] but because we needed crunched data to make the system work -- and what we found was that ordinary sprawling commercial batch jobs would wind up with early stages that either computed the same thing or shared a lot of work and could be consolidated... the computation graph let us do that optimization and take advantage of parallelism at multiple levels) Graph-based programming environments like make and Spring also free developers from having to worry about what order things have to be done in which can get really cumbersome and structurally unstable for certain systems as they get big.
I'd argue that (1) LLM systems are already trained on human language and computer language and are pretty good at the programming languages we already have and (2) the question ought to be extended to "what sorts of frameworks and libraries are easy for AI to work with?", I mean, "does an AI do better writing React or Svelte or something else?" (3) since so many programming languages and frameworks exist we can already experimentally treat "what features help AI coding" even if there is some conflation with "quality of the training data", (4) the latter might matter less than you think because, at least with human languages, LLMs seem great at transferring knowlege between languages, I mean I ask an LLM something like
"What the hell is 无期迷途?"
and it will come back with an answer in Chinese and I'll say "I need that in English" and I get it.
Training data for a new language is not a hard problem anyway, you just have to make it! Like you could use an early draft LLM to convert large numbers of examples from other programming languages into the target language and then do some quality control on the translations like making sure tests run and stuff.
And of course the elephant in the room is what is the purpose of the system? Back in my time in the wilderness I had a lot of interest in the analytics problem because I needed it to build my database and I was mixed up in a community of analytics users and vendors but I was also interested in the "low code/no code" market for GUI applications. The requirements for these are different but the ideal solution might be "something that can access a SQL database and make a GUI for it" that lives between the worlds.
[1] ... looking back if I had to explain what the thing I was working on was it was "Something like Palantir but it runs your whole business and has 50x the TAM"
PaulHoule•23m ago
I'd argue that (1) LLM systems are already trained on human language and computer language and are pretty good at the programming languages we already have and (2) the question ought to be extended to "what sorts of frameworks and libraries are easy for AI to work with?", I mean, "does an AI do better writing React or Svelte or something else?" (3) since so many programming languages and frameworks exist we can already experimentally treat "what features help AI coding" even if there is some conflation with "quality of the training data", (4) the latter might matter less than you think because, at least with human languages, LLMs seem great at transferring knowlege between languages, I mean I ask an LLM something like
and it will come back with an answer in Chinese and I'll say "I need that in English" and I get it.Training data for a new language is not a hard problem anyway, you just have to make it! Like you could use an early draft LLM to convert large numbers of examples from other programming languages into the target language and then do some quality control on the translations like making sure tests run and stuff.
And of course the elephant in the room is what is the purpose of the system? Back in my time in the wilderness I had a lot of interest in the analytics problem because I needed it to build my database and I was mixed up in a community of analytics users and vendors but I was also interested in the "low code/no code" market for GUI applications. The requirements for these are different but the ideal solution might be "something that can access a SQL database and make a GUI for it" that lives between the worlds.
[1] ... looking back if I had to explain what the thing I was working on was it was "Something like Palantir but it runs your whole business and has 50x the TAM"