Live data from Hacker News

What's the best programming language for coding agents?

danluu.com

41–50 of 205 posts

Re: What's the best programming language for coding agents?

#41
post #34

What is the best language for the user of the LLM? What is the best language to have high quality correctness oracles so that the user doesn't have to babysit the LLM and do lots of manual testing?

JS is the best tradeoff between succinct and easy to understand. Python is next but has some rough edges that they avoided in JS.

You are going to have to give more support for those assertions. I write Python every day, and never would I call it a good candidate for the clankers. Pretty much any dynamic language would be ruled out, as there is too much implicit logic which makes it harder to understand what is happening.

Re: What's the best programming language for coding agents?

#42

Is there a relationship between how good a programming language is for coding agents and how popular it is among humans? If so, wouldn't Python be the best language for agents, since it's is the most popular (and hence has the most context available for models)?

Pick something slightly esoteric (eg Haskell) and the quality of public code is very high, because you only have enthusiasts writing it. Choose something taught in schools (Python) and you are going to find 10,000 traveling salesmen homework problems and Django todo applications.

Not sure how you thread the needle on the quality vs quantity dynamic.

Re: What's the best programming language for coding agents?

#43
post #7

Earlier quoted context omitted.

Supply my own stylesheet? No thank you, I'm not here to do work for free.

Is doing something for yourself really working for free? That's an interesting take. But I can understand why you don't want this for yourself, so enjoy the page in all its splendour as it is already!

> Go to restaurant

> Order food

> Food comes out as raw, unprepared ingredients

> Complain to chef

> Tells me to go cook it myself

> wtf, I'm not here to do work for free

> "Is doing something for yourself really working for free?"

Re: What's the best programming language for coding agents?

#47

Ive been amazed at how well LLMs are at writing Gleam[1] and Lustre[2]. Compared to a mainstream language, there is basically zero gleam code in the training data. I have no evidence to back this up, but I suspect that languages that are good for humans[3] will be good for LLMs. Compiled, strongly typed, statically typed, immutable, pure functions, pattern matched, memory safe, etc. [1] https://gleam.run [2] https://…

That's not a take I was expecting to find here. I've found most LLMs absolutely dreadful when it comes to Gleam, to the point that I most often disable even inline autocomplete when working in Gleam codebases.

Too often I find them getting pulled into larger ruts in the training data and trying to insert language features that don't exist (ifs, loops, and syntactic constructs) from more popular languages like TypeScript and Rust. Do you not experience other languages getting partially substituted in when you have LLMs write Gleam?

Re: What's the best programming language for coding agents?

#48

Ive been amazed at how well LLMs are at writing Gleam[1] and Lustre[2]. Compared to a mainstream language, there is basically zero gleam code in the training data. I have no evidence to back this up, but I suspect that languages that are good for humans[3] will be good for LLMs. Compiled, strongly typed, statically typed, immutable, pure functions, pattern matched, memory safe, etc. [1] https://gleam.run [2] https://…

Gleam has been stable for over two years, so maybe it's been long enough that LLMs have internalised the documentation.

Given it's a language that doesn't really contain any groundbreaking ideas[1] (the closest is 'use' IMO), it's possible LLMs can reuse patterns from other functional language.

[1] This isn't criticism. I love how Gleam turned out.

Re: What's the best programming language for coding agents?

#49
Cool seeing Guards of Atlantis 2 here.

One thing that often happens with board games is rule issues in translations. Specifics that are clear in one language get lost in translation. Wolff Designa is out of Latvia. So not surprised there are some hard to interpret rules.

It’s interesting that LLMs struggle with the board game rules like we do. I think game designers should get the llm to teach them from their rulebook. If an LLM can’t understand the rules good chance people will also be confused.

Re: What's the best programming language for coding agents?

#50
post #23
post #16

Earlier quoted context omitted.

I mean, if it really bothers you you could fairly trivially apply picocss or whatever to it using a user stylesheet. That is so little effort that calling it working for free would be disingenuous to say the least.

Multiple people, me being the third or fourth, are not feeling the default layout and you all read that as a signal it's working as intended?

No, just that it’s easy to change for those that don’t like it. Clearly some people do like it (including Dan, presumably).
Post reply on HN