News for hackers. Stuff that matters.
Re:HN-text: an easy-to-use, text-first Hacker News terminal ... by fragmede on Sunday June 02, 2024 @08:38PM (#40558292)
The Antarctica Internet one reminded me of http://hn.zip, which caches as much as it can for spotty connections.
Re:HN-text: an easy-to-use, text-first Hacker News terminal ... by codetrotter on Sunday June 02, 2024 @09:27PM (#40558525)
The https://www.hn.zip/ website links to a GitHub repo https://github.com/lukeschaefer/hn.zip but that repo link currently gives a 404. Maybe owner of the site forgot to make the repo public or something. Can’t find any other repo on their profile that appears to be for that project either.
Re:HN-text: an easy-to-use, text-first Hacker News terminal ... by lukeschaefer on Monday June 03, 2024 @01:16PM (#40564831)
Ah that's on me, it's a private repo because my code is embarrassing. But behind the scenes here's how it works:

- I wrote my own scraper for HN for reasons I no longer remember

- Scraper is called every 30 seconds by an Apps Script timer on a Google Sheet (to be dirt cheap, Vercel doesn't have free cron jobs).

- Caches the front page, plus ten comments per post into a single Firestore document (to save money on reads vs 20 reads per load)

- Home page loads via SSR with Nuxt.

- Post pages will load the rest of the comments from a separate doc for each post

- the other comments load instantly on navigation if on a halfway decent connection - but if not, you still get to see the first 10 comments to get an idea of the discussion while you wait.

- Added some Workbox stuff to get it offline-first.

- Added an IndexDB wrapper around Firestore for more control over cache behavior I think.

- It's worked now for over a year with no oversight needed and not costing a penny!

Then I got distracted because I wanted to rebuild it from scratch to not use Nuxt and never completed that rewrite. Been a while since I've worked on it, had no idea other people even knew it existed! There's definitely some bugs (I think CSS gets broken on deeply nested comments) but it worked enough for my uses so I moved on.

Re:HN-text: an easy-to-use, text-first Hacker News terminal ... by codetrotter on Monday June 03, 2024 @06:09PM (#40568179)
Neat! Thanks for the details :)
Re:HN-text: an easy-to-use, text-first Hacker News terminal ... by fragmede on Monday June 03, 2024 @07:11PM (#40568778)
Re:HN-text: an easy-to-use, text-first Hacker News terminal ... by andai on Monday June 03, 2024 @07:37PM (#40569019)
>[from profile:] Recently quit my job, now I work on anything that holds my interest (until I run out of money)

I did the same thing... lots of fun, but the "run out of money" part is rough! I resorted to freelancing, and now I'm going back to university.

Re:HN-text: an easy-to-use, text-first Hacker News terminal ... by inslee1 on Monday June 03, 2024 @10:39AM (#40563073)
Great link! Might have found a bug in Chrome with it though :)

I was curious to see more about the internals so I opened up Chrome Devtools and as soon as I clicked on the "Application" tab, it crashes Chrome and did it every time.

Re:HN-text: an easy-to-use, text-first Hacker News terminal ... by dionian on Monday June 03, 2024 @10:54AM (#40563204)
This is pretty amazing on my fast connection. makes you realize how slow things actually are when you use something like this
Re:HN-text: an easy-to-use, text-first Hacker News terminal ... by lukeschaefer on Monday June 03, 2024 @01:14PM (#40564810)
Author of hn.zip here - thanks so much for the shout out! I never really publicize it and never 100% finished it, but I'm so glad people are using it! It's basically how I browse HN on my phone and once it reached 90% good enough I stopped working on it haha.
Re:HN-text: an easy-to-use, text-first Hacker News terminal ... by heyoni on Monday June 03, 2024 @09:48PM (#40569903)
Can you do this with every website in the world?? I’m kidding of course but man, it pains me to browse the web as it is today knowing that things could be “this good”.

I just tried it and it was an amazing experience.