Live data from Hacker News

Gitoxide: Pure Rust Implementation of Git

github.com

121–130 of 200 posts

Re: Gitoxide: Pure Rust Implementation of Git

#121
post #90
post #61

Earlier quoted context omitted.

I just think there is more crucial project to rewrite than git, vim, etc... At this point, it's just falling for the hype. The same thing happenned with go, es6, etc... "X is better than Y because it is written in Z" is not a valid argument. A kernel in Rust? Yes please. A browser in rust? Can't wait. A fork of openssl in rust? Yes yes yes. A cli tool? Why? Is it really necessary? And yes it is a genuine question, no…

I don't think every project has to be a crucial endeavor or a new thing. Let people do things for fun. > A fork of openssl in rust? Yes yes yes. https://github.com/ctz/rustls

I never implied you can't do stuff for fun.

Projects done for fun are not "marketed" as "a replacement for X"

Re: Gitoxide: Pure Rust Implementation of Git

#122
post #6

If you're interested in a step-by-step guide on how to build your own git from scratch, this book is excellent and incredibly educational: https://shop.jcoglan.com/building-git/

Trust me its way easier than you think and there are tons of free resource available you dont need a $36 book to build git.

Re: Gitoxide: Pure Rust Implementation of Git

#123

Earlier quoted context omitted.

Why is it even downvoted? Such a downvote heavy community. Plaudits to all involved.

Complaining about the use of unsafe as a “gotcha” is a common canard used by people who often don’t understand what it means. On HN at least, it’s usually not a substantial criticism.

My comment was neither complaining nor criticising, it was asking. I made this perfectly clear in my edit.

A program can qualify as pure Rust without making use of the safety advantages of the Rust language. It's not unreasonable to wonder how much unsafe code there is in a Rust codebase. It matters.

Rust is better for having unsafe features, but it opens the door to their overuse, and this shouldn't be ignored.

In the SPARK Ada world, there are 'assurance levels' that offer different levels of guarantees. [0] At the 'Silver' level and above, there is a guaranteed absence of runtime errors (such as divide-by-zero, or out-of-bounds array access). Rust doesn't have such a scheme. It seems reasonable to wonder about overuse of unsafe features (as fuzzy as that is), as a very rough approximation.

[0] https://blog.adacore.com/from-ada-to-platinum-spark-a-case-s...

Re: Gitoxide: Pure Rust Implementation of Git

#124
post #4

Earlier quoted context omitted.

From the security perspective, if it is written in C, then it is broken by default and by design - no exceptions. See https://news.ycombinator.com/item?id=24133128 for a recent, very relevant discussion on that topic with multiple examples and a good rationale.

Yea no exceptions in C

Neither in Rust ;)

Re: Gitoxide: Pure Rust Implementation of Git

#125

Earlier quoted context omitted.

> You start building something with Rust and you should be operational quite quickly Rust is anything but easy and simple like Go language. Please try building something like Kubernetes in Rust instead of Go and you will realize “Rust” is a a complicated language (worse than complex). Rust has a steep learning curve and the standard library is quite limited. So you will need to search and choose from different crates…

OT: "Steep learning curve". Can someone give me an intuition that explains the meaning? My understanding is that it means "requires a lot of effort to learn to some degree", but when I see the words "learning curve", I imagine a graph with time on the x-axis and knowlege on the y-axis, and when that curve is steep, that means you acquire a lot of knowledge in a short time. Which is kind of the opposite... Can someone…

Yeah, it's an extremely common misuse of the learning curve concept. From https://en.wikipedia.org/wiki/Learning_curve#%22Steep_learni...

>Arguably, the common English use is due to metaphorical interpretation of the curve as a hill to climb. (A steeper hill is initially hard, while a gentle slope is less strainful, though sometimes rather tedious.

So common, that it's basically become the default interpretation. Kind of like "irregardless". I wonder if there is a name for phrases like this that basically mean the opposite of what the words literally say.

Re: Gitoxide: Pure Rust Implementation of Git

#126
post #83
post #76

Earlier quoted context omitted.

> Rust is anything but easy and simple like Go language. Rust sure isn't "simple" for anyone, but if you are a C/C++ developer, I'd definitely expect someone who's been writing C code for more than a few years to be able to pick up basic Rust in a few weeks. Instead of being threatened by other languages and rationalizing why it's not worth picking up, why not spend a few weeks on it so you can have an informed opini…

I think lifetimes are tripping dragonsh up. Also, C++ is a waaay more quirky and complex language. Can't see why C++'s complexity is fine, but Rust's (lower) complexity isn't.

Yeah I honestly never get these threads. I think perhaps it's C++ veterans that have the language spec memorized, and so they have forgotten that C++ is an absolute minefield and has a much steeper learning curve.

I've been using Rust for 3+ years, and while it has a learning curve wrt lifetimes, it's nowhere near as hard to learn as C++ IMO. I recently tried to pick up C++ (yes, I know, weird to have gone to Rust prior to C++), and I finally just gave up and went back to Rust because nothing works how I would expect it to. There are so many edge cases and weird things you have to know to use C++ effectively.

Also add in the fact that you still need to learn lifetimes in C or C++, except now you are responsible for tracking them rather than the compiler.

Re: Gitoxide: Pure Rust Implementation of Git

#127
post #6

If you're interested in a step-by-step guide on how to build your own git from scratch, this book is excellent and incredibly educational: https://shop.jcoglan.com/building-git/

Trust me its way easier than you think and there are tons of free resource available you dont need a $36 book to build git.

You probably misunderstood: they're not talking about building from source (which is easy), but rather about recreating Git from scratch in another programming language (which is hard).

Re: Gitoxide: Pure Rust Implementation of Git

#128

Earlier quoted context omitted.

You need something with traction. How are you going to rally people to use ada? Where is the ada version of Gitoxide?

> You need something with traction 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/…

Well they are trying to reach FOSS community. Recently they started survey asking community "Hello here, we (AdaCore) have some plan for the future of GNAT Community that we want to share and have your opinion on: https://forms.gle/Q34myTCQUXvrva5n7 " There is Ravenports very good port manager written in ada for FreeBSD so ada can be used for CLI apps and has good gtk binding too

Re: Gitoxide: Pure Rust Implementation of Git

#129
post #68
post #59

Earlier quoted context omitted.

> to the point it may as well have been written in C Mildly disagree. Even if half the code base is unsafe, that's better than a code base where everything is unsafe. Now I only have to audit half the code base for crazy shit, which is about half the effort. A stronger type system means that even in unsafe land, we can still encode some invariants better. I disagree with this notion that "if you're going to have bugs…

In principle I agree, but note that such projects are not created in a vacuum. Someone who goes out of their way to put that much unsafe into the codebase is more likely to commit mistakes that lead to ub than someone who just writes C stuff.

> Someone who goes out of their way to put that much unsafe into the codebase is more likely to commit mistakes that lead to ub than someone who just writes C stuff.

[citation needed]. And it would be hard to find a citation because most Rust codebases don't have much unsafe. The repo you're thinking of was an anomaly and has since improved a lot.

Re: Gitoxide: Pure Rust Implementation of Git

#130
post #19

Earlier 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 would have been more true in 2018 or so but is pretty false now. Many large companies have production systems written in Rust now.
Post reply on HN