How much use of unsafe is there? 'Pure Rust' counts for little if the code overuses Rust's unsafe features. edit This was a sincere question. I'm glad the answer turned out to be that there's very little of it.
Gitoxide: Pure Rust Implementation of Git
41–50 of 200 posts
Re: Gitoxide: Pure Rust Implementation of Git
#42Re: Gitoxide: Pure Rust Implementation of Git
#43How much use of unsafe is there? 'Pure Rust' counts for little if the code overuses Rust's unsafe features. edit This was a sincere question. I'm glad the answer turned out to be that there's very little of it.
rg "unsafe " | wc -l tells me there are 19 occurences, for about 13.7k lines of Rust in total. So it's not a lot.
There was an HN discussion a few months back on a Rust program that overused the unsafe features, to the point it may as well have been written in C. Sure enough, it turned out to be full of nasty bugs.
Re: Gitoxide: Pure Rust Implementation of Git
#44Earlier quoted context omitted.
Because it is a interesting excercise to reimplement something great in a new interesting language you wanna test drive? Why are people writing new programming languages? After all we already have some. Sometimes you do it for fun and frivolity, sometimes because you think you can do better, sometimes because you are addressing real tangible issues with the old way of doing things and often a combination of the three…
Reimplementation relying on unsafe ‘C/C++’ code (as most of the core infrastructure is written in them) is done more for marketing especially among language aficionados. Hope someone from Rust community can write something which can match some of the core software written in Go language, which has already proven its usefulness and quality in writing systems programs in networking and system infrastructure areas. C/C+…
I'm not talking about this project in particular. More about what will happen to the general C ecosystem.
Re: Gitoxide: Pure Rust Implementation of Git
#45Earlier quoted context omitted.
What did you expect instead from "pure rust"?
Not sure what is meant by pure, probably another way of marketing to Rust aficionados. It uses crates which still rely on unsafe ‘C’ code to interact with operating system for interacting with files and file related OS calls. It will be nice instead of proclaiming Rust as “C” replacement it should have positioned as “A language complementing C/C++ to write safe code”. Recently Servo project is abandoned by Mozilla fo…
This was what Mozilla hoped to do with it. But the teams at Google, Facebook, Amazon, Microsoft, Dropbox, Cloudlfare, fastly and others using Rust have different objectives. At this point, Firefox's success and Rust's success are decoupled.
Re: Gitoxide: Pure Rust Implementation of Git
#46Earlier quoted context omitted.
What did you expect instead from "pure rust"?
Not sure what is meant by pure, probably another way of marketing to Rust aficionados. It uses crates which still rely on unsafe ‘C’ code to interact with operating system for interacting with files and file related OS calls. It will be nice instead of proclaiming Rust as “C” replacement it should have positioned as “A language complementing C/C++ to write safe code”. Recently Servo project is abandoned by Mozilla fo…
Re: Gitoxide: Pure Rust Implementation of Git
#47Earlier quoted context omitted.
As a Lisp programmer, I don't dunk on everything that is not Rust; I instead dunk on everything that is C. The extensive use of this language has brought us countless pain via stack overflows, buffer overflows, memory corruption, and multiple other vulnerabilities that are literally baked into the language model. Dropping C for any sane alternative will be a massive boon.
I think ada can be good contender for C replacement
Re: Gitoxide: Pure Rust Implementation of Git
#48Earlier quoted context omitted.
I really don't understand the hate towards every language that is not Rust. Rust provide you tools to avoid many security issues. But that does not mean everything that hasn't been written in Rust is broken by default. You still have "unsafe" in Rust, so is it broken by default and design and we should throw away the language ? Obviously not!
The hate is not towards every language that is Rust, it's against C, at least in this thread. I haven't seen anyone arguing against Python or Java in a Rust thread. Memory-managed languages are already at the memory safety levels comparable to Rust's borrow checker.
More specifically, I hope, C++. I like to think of asm, C, and Rust as a trio. C isn't "better" than asm; it just doesn't make sense to use asm when C does the job. And it doesn't make sense to use C when Rust does the job.
C++ is where, in almost all scenarios, I draw the line and say, this would be probably be better if new code is written in Rust.
Re: Gitoxide: Pure Rust Implementation of Git
#49Even after years of using git, this is for me a major pain point.
Re: Gitoxide: Pure Rust Implementation of Git
#50Earlier quoted context omitted.
I think ada can be good contender for C replacement
You need something with traction. How are you going to rally people to use ada? Where is the ada version of Gitoxide?
No language has traction, until it does.
It would be fair to point out though that Ada has had decades to catch on and replace C, but it hasn't done so, except in certain narrow areas of highly critical embedded software development in aviation and military applications. My understanding is that it's not easy to work with for 'general purpose' work (command-line applications on GNU/Linux), as it lacks mature bindings.
I think it's fair to say Ada failed to truly embrace Free and Open Source software. A pity, in my opinion.