| ▲ | _boffin_ 2 hours ago |
| Read the first few comments and surprised I didn’t see it, but training data. The voluminous amount of Python in the training data. I could write in brainfuck with ai, but I presume, wouldn’t get the same results than if going with python. My follow up question: with AI now, why care about a lang until you need to? |
|
| ▲ | gertlabs 42 minutes ago | parent | next [-] |
| Surprisingly, LLMs are actually much worse at reasoning in Python than other common programming languages for agentic coding tasks. Data here: https://gertlabs.com/rankings?mode=agentic_coding |
| |
| ▲ | BariumBlue 17 minutes ago | parent | next [-] | | Hah, I was just thinking that Python likely has a vast ocean of training data, but it's likely of lower quality, being much of it is written by beginners and those who aren't primarily programmers. | |
| ▲ | rossjudson 15 minutes ago | parent | prev [-] | | My standard joke here: Q: Say, what does this Python code do? A: Nobody f&%^ing knows. |
|
|
| ▲ | bensyverson an hour ago | parent | prev | next [-] |
| Just use Go. LLMs have seen a ton of it, they write it well, it compiles practically instantly, and it has all the advantages of a typed compiled language. I created a big Python codebase using AI, and the LLM constantly guesses arguments or dictionary formats wrong. Unit tests and stuff like pydantic help, but it's better to avoid that whole class of runtime errors altogether. |
| |
| ▲ | mbreese an hour ago | parent | next [-] | | That’s what I’ve settled on. Python is so flexible that there are a million ways to organize code, pass arguments, etc. If you already have a code base to work from, an LLM can make new code in the style of the old code. But a fresh project? Once you get to a certain level of complexity it quickly can turn into write once, read never code (even if the code is passing tests). This is where I’ve found that a compiled, strongly typed language (any one really) works well with an LLM. With the little bits of friction that is part of writing a language like Go, the LLM can produce pretty decent (and readable) code. | |
| ▲ | shepherdjerred 21 minutes ago | parent | prev | next [-] | | Why use Go when you can use Rust? | | | |
| ▲ | mountainriver 26 minutes ago | parent | prev | next [-] | | Why? Go has a GC, is basically incompatible with C and very limited overall | | |
| ▲ | Alejandro2026 16 minutes ago | parent [-] | | Go's limited syntax is actually a feature here,because it stops the LLM from trying to be too clever |
| |
| ▲ | hirvi74 42 minutes ago | parent | prev | next [-] | | But what is the selling point for Go? I get that it is allegedly hailed to be a simple language with basically no batteries included, but why is that a selling point? Does Go excel at anything no other language does? | | |
| ▲ | pylotlight 21 minutes ago | parent | next [-] | | Performance? Second only to rust and other lower level langs. Surely you don't need this spelled out for you... | | |
| ▲ | nvader 15 minutes ago | parent [-] | | Not just performance, but static typing and prevalent in the training data/easy for LLMs to reason about. Of course, your response admits, "second to Rust", which I am guessing is an unspoken question in the grandparent's mind. |
| |
| ▲ | enneff 28 minutes ago | parent | prev | next [-] | | For one thing it’s statically typed and has many fewer foot guns than Python, so the llm-produced code is more likely to do what you expect. | | |
| ▲ | shepherdjerred 20 minutes ago | parent [-] | | Go is statically typed but the type system leaves much to be desired. Go’s benefit are primarily around simplicity, readability, and concurrency. |
| |
| ▲ | 32 minutes ago | parent | prev | next [-] | | [deleted] | |
| ▲ | chickenman_98 35 minutes ago | parent | prev [-] | | I think that’s sort of the selling point no? It’s really boring. It has like -10 keywords, compiles insanely fast, and has a concurrency model that’s easy to use and read. LLMs are great at using Go tooling to sanity check along the way. It’s easy to write shitty Go but it’s really pleasant to work with if you find those things compelling. | | |
| |
| ▲ | 24 minutes ago | parent | prev [-] | | [deleted] |
|
|
| ▲ | not2b 2 hours ago | parent | prev | next [-] |
| That would matter if we were asking the AI to generate code open-loop: someone probably already wrote something close to what you asked for in Python. But if the agent generates code, tries to compile it, sees the detailed error messages and acts on those messages to refine the code, it's going to produce a higher quality result. rustc produces really good diagnostics. And there's a lot of Rust code online now, even if there's so much more Python and Javascript/Typescript. |
| |
| ▲ | ambicapter an hour ago | parent [-] | | LLMs don't actually semantically parse the error messages. They will generate the most likely sequence resulting from the error message based on their training data, so you're back to the training data argument. | | |
| ▲ | neutronicus an hour ago | parent [-] | | Perhaps the training data about what compiler diagnostics mean is particularly semantically rich training data. |
|
|
|
| ▲ | onlyrealcuzzo 36 minutes ago | parent | prev | next [-] |
| I built a programming language, and LLMs can code phenomenally well in it. I don't think the training set matters that much, since there's no way they have my language in their training set! Programming languages have a lot in common. Python is kind of odd when it comes to languages. |
|
| ▲ | ocschwar 21 minutes ago | parent | prev | next [-] |
| Seems to me these LLMs have a critical mass of Python training data and Rust training data, so there's no advantage for Python there. So as the article points out, an iterative process that catches the mistakes at compile time is much more suited for an AI than one that catches them at runtime. |
|
| ▲ | gmueckl 2 hours ago | parent | prev | next [-] |
| Training data can't be the whole answer. LLMs are really good at translating to different programming languages. This makes sense, given that they are derived from text translation systems. I'm getting great results in languages with comparatively small bodies of freely available code. The bigger hurdle is usually that LLMs tend to copy common idioms in the target language and if it is an "enterprise-y" language like Java or C#, the amount of useless boilerplate can skyrocket immediately, which creates a real danger that the result grows beyond the usable context window size and the quality suffers. |
| |
| ▲ | jryio an hour ago | parent | next [-] | | In higher dimensional vector space, yes it can. Dimensionality gets bizarre in 1000-D space. Similarity and orthogonality express themselves in strange ways and each dimension codes different semantic meaning. Therefore, if the training data is highly consistent you are by definition reducing some complexity and/or encoding better similarity. In Go the statement result, err := Storage.write(...)
Is almost always going to be followed by if err != nil { ... }
In a highly dynamic language you may not get try { Storage.write() } catch (error) { ... }
Unless explicitly asked for. | |
| ▲ | lanyard-textile 2 hours ago | parent | prev | next [-] | | Very true. I have to steer models hard for C++. They constantly suggest std::variant :P | | | |
| ▲ | chromacity 2 hours ago | parent | prev [-] | | > LLMs are really good at translating to different programming languages. ...for which ample training data is available. > This makes sense, given that they are derived from text translation systems. ...for languages with ample training data available. Yes, LLMs can combine information in novel ways. They are wonderful in many respects. But they make far more mistakes if they can't lean on copious amounts of training data. Invent a toy language, write a spec, and ask them to use it. They will, but they will have a hard time. | | |
| ▲ | lmm 2 hours ago | parent | next [-] | | That might be an argument for not using a novel homebrew programming language. But it's not an argument against, like, any top-100 or even top-1000 programming language, which will be adequately represented in the training data. | | |
| ▲ | ambicapter an hour ago | parent [-] | | It is if more training data results in better performance. In which case, GP will continue to use the language that is likely to have the most training data available. | | |
| ▲ | lmm an hour ago | parent [-] | | > It is if more training data results in better performance. Sure. But given the relation with translation systems, it seems far more likely that there are diminishing returns to larger volumes of training data. |
|
| |
| ▲ | mbreese 42 minutes ago | parent | prev | next [-] | | I have a language I wrote for processing data pipelines. I’ve used it for years, but I can count the number of users on one hand. I wrote it partially to learn about writing a scripting language, partially because Nextflow didn’t exist yet. I still use it now because it works much better for my way of processing data on HPC clusters. The only code that exists on the internet for this is test data and a few docs in the github repo. It’s not wildly different from most scripting languages, from a syntax point of view, but it is definitely niche. Both Codex and Claude figured it out real fast from an example script I was debugging. I was amazed at how well they picked up the minor differences between my script and others. This is basically on next to zero training data. Would I ask it to produce anything super complex? Definitely not. But I’ve been impressed with how well it handles novel languages for small tasks. | |
| ▲ | agentultra an hour ago | parent | prev [-] | | They are also good at generating plausible code. The kind that has no obvious bugs in it. I wouldn’t be surprised if humans in the loop over report success with these tools. Combined with decision fatigue… it’s not a good recipe for humans making good decisions. An experienced Rust developer is going to be in a better position to drive an agent to generate useful Rust code than a Python programmer with little or no Rust experience. Not sure I agree with the author that everyone should just generate reams of Rust now. At least if your get paged at 3am to fix the 300k AI-generated Django blog you’ll have a chance at figuring things out. Good luck to you if Claude is down at the same time. But still better than if it was in Rust if you have no experience with that language. |
|
|
|
| ▲ | tengbretson an hour ago | parent | prev | next [-] |
| Admittedly, I have very little experience with LLM-assisted Python. However, based on the severe degradation in output quality I have seen from an LLM working with plain JavaScript as opposed to TypeScript, I can't imagine choosing to start a project in Python at the moment. |
|
| ▲ | robot-wrangler an hour ago | parent | prev | next [-] |
| > I could write in brainfuck with ai, but I presume, wouldn’t get the same results than if going with python. https://esolang-bench.vercel.app/ |
| |
|
| ▲ | btown 2 hours ago | parent | prev | next [-] |
| Also, every single interpreter error has an entire corpus of StackOverflow-esque fix suggestions alongside it, and the model has been fine-tuned to minimize such errors on the first try. This hasn't been done for more obscure languages. You'll likely take more turns, on average, to get a working output, even if your problem is fully verifiable via test input/outputs - and if it's not verifiable, you don't want the "attention" of the model focused on syntax rather than the solution. |
|
| ▲ | mountainriver 24 minutes ago | parent | prev | next [-] |
| I loved from writing all my code with LLMs from Python to Rust. I’ve seen absolutely no difference, most of the time I couldn’t even tell you which it’s writing in. My programs are faster and more reliable than they’ve ever been. |
|
| ▲ | osigurdson 13 minutes ago | parent | prev | next [-] |
| I wouldn't say I get worse results with Go than I do with Python. |
|
| ▲ | jryio 2 hours ago | parent | prev | next [-] |
| I wrote about the meta thesis of programming languages in the training data here https://jry.io/writing/use-boring-languages-with-llms/ |
| |
| ▲ | _boffin_ 2 hours ago | parent [-] | | Please distill instead of having me navigate off site. Include link for additional info. edit: side -> site |
|
|
| ▲ | markboo 19 minutes ago | parent | prev | next [-] |
| that's right, we dont need to care about a lang, same as we dont care about Map when FSD promise its already end to end optimal one. |
|
| ▲ | Eridrus an hour ago | parent | prev | next [-] |
| The LLMs are actually worse at generating Python than other langs, hypothesized due to quality of training data lol. I still read the generated code, so I'm not quite willing to give up on Python yet though. |
|
| ▲ | bluegatty an hour ago | parent | prev | next [-] |
| There's enough training data on the other langs. |
|
| ▲ | bmitc 21 minutes ago | parent | prev | next [-] |
| > Read the first few comments and surprised I didn’t see it, but training data. The voluminous amount of Python in the training data. That's actually part of the point. Almost no one writes types for Python and has complete type compliance. So all that training data is people just yoloing Python, writing a bunch of poor code in it. I honestly can't believe any experienced software engineer would decide to build systems in Python these days. |
|
| ▲ | th1sisoldnews an hour ago | parent | prev | next [-] |
| [dead] |
|
| ▲ | faangguyindia 2 hours ago | parent | prev | next [-] |
| No if that mattered you'd write everything in html and css. Because that has way more training data. |
| |
|
| ▲ | gerdesj an hour ago | parent | prev [-] |
| "I could write in brainfuck with ai" Well, go on and do the experiment! Perhaps LLMs can right code as well in BF as Python but I don't recommend it because hallucinations are really hard to notice in BF. If you are going to worry about high level computer languages and AI, you are going to have to start with getting to grips with machine code and assemblers and that. Once you know how say some Python code ends up being processed by your laptop CPU(s), then you will know when BF might be best! |
| |