Live data from Hacker News

Is Python Becoming Pinyin?

lernerpython.com

51–60 of 82 posts

Re: Is Python Becoming Pinyin?

#51
The post focuses on Python, but I think it touches on an interesting question before skipping past it: ideally, what language would be best for our AIs to be programming in? The article says Rust. But can we do better? Rust has strong typing and memory guarantees which I think are important, but it’s also slower to compile. If we’re going to be doing agentic programming, where the agent is operating in a tight loop, iterating on the code, then it seems like we’d want something that can be faster to run after creating new code. Effectively, we’d want the agentic equivalent of a Lisp REPL, but optimized for the agent, or at least a language that compiles quickly, as it is run. This is one of the roles that Python plays today. Perhaps there is also a slow, sophisticated compiler that digests the same syntax and spits out the fastest , most secure code possible once the agent has iterated its way to the final answer.

Re: Is Python Becoming Pinyin?

#53

Earlier quoted context omitted.

This is a non-sequitur? Python is also not a "standalone language" and requires "some runtime".

Sure but that runtime is much more general purpose - JS runtimes are focused on network apps. For example you can write an app like Calibre in Python and QT and it is much lighter than writing something with JS and Electron. Python is easier to interface with C/C++ libs.

The async loop does not automatically make it "focused on network apps". Most apps I work with in Python also run on an async runtime.

Re: Is Python Becoming Pinyin?

#54

Earlier quoted context omitted.

Sure but that runtime is much more general purpose - JS runtimes are focused on network apps. For example you can write an app like Calibre in Python and QT and it is much lighter than writing something with JS and Electron. Python is easier to interface with C/C++ libs.

The async loop does not automatically make it "focused on network apps". Most apps I work with in Python also run on an async runtime.

It’s not the async loop - it’s interfacing with the system. JS is designed to run in a sandbox and the only way out in say Node.js is to write C++ addons.

For example you don’t get to see TCP headers with Node out of the box and you can’t craft packets, whereas you can in Python.

Re: Is Python Becoming Pinyin?

#55
post #51

The post focuses on Python, but I think it touches on an interesting question before skipping past it: ideally, what language would be best for our AIs to be programming in? The article says Rust. But can we do better? Rust has strong typing and memory guarantees which I think are important, but it’s also slower to compile. If we’re going to be doing agentic programming, where the agent is operating in a tight loop,…

A very interesting point. Coding with AI definitely requires tight, fast loops. I don't have much experience with Rust, but I had heard that the compiler is slow (because it's doing so much thinking and checking in advance).

I'm OK with Lisp output, but maybe that just shows how old I am. :-)

I wonder if it's possible (or wise) to have two different compilers for a language -- one that's optimized for such tight loops, and another that does thorough checking, etc. You know, kind of like -O, but at a much deeper level.

Re: Is Python Becoming Pinyin?

#56
post #38

Earlier quoted context omitted.

A big selling point for Python is the large number of native extensions. Rust has a huge advantage here, in fact many popular Python libraries use Rust underneath.

Maybe the/a big "selling point" for python is the fact, that many teachers don't know better.

Does this also apply to the industry professionals who pushed it to number 1/2?

Re: Is Python Becoming Pinyin?

#57

Python has wonderful set of libraries so it is probably going to stay with us for a while. However, I suspect major takeover by Typescript (despite I like Python more).

I’m a JS/TS dev (and fan) I don’t think either is a replacement for Python. They are not standalone languages but require some runtime to interact with the world (DOM or Node.js etc) which have limited capabilities for interacting with the system - their focus is network services. It’s not that inaccurate to say that JS is just API for a C++ app. :) Now if .NET was still not so embedded in the Windows ecosystem that…

> require some runtime to interact with the world

This was why I was excited by Bun until recent events. A typescript runtime with a rich standard library, and fast. It looked like it would be a great sweet spot for many use cases.

Re: Is Python Becoming Pinyin?

#58
post #44

Earlier quoted context omitted.

Well you can read python, you can't read machine code...

“Vibe coders” don’t read the code their LLM produces. That’s the whole point.

Thanks for getting what I meant.

More than one reply to my original comment is along the lines of "but humans cannot read/understand machine code effectively". Perhaps instead of starting my comment with "If we're not writing code by hand anymore anyway", I should have said "writing or reading", but it was implied.

Re: Is Python Becoming Pinyin?

#59
post #51

The post focuses on Python, but I think it touches on an interesting question before skipping past it: ideally, what language would be best for our AIs to be programming in? The article says Rust. But can we do better? Rust has strong typing and memory guarantees which I think are important, but it’s also slower to compile. If we’re going to be doing agentic programming, where the agent is operating in a tight loop,…

> what language would be best for our AIs to be programming in

I think "batteries included" is not a good thing to have in the future.

We'll want to be very explicit about what AI generated code can and can not do.

And so some form of effects based scripting language seems like a plausible choice: A language where by default "all batteries are removed".

Re: Is Python Becoming Pinyin?

#60
post #55
post #51

The post focuses on Python, but I think it touches on an interesting question before skipping past it: ideally, what language would be best for our AIs to be programming in? The article says Rust. But can we do better? Rust has strong typing and memory guarantees which I think are important, but it’s also slower to compile. If we’re going to be doing agentic programming, where the agent is operating in a tight loop,…

A very interesting point. Coding with AI definitely requires tight, fast loops. I don't have much experience with Rust, but I had heard that the compiler is slow (because it's doing so much thinking and checking in advance). I'm OK with Lisp output, but maybe that just shows how old I am. :-) I wonder if it's possible (or wise) to have two different compilers for a language -- one that's optimized for such tight loop…

I mean if we're getting really serious about ai-first development, we might be able to get away with a ton of micro services written with clear, simple apis to communicate all in a giant mono-repo managed by an army of agents. That way the full surface any one agent has to touch is small, compile time of each individual service is very fast, and services can be hand-written if super critical.

Anyway, I've played around with the idea a bit so far, and it seems that current agents/harnesses use way more tokens with that architecture.

Post reply on HN