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

>And for the UI I just pipe everything to the system's "less" command.

I never thought of that as an option. Thanks for the tip haha.


Ideally, one should pipe into $PAGER, or, if that's missing, into "pager" (it's usually symlinked to less), or, if that's missing, into "less"/"more"/"cat", or, if even those are missing, then just write to stdout.


sometimes the simplest solution is the best! i love the unix philosophy:

Write programs that do one thing and do it well.

Write programs to work together.

Write programs to handle text streams, because that is a universal interface.


By "it" do you mean landlock or fil-c? Also elaboration would be nice.


I read somewhere that Hacker News should have been named Startup News, and sometimes interactions like the one upthread reminds me of that. I'm not saying it's wrong - if you're good at something don't do it for free and all that - but it's kinda sad that in-depth discussions on public forums are getting harder and harder to find these days.


Normal conversations by topic enthusiasts usually have fun stuff hidden in their profiles and at times lead to fun rabbit holes where you endlessly learn and somehow, forgot that you were initially browsing HN.

Agree about the public discussion part, one of the reasons why I'm here lately.

Also, why can't someone create Startup News: Where every article reply is an opportunity to be sold a service, SN would take a cut of transactions. /s


> SN would take a cut of transactions

These are people already trying to divert the discussion off-site for their benefit. Very few would honestly report any resulting transaction for the cut to be taken from.

[yeah, it did see the sarcasm tag, just clarifying to put off would be entrepreneurs so we aren't inundated by show-hn posts from people vibe-coding the idea over the next few days!]


That's gross misrepresentation. He wrote _lots_ of helpful educational articles on zig that painted it in a good light. I would know because I learned a great deal from his posts when I started with zig. Recently he posted a grand total of 2 articles expressing his confusion/skepticism of new zig features, that's it.


Idk, Andrew's comment seems fair enough to me.


I once explored doing just that: https://github.com/nhanb/boast

However I never got around to finishing it, mainly because I couldn't decide on where to stop: should I also generate commits from all non-master branches etc.

I flirted with the idea of a browser-side repo viewer too, but re-implementing git packfile parsing in js didn't seem like something I'd want to spend my time on, so I moved on. Glad to see others pondering the same thing though.


That does get intense pretty quickly, if you're generating a source and commit/diff pages for every file * every commit. Probably just single commits would make the most sense and then a source browser for each branch.

That said, JavaScript libgit2 is a thing [1], so doing it "properly" in a client app is totally possible.

[1]: https://github.com/libgit2/libgit2/issues/4376 | https://github.com/petersalomonsen/wasm-git


I’d go with a combined approach. Static pages for every file on master, JS for everything else. This way master branch loads instantly, but other branches (with diff, blame etc) are also available.

Hmmm, I might give it a go one day.


Would the js pages really take much longer to load than static? Fetching a few packfiles and hydrating a template should be very fast.


Probably. We’re looking at three roundtrips here: one to fetch the HTML, one for the JS, and at least one for the packfiles (and that’s if you can do that in parallel). If the latency is high, the result can be... not great. HTTP/2 should help with this a bit, but it’s better to not have this problem at all IMO.

Of course, there’s also the argument that if you’re self-hosting a repo, you’re more likely to care about users that have disabled JS (which is a good idea, tbh).


If you render the repo home/tree/readme statically but serve the JS application upfront with that, then successive clicks into files/commits/diffs will only have to pull packfiles, and then only if the content isn't already present locally. Packfiles are obviously immutable so they can be set for infinite caching, which should mean that even successive visits could be pretty speedy.


Yeah, the question is basically which entry pages you want to support. I think it’s nice to be able to link to a particular file on the master branch and have it load instantly, too. Loading older verisions, on the other hand, has its uses but is less important.

For a repo with thousands of files, it might make sense to limit entry pages to only directories and .md files (and other prose files), which are more likely to be linked to. You can also skip shipping a Markdown renderer this way!


Nice work. This has been on my bucket list to make for a few years. If you ask me, yes: make an .html file for each non-orphan commit on each branch.


FWIW he _is_ an example already: https://rsync.net/


A static site generator: https://hi.imnhan.com/s4g/

Not the most original of ideas, but I was really sold on djot [1] and wanted something less fussy than pelican [2], so it just happened.

[1] https://djot.net/

[2] https://getpelican.com/


Husky (android app) does support multi-account. I'm using it right now. I imagine there should be something equivalent for ios. It's not rocket science.


You misread. They said the opposite:

> Websites in the, (late), 1990s were characterised by many things, but a typical list might include:

> - Serif fonts


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

Search: