4 ms·
Some quotes from the article stand out: "Claude after working for some time seem to always stop to recap things" Question: Were you running out of context? Tha
by danesparza 9mo ago
Some quotes from the article stand out:
"Claude after working for some time seem to always stop to recap things"
Question: Were you running out of context? That's why certain frameworks like intentional compaction are being worked on. Large codebases have specific needs when working with an LLM.
"I've never interacted with Rust in my life"
:-/
How is this a good idea? How can I trust the generated code?
- rkozik1989 9mo agoHopefully they have a test suite written by QA otherwise they're for sure going to have a buggy mess on their hands. People need to learn that if you must rewrite something (often you don't actually need to) then an incremental approach best.
- yieldcrv 9mo ago1 month of Claude Code would be an incremental approach It would honestly try to one-shot the whole conversion in a 30 minute autonomous session
- jamesfinlayson 9mo ago> often you don't actually need to Feels like this one is always a mistake that needs to be made for the lesson to be learned.
- port11 9mo agoAt this point it seems pretty clear that all projects ported from Ruby to Python, then Python to Typescript, must now be ported to Rust. It will solve almost all problems of the tech industry…
- Palomides 9mo agoI'm very skeptical, but this is also something that's easy to compare using the original as a reference implementation, right? providing lots of random input and fixing any disparities is a classic approach for rewriting/porting a system
- ethin 9mo agoThis only works up to a certain point. Given that the author openly admits they don't know/understand Rust, there is a really high likelihood that the LLM made all kinds of mistakes that would be avoided, and the dev is going to be left flailing about trying to understand why they happen/what's causing them/etc. A hand-rewrite would've actually taught the author a lot of very useful things I'm guessing.
- galangalalgol 9mo agoIt seems like they have something like differential fuzzing to guarantee identical behavior to the original, but they still are left with a codebase they cannot read...
- rvz 9mo ago> How is this a good idea? How can I trust the generated code? You don't. The LLMs wrote the code and is absolutely right. /s What could possibly go wrong?
- eddythompson80 9mo agoSame way you trust any auto translation for a document. You wrote it in English (or whatever language you’re most proficient in), but someone wants it in Thai or Czech, so you click a button and send them the document. It’s their problem now.
- atonse 9mo agoMy answer to this is to often get the LLMs to do multiple rounds of code review (depending on the criticality of the code, doing reviews on every commit. but this was clearly a zero-impact hobby project). They are remarkably good at catching things, especially if you do it every commit.
- usrbinbash 9mo ago> My answer to this is to often get the LLMs to do multiple rounds of code review So I am supposed to trust the machine, that I know I cannot trust to write the initial code correctly, to somehow do the review correctly? Possibly multiple times? Without making NEW mistakes in the review process? Sorry no sorry, but that sounds like trying to clean a dirty floor by rubbing more dirt over it.
- ctoth 9mo agoWait until you start working with us imperfect humans!
- Ronsenshi 9mo agoHumans do have capacity for deductive reasoning and understanding, at least. Which helps. LLMs do not. So would you trust somebody who can reason or somebody who can guess?
- galangalalgol 9mo agoPeople work different than llms they fond things we don't and the reverse is also obviously true. As an example, a stavk ise after free was found in a large monolithic c++98 codebase at my megacorp. None of the static analyzers caught it, even after modernizing it and getting clang tidy modernize to pass, nothing found it. Asan would have found it if a unit test had covered that branch. As a human I found it but mostly because I knew there was a problem to find. An llm found and explained the bug succinctly. Having an llm be a reviewer for merge requests males a ton of sense.
- 9mo ago
- captbaritone 9mo agoHis goal was to get a faster oracle that encoded the behavior of Pokemon that he could use for a different training project. So this project provides that without needing to be maintainable or understandable itself.
- topaz0 9mo agoBack of the envelope, they'll need to use this on the order of a billion times to break even, under the (laughable) assumption that running claude code uses comparable compute as the computer he's running his code on. So more like hundreds of billions or trillions, I'd guess.
- johnfn 9mo agoThe author says that he runs both the reference implementation and the new Rust implementation through 2 million (!) randomly generated battles and flags every battle where the results don't line up.
- simonw 9mo agoThis is the key to the whole thing in my opinion. If you ask a coding agent to port code from one language to the another and don't have a robust mechanism to test that the results are equivalent you're inevitably going to waste a lot of time and money on junk code that doesn't work.
- storystarling 9mo agoFuzzing handles the logic verification, but I'd be more worried about the architectural debt of mapping GC patterns to Rust. You often end up with a mess of Arc/Mutex wrappers and cloning just to satisfy the borrow checker, which defeats the purpose of the port.
- zozbot234 9mo agoThat will vary depending on how the code is architected to begin with, and the problem domain. Single-ownership patterns can be refactored into Rust ownership, and a good AI model might be able to spot them even when not explicitly marked in the code. For some problems dealing with complex general graphs, you may even find it best to use a Rust-based general GC solution, especially if it can be based on fast concurrent GC.
- Herring 9mo agoYeah and he claims a pass rate of 99.96%. At that point you might be running into bugs in the original implementation.
- sanxiyn 9mo agoNot really. Due to combinatorial explosion some path is hard to hit randomly in this kind of source code. I would have preferred if after 2M random battles the reference implementation had 99% code coverage, than 99% pass rate. I don't know anything about Pokemon, but I briefly looked at the code. "weather" seemed like a self contained thing I could potentially understand. Looking at https://github.com/vjeux/pokemon-showdown-rs/blob/master/src/battle/suppressing_weather.rs https://github.com/vjeux/pokemon-showdown-rs/blob/master/src... > NOTE: ignoringAbility() and abilityState.ending not fully implemented So it is almost certain even after 99.96% pass rate, it didn't hit battle with weather suppressing Pokemon but with ability ignored. Code coverage driven testing loop would have found and fixed this one easily.
- ferguess_k 9mo agoI think it could work if they have tests with good coverage, like the "test farm" described by someone who worked in Oracle.
- deleted 9mo ago[deleted]