Hacker Newsnew | past | comments | ask | show | jobs | submit | sc68cal's commentslogin

So, they implemented a git client in zig, that had some significant speedups for their usecase. However:

> The git CLI test suite consists of 21,329 individual assertions for various git subcommands (that way we can be certain ziggit does suffice as a drop-in replacement for git).

<snip>

> While we only got through part of the overall test suite, that's still the equivalent of a month's worth of straight developer work (again, without sleep or eating factored in).


Wait, so they don’t have test parity with git? How do they know that they, umm … did the actual thing they were trying to do?

I have heard that you can speed up your favorite compression algorithm by 1000x, if you are not so concerned about what happens when you try to decompress it.

Also gotta love the write-only disk as a hardware analogy. Insane write speeds and infinite capacity...

It's just a lossy compression scheme.

I ran the test suite specifically for git's CLI as that was the target I wanted to build towards (Anthropic's C compiler failed to make an operating system since that was never in their original prompts/goals)

The way it gets organized is there are "scripts" which encompass different commands (status, diff, commit, etc) however each of these scripts themselves contain several hundred distinct assertions covering flags and arguments.

The test suite was my way of validating I not only had a feature implemented but also "valid" by git's standards


This is the same as all the folks asking for and hawking quantized models.

It doesn't matter if the parent model is GPT GOD mode mythos opus 100x Ultra. What matters is the performance of the quantized model.


> The bun team has already tested using git's C library and found it to be consistently slower hence resorting to literally executing the git CLI when performing bun install.

I find that to be a much more remarkable claim. Git doesn't have a C library, and even if it did, In which world is literally shelling out faster than a C library call? I suppose libgit2 could be implemented poorly.

If we follow their link[1] we get some clarity. It's an markdown (ai prompt?) file which just states it. Apparently they've "microbenchmarked" creating new git repositories. I really wonder if creating new git repositories is really on their hot path, but whatever.

Where does that claim in that random markdown file come from then? Well apparently, 3 years ago when somebody was "restructuring docs"[2] and just made it up.

I guess there really is a class of "engineers" that the AI can replace.

[1]: https://github.com/oven-sh/bun/blob/3ed4186bc8db8357c670307f... [2]: https://github.com/oven-sh/bun/commit/011e157cac7698050370e2...


libgit2 is not nearly as thoroughly tested as the git CLI is, and it is not actually hard to imagine that calling the git CLI to create new repos is faster than shelling out to a C library.

Your comment does not seem to be in good faith, implying that they've made up the performance difference. There's a comment with a benchmark here: https://github.com/oven-sh/bun/blob/4760d78b325b62ee62d6e47b...

referencing the commit where they removed the ability to link with libgit2 because it was slower.

Having built a service on top of libgit2, I can say that there are plenty of tricky aspects to using the library and I'm not at all surprised that bun found that they had to shell out to the CLI - most people who start building on libgit2 end up doing so.

I don't know what the bun team actually did or have details - but it seems completely plausible to me that they found the CLI faster for creating repositories.


> Your comment does not seem to be in good faith, implying that they've made up the performance difference.

I believe I have accurately represented what the article says. Had the article provided the comment you have just linked, I would have commented on that as well. I did not intend to imply that they manufactured the performance difference, merely that they don't know what they are talking about. The thought I have in my head is that they are incompetent, not that they are malicious.

I wholeheartedly agree that libgit2 is full of footguns, that's why it matters that it's not actually "git's own C library" but a separate project. I also agree that you usually end up shelling out to git, exactly because of those problems libgit2 has. If those problems aren't speed though, and I don't think they are, the blog post would have to cover how this reimplementation of libgit2 avoids those problems.

I'm not here to litigate if bun would be faster with libgit2. I am however here to make the argument that the blogpost does not make a convincing argument for why libgit2 isn't good enough.


I'm actually assured to hear the git CLI is better covered than libgit2 since the CLI test suite is what I used as my "validation" for progress on meeting git's functionality

As for what happened with Bun and libgit2, my best guess honestly is smth to do with zig-c interops but don't doubt there are optimizations everywhere to be done


Bun's attempted to integrate with libgit2 instead of spawning calls to the git CLI and found it to be consistently 3x slower iirc

The micro-benchmarks are for the internal git operations that bun rn delegates to CLI calls. Overall, network time (ie round trip to GitHub and back) is what balances the performance when evaluating `bun install` but there are still places where ziggit has better visible wins like on arm-based Macs https://github.com/hdresearch/ziggit/blob/master/BENCHMARKS....


I don't know what that "BENCHMARKS" document is supposed to show. When I try to replicate their results I'm getting wildly faster executions of standard git, and they don't provide enough details for me to theorize why.

I also noticed that their version of the "blame src/main.zig" command doesn't actually work (it shows all lines as not being committed). Sure, it's easy to optimize an algorithm if you just don't do the work. Git does indeed take longer, but at least it actually gives you a blame of the file.


Only 1.3x speed despite not working lol

Amazing what agents can achieve


Reminds me when I was happy with my algorithm being super fast until I started tackling edge cases. Suddenly it's got quite slow.

Edge cases certainly apply with scripts depending on specific git CLI args or stdout strings may not suffice with ziggit.

_However_, for the use cases that most developers or agents are looking for, ziggit should have enough features covered. Happy to fix issues or bugs if that's not the case


> _However_, for the use cases that most developers or agents are looking for

What use cases are those? How did you determine that these are the use cases most developers/agents are looking for?

For me, git has a ton of features that I rarely use. But when I need them, I really need them. Any replacement that doesn't cover these edge cases is fundamentally incomplete and insufficient, even if it works fine 99% of the time.


I have been struggling with this, myself. I used to push everything to GitHub, but a couple months ago I switched over to using my small low-power home server as a Git host. I used to really enjoy the feeling of pushing commits up to GitHub, and that little dopamine rush hasn't really transferred to my home machine yet.

It's a shame. The people who control the money successfully committed enshittification against open source.


If you're running forgejo you can setup mirrors [1].

Mine syncs a few repos to github to make them public, and planning to add Codeberg in as well ala POSSE [2].

1. https://forgejo.org/docs/next/user/repo-mirror/

2. https://indieweb.org/POSSE


I mean, more around the reluctance to publish any more code publicly since it just gets sucked up by companies to train their models.

My $JOB ended up giving up on GHES and migrating to GHEC because of these exact issues.


As someone who was impacted by GitHub's git outage in late February, which caused us to cancel a feature release, I am more sensitive to the availability of their git service, than their chatbot.


Spamhaus only has this power because administrators opt-in to their service. It is useful, so people use it.


So, because it's a human behavior, that means it's okay that there's a huge company out there amplifying that behavior and profiting off it?


Imagine posting how unions are bad on a Saturday in your leisure time


Imagine not knowing that it was the actions of Henry Ford that increased pay, and pushed the 5 day work week before unions...


Jazzband maintained some incredible Django packages and tools that made it possible for me to build a system at my $JOB that would have been impossible to do on my own. It is a true tragedy of the commons situation where I was expected do more with less, and I didn't have the ability to contribute back/donate anywhere near the value that these projects provided to $JOB or myself. I did contribute personally, but it's very clear how all of this value has been extracted and used by large companies to build higher and higher walls for themselves, and none of the people that actually make any of this work get more than crumbs.


By this point, this take is old to the point of being tiresome. People should get what the deal is with open-source maintainership at this point. They should’ve gotten it back when Jazzband started. Nothing has changed since then. If you don’t want big companies using your stuff and not pay for it, don’t publish OSS. If you have some expectation that Google is going to write you a fat check, put it in the license—even if it’s practically unenforceable, it’s loads more than what 99% of OSS projects do right now. If people go into OSS maintainer positions expecting anything other than what has time and time again happened…it’s like that little comic of the guy poking a stick into his bike wheel spokes and falling over. The implication that OSS maintainers get nothing for their time is also laughable. If you were doing it for the money you wouldn’t be doing it in the first place. If they actually cared about making the world a better place and wanted to volunteer their time toward it they should go donate down at the soup kitchen. The reality is not everyone is so financially focused, but that shouldn’t be mistaken for altruism. It’s more that some people get their rocks off through other means. The reality is that OSS maintainers often find that they’re more financially focused than they thought they were—the novelty of their code running at Google wears off, the novelty of microcelebrity wears off, etc—and they get tired of it.


It was an insane mistake to disdain the GPL.


I think this reveals a great deal about the thinking of the ruling elites.

The K shaped recovery phenomenon demonstrated that the economy can continue to thrive, when consumption by the lowest earners is replaced and concentrated by earners at the top. This demonstrated to the elites that actually, we don't need as many consumers to grow the economy, and that it's possible to redistribute wealth upward without losing growth.

These public comments just show that the elites are more and more comfortable making it explicit that there are too many "useless eaters" in their opinion, and that the change has been from considering just the Third World to be where these "useless eaters" are while still preserving an imperial core, to now considering everyone that isn't them, regardless of First or Third world, to be a useless eater.

Very dangerous thinking, but at least it's out in the open now.

They want to capture the entire value of everyone's labor and hoard it for themselves, and discard the people that produced it.


The importer pays the tax and passes it on as higher prices to the consumer. So the importers are the one that had the tax collected from them and would be getting the refund.

The importer CAN be the seller, but other times the importer is a middleman in the supply chain.


To the CPAs among us: will the refunded import taxes be treated as extra profit for all the importers who paid them?

I could see an argument that they don't have a legal obligation to pass the refunds on to their customers, any more than my local grocery store owes me 5 cents for the gallon of milk I bought last year if the store discovers that their wholesaler had been mistakenly overcharging them.


The idea of getting a refund for mischaracterized tariffs is actually fairly common (it's called a duty drawback and there's a cottage industry around this). It's generally used when an importer incorrectly categorized their import under an HS code that has a higher duty than the correctly categorized HS code.

The difference this time is the scale is orders of magnitude larger. Will be interesting to see how they (importers and CBP) work through this.


A regular importer who routinely pays customs duties is now owed money by Customs and Border Protection. Can they now set off future duties against the balance owed them? Normally, reciprocal debt cancellation is legal.

The U.S. Treasury has a whole system for this, but in the other direction. If the government owes you money, and you owe the government money, the Treasury will deduct what you owe from whatever they are paying out.[1] But they're not set up for that in the other direction.

[1] https://www.fiscal.treasury.gov/TOP/


Smart money is that they will make some token comment about "leave it up to the states" or lower courts and then do absolutely nothing about it


The feds are the ones that control import duties, not the states. The courts will decide two years from now what to do.


I get how it works, I’m mostly talking about the how admin will spin it/shirk responsibility


> The difference this time is the scale is orders of magnitude larger.

The administration will just do nothing. They need 3 maneuvers for this to drag out longer than Trump 2.

There is no intention to follow the law here.


I wager he’ll:

1. Claim to refund the money to each taxpayer with a Trump-signed check.

2. The number of checks will not total $200 B. Any reporting to the contrary will take up space from the truth about Epstein.

3. Before 2028, a loyal SuperPAC will form with hundreds of billions in dark money.


"…refund the money to each taxpayer…"

I've got receipts.

Literally. I have receipts for hundreds of dollars where the tariff is itemized (from JLCPCB, etc.)


I got charged a $600 tariff from UPS to ship a $30 25-pound sandbag into the US from Canada.

UPS didn't even deliver the product.

I'm suing them in small claims.

We'll see what happens.

I imagine that even after the ruling, our ass backwards legal system will somehow say this makes sense, even though the tariff rate was never near high enough for that bill to make any sense.

Further, they're going to get refunded the $10 it MIGHT have cost them.


> 25-pound sandbag into the US from Canada.

It's not the point, but why were you doing this? Surely internationally shipping a sack of sand is more painful than getting a local one?


This could just be across the border.


> just be across the border.

It was interesting to see shops in the border towns of south & south east Switzerland buying & selling products from Italy, a relatively cheaper market.


I mean, when I was young we lived in Poland right next to the border with Slovakia and we'd drive over once a week for groceries and to buy fuel because it was just so much cheaper over there. Nowadays it's the reverse since they got the Euro - most Polish shops near the border cater to Slovakian shoppers and even accept Euro for payment.


> even accept Euro for payment.

Pre Brexit, I encounter a shop that did this in London and was surprised.

Having just been over there again, it's not hard to be entirely cashless, so the convenience isn’t missed.

