Live data from Hacker News

Grit: Rewriting Git in Rust with agents

blog.gitbutler.com

61–70 of 318 posts

Re: Grit: Rewriting Git in Rust with agents

#61
post #49
post #25

This is coming from a cofounder at github, someone who probably knows precisely what the GPL is for. Whatever the legal merits, building on a GPL3 project's complete test suite and relicensing under MIT is not acting in good faith toward the original authors. I really find it disgusting and it makes me want to avoid gitbutler entirely.

I think you're saying that you don't believe in the freedoms to use the GPL licensed test suite for certain purposes which are explicitly allowed by the GPL. You don't get to choose a license and then add extra terms to it when you don't feel like it's up to scratch. That's something explicitly not allowed by the GPL license.

Where does the GPL say you have the freedom to relicense code or derivatives under MIT by fiat?

Isn’t having to stay under the GPL a very big part of the GPL license?

Re: Grit: Rewriting Git in Rust with agents

#62
post #2

> the result is Grit, a from-scratch, library-based, memory-safe, idiomatic Rust reimplentation of Git that passes over 99% of the entire Git test suite. Why not 100%? > It's not actually passing every single test, though that is on purpose. I did mark some parts of the testing suite as "skipped" because I don't think it's worth recreating them in a library like this > 41,715 / 42,001 tests passing (99.3%) So it is n…

The author actually estimated $10-$15,000 worth of tokens.

Re: Grit: Rewriting Git in Rust with agents

#63
post #34
post #30

Earlier quoted context omitted.

Yeah I got one, why? You aren't learning anything, you are just copying code from other codebases and smashing it together to make some nginx-rust thingie... for what actual goal?

Well the biggest goal was to be useful. Nginx serves ~20% of the web, memory unsafe languages might just become untractable for critical exposed to the web infra if the rate of critical CVE's on these rises faster than they can be patched, so a drop in replacement would be a big deal in that world. But in terms of learning I'm learning relatively little about how to type Rust into an editor but a lot about how to set…

> Nginx serves ~20% of the web, memory unsafe languages might just become untractable for critical exposed to the web infra if the rate of critical CVE's on these rises faster than they can be patched

That is true, however did you actually do any research into nginx? Is it particularly prone to memory bugs?

I honestly don't know the answer but you seem to be coming from a place of C bad, therefore nginx super vulnerable?

In my experience with other web servers the vast majority of security bugs are string handling related (path/header injection), which your rewrite will not protect you from.

Re: Grit: Rewriting Git in Rust with agents

#64

I guess software licenses are meaningless now since anyone can decide their llm clone is not derivative.

Currently some act like it is fine to translate a project and change the license.

Recently Casey Muratori said in a adjacent context that the microsoft AI push may be related to the fact that they have a long standing and elaborate codebase. A large historic software company could have advantages to train models. They could provide extra value with their IP.

Now their IP is potentially in their models and accessible to anyone. If they actually train models on their IP, anyone could implement their APIs and slap a GPL license on it.

At that point, things will get very interesting.

Re: Grit: Rewriting Git in Rust with agents

#65
post #56

> A pretty fun experiment and I think we can shape this into something truly useful to the whole community. Agree with first half of this sentence, we should all have fun with experiments. > It was never based on a linkable and reentrant library, but instead on a "Unix" philosophy of chaining together simpler commands, which means that it's difficult to use it in long running processes without fork/exec overhead for…

Isn’t git already just an interface over libgit? How is that different?

Git is famously not built around a (reusable) library, hence why we have things like libgit2 (unrelated to git) and why any porcelain on top of git has to resort to calling the binary and parsing its text output.

Re: Grit: Rewriting Git in Rust with agents

#66
post #61
post #49

Earlier quoted context omitted.

I think you're saying that you don't believe in the freedoms to use the GPL licensed test suite for certain purposes which are explicitly allowed by the GPL. You don't get to choose a license and then add extra terms to it when you don't feel like it's up to scratch. That's something explicitly not allowed by the GPL license.

