* Posts by 1947293

11 publicly visible posts • joined 18 Feb 2021

LLM-driven C-to-Rust. Not just a good idea, a genie eager to escape

1947293

Re: Real World Results ?

There doesn’t need to be. C2Rust already does translation of actual .c files to Rust, and rust-bindgen translates header files to Rust (i.e. for calling the functions declared in that header file from Rust).

I have no idea why people would want to use an LLM for this when people have been doing it fine without one. Neither language is all that simple when you get into the details and I would be very surprised if an LLM could reliably turn one into the other.

DARPA suggests turning old C code automatically into Rust – using AI, of course

1947293

Re: Missing the point?

To some extent that already exists - the fsanitize options in Clang and GCC can add a significant amount of runtime error detection. The problem is a) the performance cost is not trivial and b) having code crash under the sanitizer is substantially less appealing than detecting problems at compile time.

The secret to better weather forecasts may be a dash of AI

1947293

Re: We all know weather forecasts are crap

You can estimate probabilities for almost any future event - it's not nonsense to provide that probability, regardless of the resolution. 67% is a mid-range probability, i.e. a fairly vague statement that it's more likely to be raining than not at 14:00 next week. I would be more concerned if they predicted a more extreme probability or gave a definite start time for the rain, both of which do imply more certainty than the models provide.

Microsoft is busy rewriting core Windows code in memory-safe Rust

1947293

> behind garbage collection

Rust doesn't have garbage collection. It has RAII, i.e. cleaning up things as they go out of scope, but that's not what is usually meant by a garbage collector.

1947293

Re: C to Rust rewrite with ChatGPT

There is at least one automated (and non-AI) C to Rust translator available. However it (quite rightly) does a very literal translation which looks rather unwieldy; I’m not convinced I’d want a whole codebase that looked like that.

1947293

Re: This doesn't mean you should convert your app to rust

It’s not actually mandatory - if you would prefer to do a particular bit of array indexing without the bounds check in Rust (presumably because you already know you are within bounds and are in a performance-critical bit of the code), you can. Also, if you iterate over the array, the bounds check only happens once at the top of the loop, same as the “i < n” check in a C for loop. It’s really not an unreasonable approach.

Chinese rocket junk may have just smashed into Moon

1947293

Re: It's not us, it's them!

I’m not really convinced this is a bad thing though? The moon is covered in little craters anyway, not seeing the issue with there being one more.

What happens when back-flipping futuristic robot technology meets capitalism? Yeah, it’s warehouse work

1947293

> If you utilised the human brain and got the robot to aid with the manual labour

In the context of warehouses, that is called a "forklift" and we already have them. They are great though!

Sitting comfortably? Then it's probably time to patch, as critical flaw uncovered in npm's netmask package

1947293

Parsing things is often less trivial than you would hope. If you wrote your ten-line parser off the top of your head, would it parse “192.168.510” correctly? Is it a good use of your time, and thousands of other developers’ time, to find, read, and implement the same specification correctly? What are the consequences if there are hundreds of differently half-baked implementations in the wild? I’m not suggesting that parsing IP addresses is hard but there is a reason libraries exist.

UK government may force online retailers to pick up e-waste from consumers

1947293

Re: All well and good..

An Amazon Fire Stick or similar works fine as a replacement for abandoned smart features on a TV. Easier than a Pi though doubtless less fun.

Fujitsu scrapping fuel card benefit to cut costs, threatens dissenters with fire and rehire

1947293

Re: Go Electric

Electric motors are considerably more efficient than engines. There is no point making fuel from electricity at great expense then burning it in an inefficient engine when you could just use an electric car and avoid all the energy losses.