Live data from Hacker News

If I could make my own GitHub

matduggan.com

41–50 of 160 posts

Re: If I could make my own GitHub

#41
> 1. Stuff happens in the wrong order. […] You don't want the feedback loop after the commit you want it before. Let me do an enforced pre-commit hook to run the jobs remotely on the forge and provide the feedback to the user before they push.

My approach is to utilize https://pre-commit.com/ to have all checks available to run locally during commit (or push), but leave it to contributors whether they want to run it or not. If they don't, the checks still run on the forge after pushing. The upside of this approach is that it still allows contributors to commit without internet access or the forge being down.

> 3. PRs are too inflexible. I don't need 4 eyes on every change, especially in a universe where LLMs exist. The global GDP lost annually to senior engineers staring at a four-line PR waiting for someone — anyone — to type 'LGTM' could fund a moon mission.

Well, that's possible with Github and is just a matter how permissions to merge PRs are configured. Just let every contributor merge changes without explicit approval. And if you want LLM approval, make that a Github Action with mandatory success for merging.

> 4. Stacked PRs are just better. […]

Seems like Github is working on this: https://github.github.com/gh-stack/

> 8. On the flip side, since I need to be online all the time to really work with a team […]

Sure, for communication you need internet access, but working on code can be much more efficient if you can do so without relying on internet access and the forge being available.

I'd even argue working on issues and reviewing PRs should be available entirely offline too with just the state getting synced whenever internet connectivity to the forge is available.

Re: If I could make my own GitHub

#42

> Stuff happens in the wrong order. You know the PR. Commit 1: 'Feature.' Commit 2: 'fix.' Commit 3: 'fix.' Commit 4: 'actually fix.' Commit 5: 'please.' Commit 6, made at 11:47 PM on a Thursday: 'asdfasdf'. This person has a family. This person has hobbies. This person is, at this moment, crying. You don't want the feedback loop after the commit you want it before. Let me do an enforced pre-commit hook to run the jo…

> you can just run the tests on the local machine, and you should be running them as part of your workflow. aren't you describing why you'd want a pre-commit for this? you do not have to remember to do so, and new people do not need to learn it.

There are different workflows. I sometimes commit code that does not compile, so that I have a checkpoint. Or because it’s 16:59 and I want to leave the office (and I want to protect the code I wrote from hardware failure). I’d be annoyed if any pre-commit checks took more than 2-3 minutes, and for most projects, that is not enough to build and run any meaningful tests (especially remotely).

Re: If I could make my own GitHub

#43
post #11

Earlier quoted context omitted.

Honestly, something like Radical seems a lot more seamless and complete. Or at the very least, I'm wary of Tangled's alpha tag.

Between Radicle, Tangled and Grasp, Radicle feels the coolest to me, emotionally, local first, p2p, for whatever reason it feels kind of nostalgic. Grasp is actually pretty cool too, built on nostr, which is maybe a stronger platform in the end? I dont really know enough about it. Stronger as in, you're maybe opening up more interoperablity by putting your stuff on a "anything network" vs Radicles "p2p git data netwo…

Graps seems neat in the way it forces you to sign your commits (which should really be standard practice) but I think Github itself has proven that interoperability is not that important.

Re: If I could make my own GitHub

#44

> Well Y Does Some Of That yes but tangled.org really does do most of that! 1. JJ as the VCS: tangled supports stacked PRs using jj change-ids. https://blog.tangled.org/stacking , we use it a lot to build tangled itself: https://tangled.org/tangled.org/core/pulls 2. Raspberry pi as a forge for a long time: also check, the git server shim is super lightweight, its just an XRPC layer over git repositories + an sqlite3…

Both Radicle and Tangled miss the point; these are all for public collaborative work, but what about private repos? Many users work on side projects; they use GitHub private for this. Once you learn GitHub, then you also start public projects on GitHub.

The point I am trying to make is, until you offer a user the ability to make a private repo for side projects, it's unlikely to take off.

What people want is the ability to make a private repo, go away for a few months and come back to find their repos right there waiting for them.

Re: If I could make my own GitHub

#45