Where does the GPL say you have the freedom to relicense code or derivatives under MIT by fiat? Isn’t having to stay under the GPL a very big part of the GPL license?

> Where does the GPL say you have the freedom to relicense code or derivatives under MIT by fiat?

The first part of this sentence (where in the GPL) is unreached if the second part of it is unmet (relicense code or derivatives) which I contend it likely is. You're begging the question.

However:

> The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work

earlier:

> A “covered work” means either the unmodified Program or a work based on the Program.

It's that element that would be difficult to prove "work based on the Program"

Re: Grit: Rewriting Git in Rust with agents

#67
post #63
post #34

Earlier quoted context omitted.

Well the biggest goal was to be useful. Nginx serves ~20% of the web, memory unsafe languages might just become untractable for critical exposed to the web infra if the rate of critical CVE's on these rises faster than they can be patched, so a drop in replacement would be a big deal in that world. But in terms of learning I'm learning relatively little about how to type Rust into an editor but a lot about how to set…

> Nginx serves ~20% of the web, memory unsafe languages might just become untractable for critical exposed to the web infra if the rate of critical CVE's on these rises faster than they can be patched That is true, however did you actually do any research into nginx? Is it particularly prone to memory bugs? I honestly don't know the answer but you seem to be coming from a place of C bad, therefore nginx super vulnera…

https://securityaffairs.com/192132/hacking/nginx-rift-an-18-...

The project was inspired by that. Also unlike most other projects, nginx is directly exposed to the internet often times which makes it more vulnerable than i.e. Redis/ Valkey or something that would be running within a companies network generally.

"C Bad" is a bit reductionist... but I think there is some truth to the take " Until you have the evidence, don’t bother with hypothetical notions that someone can write 10 million lines of C without ubiquitious memory-unsafety vulnerabilities – it’s just Flat Earth Theory for software engineers" [1]

NSA and other government orgs are also pushing people to stop using C [2] for important software.

[1]. https://alexgaynor.net/2020/may/27/science-on-memory-unsafet... [2]. https://linuxsecurity.com/news/government/nsa-s-plea-stop-us...

Re: Grit: Rewriting Git in Rust with agents

#68
post #34

Earlier quoted context omitted.

Well the biggest goal was to be useful. Nginx serves ~20% of the web, memory unsafe languages might just become untractable for critical exposed to the web infra if the rate of critical CVE's on these rises faster than they can be patched, so a drop in replacement would be a big deal in that world. But in terms of learning I'm learning relatively little about how to type Rust into an editor but a lot about how to set…

You mean you rewrote the nginx test suite with smaller leaner tests ? How did you bootstrap that ? How do you know the leaner tests are equivalent to the real ones ?

Here is an example https://github.com/ianm199/nginx-rs-port/blob/main/crates/ng...

Basically I use these "kits" to prove that the behavior is working as expected with mocked data/ interfaces and then only after these kits pass I'll run the real test suite files as confirmation. So these let you iterate a lot faster than the official test suite because it is very slow.

These are bootstrapped from the real tests.

The other commenter was being a bit dismissive but this is the kind of thing I'm taking away as a real useful pattern to do verification of behavior at scale.

Re: Grit: Rewriting Git in Rust with agents

#70
post #53
post #6

I'd be really interested in the opposite, just for the sake of experimentation since that's what these projects mostly are. They all seem to be rewrites for the sake of "performance", because the cost is now lower bc of AI. I'd be interested to see something like a port of Quake III in Python or Kubernetes in Perl, even Rails in Python would be goofy and really fun to see

> They all seem to be rewrites for the sake of "performance". And yet this performs dramatically worse. A slower, untested, incomplete git implementation, all for the low low price of $10-$15,000. And don’t forget it wasted a bunch of human time in the process. So if someone mentioned somewhere else there is already a Rust port a group is doing somewhere. How much could they have accomplished with this much money and…

But... it's memory safe. Not that git has any important memory issue, but now people with skill issues in C can contribute to it without breaking stuff.
Post reply on HN