DARPA converts ALL C to Rust Programming

  Рет қаралды 5,013

Jeremy Chone

Jeremy Chone

Күн бұрын

Пікірлер: 28
@DataPastor
@DataPastor 3 ай бұрын
If they are able to write a C-to-Rust transpiler (which Rust code then would compile to native code), then they could also write a C-to-safe-binary compiler directly, too - so Rust is not required into the compiler chain at all.
@iMagUdspEllr
@iMagUdspEllr 2 ай бұрын
Rust is designed to be a safer language. Rust is made by people who chose to specialize in making languages. Wouldn't it be better to use a safe language made by specialists than it would be to try to create and maintain a custom in-house solution as a side project? Wouldn't it be easier to write tests for the existing C code? The benefit of Rust would be that if you want to be able to expand or refactor your code, it would be better to do it in a language that doesn't require as much manual double-checking. But, is there a way to make a C-to-safe-binary compiler that essentially turns C into something Rust-like? Wouldn't it make sense to upgrade the standard C compilers to just use these safe features and then no code needs to be rewritten worldwide and then C would become as safe as Rust?
@DataPastor
@DataPastor 2 ай бұрын
@@iMagUdspEllr i consider Rust as an interesting experiment, but it is yet to see if Rust can get mass adoption. It is hard to express, how insignificant Rust is on the job market and in general in the industry. Just remember that once some cities have decided to switch to Linux in the past… such political decisions, made by some administrative committees can hardly change reality. C++ is just peaking in its popularity; it also targets now memory safety. Zig is coming as a much better substitute for C than Rust. So at the end… let us see. But I don’t believe that Rust would be the large scale solution. My personal view today.
@iMagUdspEllr
@iMagUdspEllr 2 ай бұрын
@@DataPastor Getting adopted is influenced heavily by economics, not just the merits of the language on its own. C++ suffers from not having modern tooling like Zig or Rust. But, Zig didn't set out to focus on safety, simply to be a C-replacement. I kind of just wish that C++ had better tooling and didn't become so bloated with features. But, why wouldn't we just upgrade the standard C compilers with the safety features you mentioned? Then no switch would need to occur and then C would be come safer.
@krumbergify
@krumbergify 3 ай бұрын
Converting C to unsafe Rust i trivial (for a tool). Converting C to safe Rust is not, because it requires you to redesign your application into a more functional or actor model style and most C-applications are dirt piles of globals and singletons 😂.
@JeremyChone
@JeremyChone 3 ай бұрын
Thanks for sharing. The last time I coded in C was probably when I was around 15 in the late 80s. So, it's been a while.
@theevilcottonball
@theevilcottonball 2 ай бұрын
C programs and a lot of singletons? I disagree. The reason why it is hard to translate C, is that in C some lifetimes do not fit Rusts ownership model. Also Rust does not allow shared mutable access or cyclic/linked data structures, self referential data structures etc. I think translating those things is hard, not because C programs use a lot of singletons (they don't). Also translating things like macros to rust or some other stuff may be hard to do.
@danielyokoyama3861
@danielyokoyama3861 3 ай бұрын
Hi Jeremy. Really happy with the aparent strong adoption of rust in different niches. After i started with rust I feel that i have a better grasp of the internals of the computer and memory model. This helps a lot in writing the code that I need.
@JeremyChone
@JeremyChone 3 ай бұрын
Yes, same here. Somehow, there is something in the Rust way of approaching types that makes my code more maintainable and enjoyable to write.
@JohnPywtorak
@JohnPywtorak 3 ай бұрын
Keep in mind, these kind of DARPA activities are "Research" not necessarily doing. Yes hopefully it could lead to tools etc., but it is not a presumed end game, likely though. The better question is more about Rust as a suitable new host, so to speak. DARPA can see the difficulty in maintaining safe legacy C and the long game. Thus, the need for research. There may be Rust milestones needed before it could happen, but ultimately it could be a benefit to Rust advancing it as a systems language.
@JeremyChone
@JeremyChone 3 ай бұрын
Good points. Thanks.
@On.Jonathan
@On.Jonathan 3 ай бұрын
And even so, Rust is using LLVM as its Compiler Backend, which is written in C. Funny anyways... 😅😮
@abduljabbarazam943
@abduljabbarazam943 3 ай бұрын
Microsoft 365 is being rewritten in Rust. Not sure if it's the backend or the desktop application
@JeremyChone
@JeremyChone 3 ай бұрын
Yes, me too. I assume there is some backend to that, but I did not find any conclusive data to confirm it.
@JeremyChone
@JeremyChone 3 ай бұрын
The very interesting part is that they seem to rewrite C# code.
@amitkumdixit
@amitkumdixit 3 ай бұрын
Hi Jeremy. What do you mean when you say Microsoft is moving it's Backend from C# to Rust. What I am aware is they are moving some of their Windows OS kernel code to Rust.
@JeremyChone
@JeremyChone 3 ай бұрын
This story: www.theregister.com/2024/01/31/microsoft_seeks_rust_developers/ I think, but I might be wrong, that this includes some backend services.
@Sovereign589
@Sovereign589 3 ай бұрын
+1
@irlshrek
@irlshrek 3 ай бұрын
I think we made a good bet, gentlemen
@frun
@frun 3 ай бұрын
I would convert the libraries first.
@dhrubrawat9316
@dhrubrawat9316 3 ай бұрын
is it possible to create the video on project polonius?
@tetuaoro
@tetuaoro 3 ай бұрын
thank you sir
@seaviasfo
@seaviasfo 3 ай бұрын
I tried speaking french in college but it never took... weirder still is that I'm a programming language polyglot but for the life of me can't seem to pick up a 2nd human language lol 😂.
@JeremyChone
@JeremyChone 3 ай бұрын
Don't worry, we have GPTs now.
@taquanminhlong
@taquanminhlong 3 ай бұрын
Im not really sure whether we should but AI might cause a mess 😂 better write rust on your own
@JeremyChone
@JeremyChone 3 ай бұрын
You have a point. I think they will find the right balance. GenAI, used right, can be a tremendous tool to speed up dev and migrations. The trick is that I do not think the industry has found a good way to use it yet. They focus on building fancier and fancier tic-tac-toe, but this might be the wrong approach... more on that in a video at some point.
@RoamingAdhocrat
@RoamingAdhocrat 3 ай бұрын
I can imagine the existence of tooling to transcribe C into unsafe Rust, and tooling to convert unsafe Rust into safe Rust, in a way proven not to change functionality... but I could be wrong, I'm not a compsci grad You'd then need human devs to examine the remaining unsafe blocks and see what improvements can be made from there.
2 Cool Pull Requests for Rust Web App Blueprint
12:52
Jeremy Chone
Рет қаралды 3,9 М.
5 Steps to Learn Rust Programming
25:06
Jeremy Chone
Рет қаралды 8 М.
Who's spending her birthday with Harley Quinn on halloween?#Harley Quinn #joker
01:00
Harley Quinn with the Joker
Рет қаралды 24 МЛН
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 124 МЛН
The US has planned their move to Rust (it's wild)
16:31
Theo - t3․gg
Рет қаралды 115 М.
Rust Error Handling - Best Practices
21:33
Jeremy Chone
Рет қаралды 24 М.
Build with Naz : Rust typestate pattern
1:09:23
developerlife․com
Рет қаралды 1,4 М.
UUID v7 vs. v4 + Rust Programming Examples
19:41
Jeremy Chone
Рет қаралды 16 М.
why rust libraries may never exist.
7:26
Low Level
Рет қаралды 273 М.
Walking Away From JavaScript
1:06:44
ThePrimeTime
Рет қаралды 214 М.
Rust Programming: TypeState Builder Pattern Explained
14:30
Jeremy Chone
Рет қаралды 34 М.
Rust Functions Are Weird (But Be Glad)
19:52
Logan Smith
Рет қаралды 140 М.
Stop Letting AI Code Its Way - Command It with Devai CLI (Any Model)
19:36
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 181 М.