Live data from Hacker News

If AI writes your code, why use Python?

medium.com

251–260 of 1001 posts

Re: If AI writes your code, why use Python?

#251

Earlier quoted context omitted.

don't you worry about garbage collection?

If you were using Python, then probably not.

haha exactly. I’m coming from Swift, and I don’t want to go back to manually releasing objects like I used to in ObjC, let alone reason about lifetimes.

Re: If AI writes your code, why use Python?

#252
post #125
post #93

Earlier quoted context omitted.

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…

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 goin…

> In a highly dynamic language you may not get

Being dynamic is secondary. A language that uses exceptions for errors does not always need to surround every try with a catch if the code doesn't need to. You have a top level handler that would catch everything.

Re: If AI writes your code, why use Python?

#253
post #242

Earlier quoted context omitted.

Did you read the article? I think you're arguing against a strawman.

I did read the article and I’m not arguing against a straw man. If you’re going to let an AI agent do everything for you then go ahead and use Rust (or any language with a strong type system that benefits agents). But if I’m participating then I’m going to use Python because it’s easier to read. If there’s anything that I’m arguing against is the author’s claim that the ecosystem of libraries (regardless of whether t…

But it's not talking about people like you. It's like getting mad at someone suggesting selling their car for a self-driving car, but you ride a bike everywhere. Take a breather and recognize that not every article is personally meant for you or your situation.

And this isn't even a defense of the premise. I'm not using AI to generate assembly code, because I don't know assembly.

Re: If AI writes your code, why use Python?

#254

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?

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

This surprised me, but I can understand it - Python sucks in many ways lol.

Re: If AI writes your code, why use Python?

#255

It's strange to me that this blog post was written in English. If AI is available, why aren't we all communicating in Lojban? [0] It's an obviously superior language. What does it matter that many people already communicate in English and much of computing depends on that language? AI doesn't care about that. Plus, if you ever need to edit Lojban without AI, you should be able to pick it up in a few weeks, right? [0]…

A computer can understand all programming languages proficiently. How many people reading the blog know Lojban proficiently?

I get what you are trying to say but its a pretty bad analogy.

Also all programming languages do use english mainly in syntax but you are probably from a english-speaking country so you don't notice the irony.

And most people using AI will not need to edit their code at all if you go at all right? They will just keep refactoring with AI, why does the toughness of learning a language or whatever matter in this situation?

Re: If AI writes your code, why use Python?

#256
post #235

Earlier quoted context omitted.

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.

There's a broken idea that AI know Python because they're written in Python. Not how any of it works.

While recent models are capable of generalizing to any language at this point, I do think there are weights from their pretraining corpus that still leak through into how they create their responses. We observed similar language performance patterns across models from different providers, btw.

Re: If AI writes your code, why use Python?

#257

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?

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

Hey they said it had a lot of training data, not necessarily high-quality python code training data.

Re: If AI writes your code, why use Python?

#259

It's strange to me that this blog post was written in English. If AI is available, why aren't we all communicating in Lojban? [0] It's an obviously superior language. What does it matter that many people already communicate in English and much of computing depends on that language? AI doesn't care about that. Plus, if you ever need to edit Lojban without AI, you should be able to pick it up in a few weeks, right? [0]…

Bona ideo! Ni ĉiuj komencu komuniki en Esperanto en ĉi tiu forumo.

Re: If AI writes your code, why use Python?

#260

Earlier quoted context omitted.

Golang. People trash it for being verbose on errors but it's an extremely readable language and it's almost like bash, only much stronger typed and with a very rich stdlib (so it's not likely you'll need a library for a quick script). It's more or less a perfect replacement for Python for "one-off programs" and "quick scripts". Many bonus points for not having to fight shell quotation rules and trying to remember dif…

In a world where AI supposedly can write in any language, Go is much better choice than TypeScript. Imagine contemplating for more than a few seconds a choice between simple, fast, cross-compilable language, and a TypeScript -> JavaScript -> Interpreter -> JIT stack. If you don't know Go, it's more efficient to learn it than to waste the hardware resources of thousands to stay within JavaScript.

'Waste of hardware resources'? Ok then write your apps in Rust.

If it doesn't matter, and for most applications it doesn't, then TypeScript is far more readable than Go - so use that.

Post reply on HN