Live data from Hacker News

Is Python Becoming Pinyin?

lernerpython.com

61–70 of 82 posts

Re: Is Python Becoming Pinyin?

#61
post #25

Earlier quoted context omitted.

How are you getting static typing without additional tooling?

I mean, of course there is tooling involved. But it's part of the language. Unlike TypeScript which is a superset of JS and requires transpilation.

What tooling are you thinking of that’s part of the language? I don’t think CPython ships with a type checker, does it? People typically use mypy or pyright and neither or these are part of the language.

Re: Is Python Becoming Pinyin?

#62
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,…

It seems like the obvious point of tension is that you probably want AI to be constrained to/by some rigor. Rust is good because it enforces some safety measures, but I'm more interested yet in the work to have AI work with lean4 or the like to prove its code is up to spec. But that proof checking is probably in direct conflict with fast compilation.

Re: Is Python Becoming Pinyin?

#63
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…

> but I had heard that the compiler is slow (because it's doing so much thinking and checking in advance).

The compiler is indeed not particularly speedy, but the reason you were given is not entirely accurate. As measured in this blog post [0] different parts of the compilation pipeline will take different amounts of time depending on what you're doing (cargo check vs. incremental build vs. full build, building a library vs. binary, etc.), but generally speaking type/borrow checking take up relatively small portions of compilation time (~15% or less, based on eyeballing the charts [1, 2]) compared to everything else.

> one that's optimized for such tight loops, and another that does thorough checking

I think that would risk producing diverging language subsets, especially if the checks are essential for language semantics. For example, what exactly does it mean if a program passes the "relaxed" compiler but fails the "thorough" one? How close does that actually get you to a "real" working program?

[0]: https://kobzol.github.io/rust/rustc/2024/03/15/rustc-what-ta...

[1]: https://kobzol.github.io/assets/posts/compile-sections/binar...

[2]: https://kobzol.github.io/assets/posts/compile-sections/libra...

Re: Is Python Becoming Pinyin?

#64

Earlier quoted context omitted.

> It might seem weird for us to teach beginners Python, knowing that they’ll then have agents output other, faster languages. I see an analogy here with Chinese: Many people don’t realize this, but children in China first learn Latin characters, which they use to spell out Chinese phonetically, using a system called “pinyin.” They then use their knowledge of Latin characters to learn Chinese characters, whose pronunc…

Pinyin is widely used, but pinyin’s primacy is oversold. Chinese texts start with teaching Chinese characters - many are recognizable to children from daily exposure to begin with, so they don’t need the pinyin. Pinyin only comes in when the character is genuinely unknown.

I think computer/smartphone usage has been changing that latent space for quite some time. People have been talking about "character amnesia" since 2010.

Re: Is Python Becoming Pinyin?

#65

If you don't know what is Pinyin I googled it for you (I didn't know what it is): Pinyin is a system for writing Mandarin Chinese sounds using the Latin alphabet. Pinyin is commonly used for learning Chinese pronunciation and for typing Chinese characters.

Something to keep in mind is that teaching Pinyin in schools is at least partially an attempt by the Chinese government to drive non-Mandarin dialects of Chinese extinct.

That's because Chinese characters are sred by all of the dialects of Chinese while Pinyin is based on the Mandarin pronunciation.

Re: Is Python Becoming Pinyin?

#66
> Of course, the topic on everyone’s mind was AI.

Some against their will.

> In a world where all coding is agentic, and where we are asking the agents to produce Rust, we might ask a deep and more disturbing question: Why learn Python at all? What’s the point of learning a programming language that an increasingly small group of people will be writing and using?

All the same structure everywhere.

- Now with the AI

- (Not the future; the present)

- Everything is changing

- But colon points to potential problem:

You’re worried about the future of Python. But not programming?

Be a part of the problem or the solution. But no, the author will say, one can’t stop a tsunami.

> Python has a future. But in a world of agentic coding, it might be increasingly for teaching the basics of software engineering and providing AI with high-quality training data, rather than for direct coding of applications. It’s still worth learning and knowing Python — but it’s also worth doubling down on basic software-engineering principles, which we’ll increasingly be using to instruct and judge AI agents.

Remember to mention AI Era, Agentic Era, or some other statement that is on the one hand completely obvious in the author’s mind but bears repeating like a mantra.

Yeah Python will be used to teach arithmetic before we spend the rest of our lives with a calculator. The conclusion is as banal as all the other fluff thought pieces.

Re: Is Python Becoming Pinyin?

#68
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,…

OCaml, its compiler is very fast, and it has a stronger type system than Rust in some areas.

Re: Is Python Becoming Pinyin?

#69
post #60
post #55

Earlier quoted context omitted.

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

This exactly how integrating tools with AI agents in low code/no code orchestration engines looks like.

See Workato, Bomi, LangFlow,...

Re: Is Python Becoming Pinyin?

#70
The post is built around a metaphor based on a misunderstanding. The following is not a "well-actually", but is to illustrate that the real world is often stranger and harder to predict and categorize than we might expect. From the post:

> '''Many people don’t realize this, but children in China first learn Latin characters, which they use to spell out Chinese phonetically, using a system called “pinyin.”'''

My understanding is that children in China learn many characters before pinyin. Characters are mapped to meanings first, and only later to sounds. Fwiw even in my Chinese-as-a-second-language course we were thrown into Chinese characters from the beginning.

Also, of course, Chinese characters have been around for thousands of years and sound-based writing for Chinese is very new. The techniques to get leverage and build up understanding of characters gradually are incredibly varied. Just as the ways we relate to code in the future are unlikely to be familiar or easy to predict.

Post reply on HN