There's a good argument to be made that the data for reviews could be held in git repos just as easily as the source. It can be done incredibly easily simply by having a branch per review with a known prefix (although these will rapidly clog up the default branch namespace), implemented via git namespaces to be distinct from the main namespace, or maybe just a special branch e.g. ".reviews" that just contains commit…

There were a few efforts like that back in the day (when people still cared about offline and store-and-forward-style operation[1]), like Bugs Everywhere[3], git-appraise[4] which stored its data in Git’s little-known “notes” namespace[5], and git-bug[6] which for some reason I’ve seen mentioned quite a bit in such threads recently unlike the others—though I’m not complaining about one of them getting mentioned at least.

Also, as far as read-only access, Gerrit review data is actually accessible via Git[7] (for review ABCDE, pull refs/changes/DE/ABCDE/meta instead of one of the usual numbered refs under that prefix), and someone made the effort[8] to make it accessible via Git notes too (as mentioned in the post on Git notes that I linked above).

Also also, the Fossil SCM of SQLite fame somewhat famously does[9] do this kind of thing with its builtin bug tracker. It has been relegated to obscurity partly as an accident of history (Git won) and partly on the merits (it is aggressively hostile to the kind of history rewriting we are used to routinely—if not always wisely—performing in Git).

Going back to working on top of Git, though, I think that part of the problem is that you really want custom merge strategies when you’re trying to build a fancy datatype, and Git’s support for them requires a lot of wrapping to make it seamless (the location tracking stuff in git-annex[10] is the only success story I am aware of, and that’s a sizeable Haskell project). The existing porcelain is just too rigid.

[1] Can I have a viable replacement for PGP for that use case? Please stop telling me that I don’t exist and should screw off[2]? Please?..

[2] https://news.ycombinator.com/item?id=44239804

[3] https://github.com/aaiyer/bugseverywhere

[4] https://github.com/google/git-appraise

[5] https://tylercipriani.com/blog/2022/11/19/git-notes-gits-coo..., https://news.ycombinator.com/item?id=44345334 (579 points, 146 comments)

[6] https://github.com/git-bug/git-bug

[7] https://gerrit-review.googlesource.com/Documentation/note-db...

[8] https://gerrit.googlesource.com/plugins/reviewnotes/+/refs/h...

[9] https://fossil-scm.org/home/doc/trunk/www/bugtheory.wiki

[10] https://git-annex.branchable.com/

Re: If I could make my own GitHub

#46
post #9

Stuff happens in the wrong order. You know the PR. Commit 1: 'Feature.' Commit 2: 'fix.' Commit 3: 'fix.' Commit 4: 'actually fix.' Commit 5: 'please.' Commit 6, made at 11:47 PM on a Thursday: 'asdfasdf'. This person has a family. This person has hobbies. This person is, at this moment, crying. You don't want the feedback loop after the commit you want it before. Let me do an enforced pre-commit hook to run the jobs…

Pre-commit hook running remotely on the forge "before they push" sounds like an oxymoron. How does the code get to the forge for feedback? That's a post-push hook!

Re: If I could make my own GitHub

#47
> PR approval is too boolean. The PR is approved or it's not approved. Real code review, like real life, lives in the middle

This is have-your-cake-and-eat-it. PR approval is a permission so is a boolean. Of course it is. Either the code can be merged or it can't.

What's being described really here is just something to make you feel slightly better about yourself whilst approving code you hate ("we should revisit this..."). Just open a new ticket.

Re: If I could make my own GitHub

#48
> Let me do an enforced pre-commit hook to run the jobs remotely on the forge and provide the feedback to the user before they push.

You have to 'push' the code to the forge to run it. This code is a 'branch' of the version that is on repo.

> The PR is approved or it's not approved

The code is either merged or it's not. Sure you can trivially add a snooze feature...

> I don't need 4 eyes on every change, especially in a universe where LLMs exist.

Huh, I do. Anyone thinking LLMs replace human review, when LLMs are already replacing the coders, is just vibe-coding, not building a reliable library.

> Stacked PRs are just better.

I have no idea what this really means honestly. You can stack multiple commits in a single PR. You can create PRs based on other MRs.

> A forge shouldn't do everything. Issue tracking yes. Kanban board, probably not.

The board has to live in-sync with the issues or it's not a board.

Post reply on HN