Design a programming language for LLMs to learn?

3 points by ftxbro ↗ HN
How would programming languages be different, if they were designed for LLMs to use instead of for humans? What tradeoffs could be made?

8 comments

[ 3.6 ms ] story [ 34.7 ms ] thread
AFAIK all programs "generated" by LLMs are curated from existing programs. If we were to create a new programming language for use by LLMs we would also need to create a large body of correct code for the LLMs to learn from. For that reason, I think that existing languages with a large corpus of algorithms would continue to be more useful.
yes it's obvious that the LLM will do better with existing languages that have large corpuses than with hypothetical languages that don't exist
There's no reason to make a new programming language for LLMs. In fact, we might see a decline in new programming languages, period, since we can have the LLM output any language we want.

At the end of the day, all code is compiled and only machine language that's burned into the chip is actually run. All the other languages, operating systems, etc, are just abstractions over that assembler/machine language code.

Which is how we got to LLM programming in the first place. So the ideal situation is to train LLMs on a large body of all the languages we like and use (which is what the AI companies have done). Then we can ask in human language for output in whatever programming language we want.

Fun fact, we could even ask for output in assembler if we trained on that. But we probably don't want that because it would be hard for humans to read and debug later. So, any programming language is really for humans and needs to be written as much for debugging (or expanding) as for its original intended purpose.

I feel like the design of programming languages has involved some tradeoffs that have been informed by biological human psychology. I'm wondering if different tradeoffs would be more beneficial to AIs that are based on LLMs. Obviously you can write anything in any Turing complete language, I hope my point wasn't so dumb that this is a reasonable response to it.
I would again say, no. The only code that runs is compiled. Any interim human-oriented language is a fiction sustained only until the app is compiled. So optimizing that interim step for an LLM is a mistake. The intermediary language is for humans -- for us to debug, understand, and extend. LLMs will write the human languages that we need for coding. There's no reason to make a special one for the robots.
I find it difficult to believe such a strong position. For example consider some hypothetical alternate timeline like if there were some physicist connectionist hackers who made powerful supercomputers with LLM capabilities back when we only programmed with machine language and assembly language. In that world where the ubiquitous and abstract programming language is assembly language, would it have value to create another layer of abstraction like lisp or C or whatever to help the LLMs use their digital brains more effectively?
Interesting. Good to know that I'm thinking in similar ways to Chris Lattner. Or I suppose it's possible that his blog post is only pandering to dumb ones like me who he knows will ask this dumb question so he's pre-emptively using it as a marketing point for his new platform. If I already have beta access to Mojo maybe I should start trying it out, even if I've been worried it will be some kind of proprietary platform like matlab or mathematica. It's sad that Lattner went from LLVM to such a thing but I guess everyone got to get their bag.