by behnamoh · 1y ago · 0 comments
The end result? Non-mainstream languages don't get much easier to get into because average Joe isn't already proficient in them to catch AI's bugs.
People often forget the bitter lesson of machine learning which plagues transformer models as well.
Just found 3 race conditions in 100 lines of code. From the UTF-8 emojis in the comments I'm really certain it was AI generated. The "locking" was just abandoning the work if another thread had started something, the "locking" mechanism also had toctou issues, the "locking" also didn't actually lock concurrent access to the resource that actually needed it.
This is one of the "here be demons" type signatures of LLM code generation age, along with comments like
// define the payload struct payload {};
I've copied thousands of lines of complex code into an LLM asking it to find complex problems like race conditions and it has found them (and other unsolicited bugs) that nobody was able to find themselves.
Oh it just pattern matched against the general concept of race conditions to find them in complex code it's never seen before / it's just autocomplete, what's the big deal? At that level, humans are glorified pattern matchers too and the distinction is meaningless.
That's not really true for things that are changing a lot. I got a terrible experience last time I've tried to use Zig, for example. The code it generated was an amalgamation between two or three different versions.
And I've even got this same style of problem in golang where sometimes the LLM generates a for loop in the "old style" (pre go 1.22).
In the end LLMs are a great tool if you know what needs to be done, otherwise it will trip you up.
Things that most teams don’t do or half-ass
I use AI assistance to generate code and review code, but I haven't had success trying to use it to update a substantial existing code base in Scala. I have tried using both Claude Code and Cursor and the handful of times I tried there were so many oversights and mistakes that resolving the mess was more effort than doing it manually. I'll probably try again after the next big model releases.
Current frontier models have been the least useful to me when I'm asking them to review performance-critical code inside Scala. These are bits of my code base that I have written to use a lot of mutable variables, mutable data structures, and imperative logic to avoid allocations and other performance impediments. I only use this style for functions highlighted by profiling. I can ask for a code review and even include the reasoning for the unusual style in the docstring, but Claude and Gemini have still tried to nudge me back to much slower standard Scala idioms.
im building one that lets you write and enforce your own rules so you don't get the typical slop
email in profile if you'd like to try it - i can send you a link
Strong typing drastically reduces hallucinations and wtf bugs that slip through code review.
So it’ll probably be the strongly typed languages that receive the proportionally greatest boost in popularity from LLM-assisted coding.
goimports makes everything look the same, the compiler is a nitpicky asshole that won’t let the program even compile if there is an unused variable etc.
That is a really big advantage in the AI era. LLMs are pretty bad at identifying what is and what isn't relevant in the context.
For developers this decision is pretty annoying, but it makes sense if you are using LLMs.
When you have a standard build process that runs go vet, go test, golanci-lint, goimports and compiles the code you can order the LLM to do that as the last step every time.
This way at the very least the shit it produces is well-formed and passes the tests :)
Otherwise they tend to just leave stuff hanging like "this erroring test is unrelated to the current task, let's just not run it" - ffs you just broke it, it passed perfectly before you started messing with the codebase =)
If they do want "popularity" then the counter-counter-point is that it should be easier to get than ever. Just have one proficient person write a lot of idiomatic, relatively isolatable code, and then have an AI generate terabytes upon terabytes of public domain licensed variations and combinations on that code. If you make programming in the small a breeze, people will flock to your language, and then they can discover how to program in the large with it on their own time.
I'm optimistic that most new programming languages will only need a few "real" programmers to write a small amount of example code for the AI training to get started.
CSV is not a complex format.
Why do you reach this conclusion from toying with CSV?
And why do you trust a LLM for economic planning?
When the code is done, it not like the LLM can secretly go flip columns at random
Even for small projects the optimisation criteria is different if the human's role in the equation shifts from authoring to primarily a reviewing based one.
Alternatively every new release will have to come with an MCP for its documentation and any other aspects that might make it easier for an LLM to talk about it and use it accurately.
Also, I had created a custom Node.js/JavaScript BaaS platform with custom Web Components and wanted to build apps with it, I gave it the documentation as attachment and surprisingly, it was able to modify an existing app to add entire new features. This app had multiple pages and Claude just knew where to make the changes. I was building a kind of marketplace app. One time it implemented the review/rating feature in the wrong place and I told it "This rating feature is meant for buyers to review sellers, not for sellers to review buyers" and it fixed it exactly right.
I think my second experience (plain JavaScript) was much more impressive and was essentially frictionless. I can't remember it making a single major mistake. I think only once it forgot to add the listener to handle the click event to highlight when a star icon was clicked but it fixed it perfectly when I mentioned this. With TypeScript, it sometimes got confused; I had to help it a lot more because I was trying to mock some functions; the fact that the TypeScript source code is separate from the build code created some confusion and it was struggling to grep the codebase at times. Though I guess the code was also more complicated and spread out over more files. My JavaScript web components are intended to be low-code so it's much more succinct.
Zig changes a lot. So LLMs reference outdated data, or no data at all, and resort to making a lot of 50% confidence guesses.
With Rust OTOH Claude feels like a great teacher.
I also use coding agents with Elixir daily without issues.
some HDLs should fit the bill: VHDL, Verilog or SystemC
[1] https://docs.amd.com/r/en-US/ug901-vivado-synthesis/Flip-Flo...
Rust code has the property that if it compiles, it usually works. True there are still runtime errors that can occur in Rust, but they're less likely going to be due to LLM hallucinations, which would be caught at compile time.
But I'm not noticing that anymore, at least with Elixir. The gap has closed; Claude 4 and Gemini 2.5 both write it excellently.
Otoh, if you wanted to create an entirely new programming language in 2025, you might be shit outta luck.
This just made me really sad. That effectively means that we'll plateau indefinitely as a civilization (not just on programming languages, but anything where the LLM can create an artificial Lindy effect).
Or, do what you want, and don't worry what language people who have no interest in programming use.