Live data from Hacker News

Translating All C to Rust (TRACTOR)

darpa.mil

401–403 of 403 posts

Re: Translating All C to Rust (TRACTOR)

#401
post #367

Earlier quoted context omitted.

What is the learning curve for newbies to avoid critical segfaults? If you still have to walk a tightrope to get code across the board, wouldn't all benefit from a plankway with guardrails instead? I'm not dissing C or C++ in any way. I've used it. But I recognize there are some major footguns that aren't easy to avoid, causing a much longer learning curve than necessary to get things built. Rust at least seems deter…

To a first approximation, avoid using raw pointers. They should almost never be needed in application code. Use C++'s standard library facilities for smart pointers and containers instead. They are masterpieces of engineering, and work extremely well.

Why avoid using defaults? That's literally the part of an unnecessarily long learning curve needed to learn C/C++ that rust helps with.

Re: Translating All C to Rust (TRACTOR)

#402

Surely this could be better pitched to researchers as just another AI benchmark, a bit like ARC Prize? ;) There could be some exiting C projects that are already public, with tests for feedback during development iteration and some holdout tests, and some holdout projects too with a leaderboard and prizes. For preferences about converted code quality, both automated assesment and human preferences could be ranked wit…

And like with most other competition/benchmark, the result is likely optimizing for the benchmark and not the wider goal ;-). It’s difficult to get a serious effort without people trying to game the benchmark.

People could try but it would not help with the withheld datasets so much, and it would be possible to add more to it. If the withheld data was closed, and only available to an assessment system, gaming that would be pretty difficult. Scale.com's SEAL Leaderboards take a similar approach. The ARC Prize still exists too, and it's waiting for winners.

See https://scale.com/leaderboard

Re: Translating All C to Rust (TRACTOR)

#403
post #327
post #39

They didn't explain why they've chosen Rust. There are a lot of memory-safe languages besides Rust, especially in application-level area (not systems-level like Rust).

Probably because everything else in application-level area is already being written in something else, safer than plain old C. It is the systems-level code with UNIX heritage that is the main problem.

Naah, I believe in some areas like DARPA's a lot of folks still do C out of tradition only. Same as in banking they still use COBOL -- way too many existing problems and integrations are already in COBOL. In DARPA I think a lot of control software is written in C, even though some of their controllers can even run Java. So a large-scale effort is needed to refactor all the infrastructure.l and processes.
Post reply on HN