Italians seem to like dealing in cash, with various taxis and hotels being cheaper if you pay cash. I guess that means it’s off the books?


American here. My experience is that the US dollar seems to be accepted in tons of stores in countries all over in the Americas Europe and Asia. Trade is trade it seems.


Huh? In what world was the tariff on sand 2000%?


It wasn't the tariff. UPS has been tacking on a ridiculously high paperwork fee for the service of processing tariff payments. Other shipping companies have also had fees, but UPS is the main one that's made it exorbitant and disproportionately higher than the tariff itself.


I'm thinking the delivery agents such as UPS, Fedex, USPS now need to sue the United States so they can pay back all the recipients the fees they charged, plus interest.

There are going to be a raft of class action suits based on this.

As one of my lawyers once said, the only winners here are the lawyers.


“ As one of my lawyers once said, the only winners here are the lawyers.”

Congress is full of lawyers do it’s pretty natural that they make rules that favor lawyers.


I suspect that my recent experience confirms this. Our daughter shipped two suitcases home from the UK, paying some local company for "door-to-door" delivery. They contracted with UPS who demanded an additional $32 when the first bag showed up. For the second she paid the same fee online so they wouldn't require a check at the door.


That's a great question. I would also love to know that answer. I agree with you that they're not going to share the refund if the importer was the middleman in the supply chain, and same thing if the importer was also the seller.


There is a 1099 specifically for money received from the government.

https://www.irs.gov/forms-pubs/about-form-1099-g


I think the tax is basically on the profit made when you add up costs and expenses. Say:

Before: Importer pays China $10 for widget, pays $2 duty, sells to shop for $12 - profit zero, tax on that zero.

Now: Paid $10 for widget. Paid $2 duty, sold for $12, $2 refunded - profit $2, pays tax on the $2.

At least that's the normal way of doing accounting. There can be odd exceptions and complications in local laws.


Yes, I think that's the starting point. Another part of my question was whether a CPA applying GAAP would recommend recognizing the $2 as other income, or else as a liability against a future claim from the customer who bought the widget and is now seeking a partial refund.

I did what passes for research these days and concluded that if the claim is "probable and estimable," then it could be recorded as a "contingent liability" rather than other income. Relevant facts would include whether the tariff refund included a pass-through refund mandate (unlikely with this administration), or whether class actions for refunds against merchants were pending (inevitable).


I imagine the government will provide some sort of guidance for that kind of stuff?


Related question, unanswerable except maybe as a rough estimate: how much will it cost, in accountant/bookkeeper time, to do all the administrivia required to process all these refunds?


It depends on the terms of the transaction. Most business-to-business transactions would have the importer responsible for duties, but many, maybe the majority of business-to-consumer transactions have taxes & duties covered by the exporter and included in the final price which would typically reflect the additional taxes & duties in the prices. In those case, the exporter would be the one refunded.


at the end of the day, it's average joe who bought his things more expensive, and he won't get back his money.

That's what matters, don't care if it's the seller or a middleman that gets this money.

That's really a shame for american citizens, i'd be furious if i was american.


Many are beyond furious


Many voted for this


Very few people voted for tariffs, specifically. They voted for a promise of a return to a world where they were on top.


> They voted for a promise of a return to a world where they were on top.

Very few were on top during The Gilded Age and it has been EXTREMELY clear for quite a long time now that the "Great" in M.A.G.A. is a reference to the 1880s, not the 1950s.


Where THEY were on top. Trump voting men wanted the world where they can rule over women. Trump voting whites voted to be over minorities. Trump voting christians want their religious state.

And so on and so forth. In each case, vote for Trump was to harm someone you look down at and to dominate over another group.


Begging for a 12h day of work every morning on the docks as a stevedore in crowds among hundreds of other men begging for the same job does not give one power to "rule over women".

They'd be too underpaid and exhausted to rule over their own dinner before falling asleep for the night.


No they absolutely did. Trump promised tariffs on multiple occasions: https://www.export.org.uk/insights/trade-news/us-presidentia...

When you vote, you vote for an entire platform and you especially vote for central campaign promises. You don’t get to say “I voted for a world where I’m on top” and then say “but not for the primary method the candidate promised to use!”


tariff were promised and implemented by Trump in his first mandate too, if you voted for him, you mostly voted for America Great Again Through Tariffs.

