Remix.run Logo
bogtog 9 hours ago

> But now that most code is written by LLMs, it's as "hard" for the LLM to write Python as it is to write Rust/Go

The LLM still benefits from the abstraction provided by Python (fewer tokens and less cognitive load). I could see a pipeline working where one model writes in Python or so, then another model is tasked to compile it into a more performant language

anonzzzies 8 hours ago | parent | next [-]

It's very good (in our experience, YMMV of course) when/llm write prototype with python and then port automatically 1-1 to Rust for perf. We write prototypes in JS and Python and then it gets auto ported to Rust and we have been doing this for about 1 year for all our projects where it makes sense; in the past months it has been incredibly good with claude code; it is absolutely automatic; we run it in a loop until all (many handwritten in the original language) tests succeed.

abrookewood 6 hours ago | parent | next [-]

Why not get it to write it in Rust in the first place?

behnamoh 8 hours ago | parent | prev [-]

IDK what's going on in your shop but that sounds like a terrible idea!

- Libraries don't necessarily map one-to-one from Python to Rust/etc.

- Paradigms don't map neatly; Python is OO, Rust leans more towards FP.

- Even if the code be re-written in Rust, it's probably not the most Rustic (?) approach or the most performant.

anonzzzies 8 hours ago | parent [-]

It doesn't map anything 1 to 1, it uses our guidelines and architecture for porting it which works well. I did say YMMV anyway; it works well for us.

behnamoh 7 hours ago | parent [-]

Sorry, so basically you're saying there are two separate guidelines, one for Python and one for Rust, and you have the LLM write it first in Python and then Rust. But I still don't understand why it would be any better than writing the code in Rust in one go? Why "priming" it in Python would improve the result in any way?

Also, what happens when bug fixes are needed? Again first in Py and then in Rs?

bko 8 hours ago | parent | prev | next [-]

I think that's not as beneficial as having proper type errors and feeding that into itself as it writes

LudwigNagasena 8 hours ago | parent [-]

Expressive linting seems more useful for that than lax typing without null safety.

JumpCrisscross 8 hours ago | parent | prev [-]

NP (as in P = NP) is also much lower for Python than Rust on the human side.

behnamoh 8 hours ago | parent [-]

What does that mean? Can you elaborate?

JumpCrisscross 8 hours ago | parent [-]

Sorry, yes. LLMs write code that's then checked by human reviewers. Maybe it will be checked less in the future. But I'm not seeing fully-autonomous AI on the horizon.

At that point, the legibility and prevalence of humans who can read the code becomes almost more important than which language the machine "prefers."

behnamoh 8 hours ago | parent [-]

Well, verification is easier than creation (i.e., P ≠ NP). I think humans who can quickly verify something works will be in more demand than those who know how to write it. Even better: Since LLMs aren't as creative as humans (in-distribution thinking), test-writers will be in more demand (out-of-distribution thinkers). Both of these mean that humans will still be needed, but for other reasons.

The future belongs to generalists!

Der_Einzige 6 hours ago | parent | next [-]

P ≠ NP is NOT confirmed and my god I really do not want that to ever be confirmed

I really do want to live in the world where P = NP and we can trivially get P time algorithms for believed to be NP problems.

I reject your reality and substitute my own.

rvz 7 hours ago | parent | prev [-]

> The future belongs to generalists!

Couldn't be more correct.

The experienced generalists with techniques of verification testing are the winners [0] in this.

But one thing you cannot do, is openly admit or to be found out to say something like: "I don't know a single line of Rust/Go/Typescript/$LANG code but I used an AI to do all of it" and the system breaks down and you can't fix it.

It would be quite difficult to take a SWE seriously that prides themselves in having zero understanding and experience of building production systems and runs the risk of losing the company time and money.

[0] https://news.ycombinator.com/item?id=46772520

bandrami 4 hours ago | parent [-]

I prefer my C compiler to write my asm for me from my C code but I can still (and sometimes have to!) read the asm it creates.