Psst: Microsoft's suicide note just dropped
https://mastodon.social/@Migueldeicaza/115770620333626312
@cstross @Migueldeicaza Not to mention that if you’re going to *algorithmically* translate unsafe C/C++ code into a safe language, what you’ll get (if it works correctly) is all the unsafe aspects of C, but simulated in a safe language. So now it will be both unsafe and unreadable.
@cstross @Migueldeicaza But I guess we can just count on the AI part to fix that.
@mattblaze @cstross @Migueldeicaza A few weeks ago, I saw a presentation of some of the conversions, and it was shockingly good. I'm sure, of course, that they picked the best stuff to show off, but it was still impressive: idiomatic Rust rather than what I refer to as a transliteration of the C into Rust (and which is what you're rightly objecting to). (DARPA has a whole project on such translators; @dwallach, I think, is running it.)
@SteveBellovin @cstross @Migueldeicaza @dwallach I have no doubt there are a bunch of very interesting research projects in this space, which is precisely why the idea of applying this to a major production system terrifies me.
@mattblaze @cstross @Migueldeicaza @dwallach Yup. Ah, well, back to my book—and Charlie, I now know exactly what you mean about when your muse won't shut up and let you finish one book before starting another…

@mattblaze
DARPA's TRACTOR also is for C AFAIK, not C++, and iirc they expected it to take years to be usable. It's been about a year.

For C++, Google has Carbon. MS has … an AI mandate?
@SteveBellovin @cstross @Migueldeicaza

@syklemil @mattblaze @SteveBellovin @cstross @Migueldeicaza I would assume they have done a PoC to demonstrate this is not as crazy as it sounds. It'll be interesting to watch what happens.

@rbanffy
I'm not even so convinced it's "they" as much as this Galen guy. The source isn't something from an MS page after all, but Galen's Linkedin.

I don't know what the long term resolution of this is, but might turn out to be something like a LinkedinLunatics post
@mattblaze @SteveBellovin @cstross @Migueldeicaza

@mattblaze @SteveBellovin @cstross @Migueldeicaza I will wait for the first research papers on this to be published. There will be a lot of cutting-edge translator work being made - and a lot of new training data for better AI models.

@mattblaze @SteveBellovin @cstross @Migueldeicaza

DARPA's TRACTOR (for which I'm the program manager) is focused on C to Rust, not C++. The Microsoft effort is unrelated to our effort.

TRACTOR performer teams have been rolling for about six months, and their first engagement with our test & evaluation team is going on now. As soon as it's ready, we'll push everything out for public release.

There are many challenges with code translation: correctness, idiomaticity, performance. And there are many approaches. By the time TRACTOR is done, which will take several years, we'll hopefully have good answers and good tools.

(I could spend hours just on the topic of "C programmers do the darndest things", where it's sometimes unclear why something even compiles, much less what it's suppose to mean.)

Why not C++? First we need to show we can do C, since (approximately) every valid C program is also a valid C++ program.

@dwallach @mattblaze @SteveBellovin @cstross @Migueldeicaza I mean I’m uhh curious why you could do a million lines a month but not 100 million. What’s the human in the loop nominally doing?

I'm pretty sure Galen's project is a research project too.

And agreed about "C programmers do the darndest things." Back when I was working on the PREfix static analysis tool, one of the things we checked for potential divide-by-zero errors. Occasionally we'd see people literally using the constant 0 as a denominator ... and there was always a good story behind why they did it that way.

@dwallach @mattblaze @SteveBellovin @cstross @Migueldeicaza