Live data from Hacker News

Gitoxide: Pure Rust Implementation of Git

github.com

61–70 of 200 posts

Re: Gitoxide: Pure Rust Implementation of Git

#61
post #15

Earlier 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!

Since the top subthread comment has been predictably flagged by the clique: Rewriting is easier than doing original work. If you manage to get people to use "your" new Rust project, you get a huge payoff for comparatively little work with lots of plagiarizing.

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, not some random rant.

Re: Gitoxide: Pure Rust Implementation of Git

#62
post #35

Earlier quoted context omitted.

> Not sure what is meant by pure, probably another way of marketing to Rust aficionados. "Pure" is not some Rust marketing ploy :-) It's a pretty established term meaning "written only with". I've seen pure Python, pure PHP, pure JavaScript, etc libraries and apps. It generally means you don't need another compiler to build or you don't need to know another language to contribute or fix things for yourself.

Rust market itself as replacement for C/C++ and proclaims as if all code written in C/C++ is garbage and only Rust can solve it, when majority of it's own useful crates heavily rely on unsafe "C/C++" code. So "Pure Rust" is also marketing when you look at the crates used by this software are not Pure Rust, but rely on unsafe code of C underneath. Python, PHP do not claim as C/C++ replacement, indeed Python is synonym…

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 start building something with Rust and you should be operational quite quickly, most of your skills transfer over.

Re: Gitoxide: Pure Rust Implementation of Git

#64
post #53

Earlier quoted context omitted.

Ok, so CPython is broken by default and by design. Yes Sir, understood sir, no exceptions, sir!

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?

Why should we care about arguments in a random HN discussion? We should care about arguments from people who have done substantial work.

Totals grouped by language (dominant language first):

  python:      578880 (54.33%)
  ansic:       475310 (44.61%)
  sh:            4073 (0.38%)
  cpp:           3847 (0.36%)
  asm:           1486 (0.14%)
  objc:           761 (0.07%)
  lisp:           502 (0.05%)
  pascal:         353 (0.03%)
  xml:            308 (0.03%)
  csh:             21 (0.00%)

Most of pure Python is in the stdlib.

Re: Gitoxide: Pure Rust Implementation of Git

#65
post #55

Earlier quoted context omitted.

Better do not use Lisp, since the interpreters have at least around 10% C.

They're compilers, not interpreters - or at least SBCL, CCL, ABCL, ECL, Clasp, CLISP, ABCL, and LispWorks are. I'm not aware of any other alive contemporary Common Lisp implementations. Lisp is a memory-safe language with automatic memory management, which removes all of the aforementioned classes of attacks that are available in C. In addition, the Lisp compilers are written in Lisp itself, not in C, which further d…

CCL:

Totals grouped by language (dominant language first):

  lisp:        336793 (84.60%)
  asm:          30410 (7.64%)
  ansic:        29862 (7.50%)
  sh:             718 (0.18%)
  objc:           299 (0.08%)
  java:             7 (0.00%)

> Lisp is a memory-safe language with automatic memory management, which removes all of the aforementioned classes of attacks that are available in C.

Yeah, right.

Re: Gitoxide: Pure Rust Implementation of Git

#67
post #61

Earlier quoted context omitted.

Since the top subthread comment has been predictably flagged by the clique: Rewriting is easier than doing original work. If you manage to get people to use "your" new Rust project, you get a huge payoff for comparatively little work with lots of plagiarizing.

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…

[deleted]

Re: Gitoxide: Pure Rust Implementation of Git

#68
post #59

Earlier quoted context omitted.

Good to hear. It's important to ask though. 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.

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

Re: Gitoxide: Pure Rust Implementation of Git

#70

I am the author, and will be here for a few hours in case there are any questions. (proof: https://keybase.io/byronbates )

How does gitoxide perform compared to c-git? A slow operation I often encounter is `git log --graph` for example.

Unfortunately I can't yet tell, as the corresponding code does not yet exist. Object and pack lookup is competitively fast so I would hope that translates well to everyday operations like that.

Actual numbers for what's there, pack access and traversal, can be found here: https://github.com/Byron/gitoxide/issues/1 and here: https://github.com/Byron/gitoxide/issues/5

Post reply on HN