After the liberation day tariffs were announced, 34% of the people thought they were good.

https://www.kansascity.com/news/nation-world/national/articl...


Project 2025 was publicly available prior to the election. Tariffs were one of the many policies within the larger plan. If you voted for Trump you are responsible for the Tariffs, this is not a hoodwink where Trump rug pulled everyone after getting elected — it was literally there in the open.


Even beyond/disregarding Project 2025, tariffs were a well-known part of the GOP platform in 2024; it was even included and discussed at the Presidential Debate. The Harris platform even called it a tax at that time, to attempt to make it quite clear to the voter who, in the end, would bear the cost, and the Trump platform equivocated on who would pay the tax to distract from that Harris was right.

Even if you knew nothing of Project 2025 (somehow), you were warned.


On top you have news outlets and educated people not being clear what they are. See from the article:

He has long argued tariffs boost American manufacturing - but many in the business community, as well as Trump's political adversaries, say the costs are passed on to consumers

It’s reported as if someone still needs to figure out who pays the tariffs in the end. I’m aware that tariffs are a lever to potential move buying behavior and give incentives to move production locally. But in this instance and how it’s/ was implemented it’s clear who is the paying for it.


“ Even beyond/disregarding Project 2025, tariffs were a well-known part of the GOP platform in 2024;”

The tariff stuff is just a variation of the republican dream to replace income tax with a sales tax. Big tax cut for higher incomes while raising taxes for lower incomes.


Trump believed that Obama was a secret Muslim infiltrate sent to destroy America because he's black, that's what they voted for. Racism.

The rest of it was just gravy.


The problem is USA doesn't get good choices. Given the choice between a walking corpse and trump, they choose the corpse. Given the choice between a woman and trump, they choose trump.


Care to elaborate why a person is a bad choice because she is a women? Especially compared to someone who shits his own pants in the public?


I think there is a language barrier issue here.


I assume they were suggesting that to those that voted for Trump they saw a woman as the worse choice. Perhaps as well when Hillary Clinton ran against him.


This is loony, all these guys knew eachother for years before and have cordial if nor friendly relationships. The Clintons, Trump, Bushes, Obamas, etc.


In 2016 65% of Trump supporters believed Obama was secretly Muslim. [0]

Trump claimed that Obama was "the founder of Isis" and claimed MANY times that he was not born in the United States. [1]

So yes, he is completely loony... and very blatantly a racist who sends dogwhistles to other racists regularly.

No, he is not friends with Obama or Biden. In fact, Trump is the first president in 150 years to refuse to attend the inauguration of his competitor after losing. [2]

[0] https://en.wikipedia.org/wiki/Barack_Obama_religion_conspira...

[1] https://x.com/realDonaldTrump/status/508194635270062080

[2] https://www.whitehousehistory.org/photos/notably-absent-pres...


These people are not necessary against tariff, they are against paying more for their stuff and having it benefit some middleman because the current government messed up badly.

I can otherwise understand how people would agree on paying more for their stuff if it allows their fellow citizens to have a job.


[flagged]


There are many reasonable ideas for import taxation. But what you describe was not what happened. China fought back with their own tariffs, and you may well have paid less import tax on your Temu knock-offs than you did for some widget made with both higher environmental and labor standards in some western European country.


You are pro thoughtless tariffs against every random country, because of temu ads?


Don’t panic too much yet, there are other legal bases for the tariffs.

We’ll see…


Check Truth Social, many are livid that the tariffs were found illegal. A lot of supporters of the current government prefer to pay higher prices for goods.


(I'll just take your word for it.)


It's like a car crash, I have to rubberneck it sometimes for my own morbid curiosity.


So they basically figured out how to bribe all these companies?

Such a kleptocracy.


i read that Costco could actually refund everyone, as they can know exactly who bought what.

If they do, that's another matter, but they definitely can.


> The importer pays the tax and passes it on as higher prices to the consumer.

So it matters how we’re interpreting “paying”. One way to look at it is that if the cost was passed on to the consumer, the consumer paid it. The importer simply handed over the money.


and if so, do you really believe any importers who paid the tariff will further refund back to the consumer ? It's eventually a net win for the importer.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: