Live data from Hacker News

Gitoxide: Pure Rust Implementation of Git

github.com

111–120 of 200 posts

Re: Gitoxide: Pure Rust Implementation of Git

#111

Earlier quoted context omitted.

Sure. Do you have any arguments why it isn't broken and go against the arguments linked in the related HN discussion? Is CPython in some way immune to overflows, use-after-free, double freeing, and so on? How much of CPython is actually implemented in C, and how much in itself and/or in Python?

is any rust code some way immune to unsafe blocks?

That's a little different. If you're running a C linter that statically guarantees safety, then it's comparable; otherwise, you're comparing mostly Safe Rust (with some Unsafe Rust in it) to Unsafe C.

Safe Rust is automatically immune to lots of these issues. Unsafe Rust isn't, but all of C is unsafe (unless you're using a safety-enforcing linter that only gives you access to a subset of the language).

Re: Gitoxide: Pure Rust Implementation of Git

#112
post #3
post #2

Why do people feel the need to reimplement everything in Rust ? If it's not broken, don't fix it...

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…

Honestly I used to find the "rust evgangelism strike force" obnoxious and naive, but man, after reading this thread and seeing all these brand new accounts that seemingly have nothing to do but complain because someone used Rust in a neat project, I'm honestly starting to think their attitude is 10x more obnoxious.

Re: Gitoxide: Pure Rust Implementation of Git

#113
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

...have an upvote.

Re: Gitoxide: Pure Rust Implementation of Git

#114

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.

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.

Re: Gitoxide: Pure Rust Implementation of Git

#115

Earlier quoted context omitted.

I'm currently using https://github.com/rust-lang/git2-rs to interact with git in my software. Are you aiming to have a stable api that could act as a pure-rust replacement for that at some point in the future?

Absolutely! My plan is to proclaim a version 1.0 once the basic workflow of clone-commit-push can be performed, which should be enough for many to start using it. From that point on, the API should remain stable, following semantic versioning as usual. It is my hope that the quality and stability will be high enough to convince people [in the Rust ecosystem] to move away from libgit2 and instead contribute to the mai…

This sounds great, I added support for signing git commit's in git2-rs and would be happy to try to do something similar in gitoxide if I start to use it.

Re: Gitoxide: Pure Rust Implementation of Git

#116
post #62

Earlier quoted context omitted.

Are you a C programmer threatened by the emergence of a C competitor? I have nothing to gain by "promoting" Rust as I'm not a Rust dev. You have commented a lot in these threads to complain about Rust. If I'm right remember that both your self worth and your employability are ultimately not tied to C. Programmers switching programming languages are not life long miners that have to turn overnight into lawyers. You st…

> 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…

> Please try building something like Kubernetes in Rust instead of Go

At this point, it's clear that you are simply trolling, because Kubernetes is a well known counter example against Go: the lack of features was so blatant they had to design their own generics system as a preprocessing step.

Re: Gitoxide: Pure Rust Implementation of Git

#117

Earlier quoted context omitted.

I imagine there are different motivations for different people. Some people may just want to use rust to re-implement something that exists in order to hone their skills or just for fun. Having a reference implementation makes that more productive. Other people may think that it would simply be better if the project were implemented in rust. This is the case for some C projects, where a lot of control is still necess…

> or me, rust is the first real competitor in the systems programming market. What about julia or go?

Julia is positioned well to be a powerful high performance language in a niche market, that of scientific simulation, due to is reliance on long running. It also doesn't consistently match C benchmarks last I checked, "only" getting within a factor of 2 or 3. For a pythonlike language its very impressive and powerful, but its main competitive power is as a higher performance replacement for Matlab or mathy python.

Re: Gitoxide: Pure Rust Implementation of Git

#118

Earlier quoted context omitted.

> or me, rust is the first real competitor in the systems programming market. What about julia or go?

> Julia is dynamically typed

Its gradually typed, and compiles down to typed code with LLVM on first run. So after a warmup (which can be cached) its effectively static for purposes of performance.

Re: Gitoxide: Pure Rust Implementation of Git

#119

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.

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

Because pure-rust, as in, not relying on bindings to external git libraries is independent from using "unsafe" in the code. For me the question is misguided.

There are reasons to prefer a pure-rust code, even if the whole crate was unsafe.

Re: Gitoxide: Pure Rust Implementation of Git

#120

Does this address the cryptic-ness of git commands? E.g. are the various commands we all know and love like `git reset HEAD`, `git co --track origin/branch` etc. made clearer? Even after years of using git, this is for me a major pain point.

I'd be interested to know what, according to you, are the worst part of git commands (I'm currently trying to figure out a better CLI on top of libgit2).
Post reply on HN