News for hackers. Stuff that matters.
Re:HN-text: an easy-to-use, text-first Hacker News terminal ... by andai on Sunday June 02, 2024 @06:46PM (#40557719)
Nice! I spent a few months in a bandwidth constrained environment (bluetooth tunnel to free Cafe wifi across the town square...). I generally got a few KB/s. The recent article on Antarctica's internet reminded me of those days.

HN was one of the only sites that was reasonably pleasant to use during that time. Still, I found it more fun and faster to surf via a VPS. So the VPS itself would load and render the page, and only send me the bytes over Mosh (a more efficient SSH protocol).

I tried a few terminal based browsers using this setup. The one that worked best for HN (especially comment indentation!) was w3m.

Here's the current thread in w3m: https://files.catbox.moe/zuabb4.png

I did have fast mobile data but it was expensive and limited. I watched a lot of videos on YouTube and one day realized that almost everything I watched was actually just lectures or discussions. So I could just stream the audio and save 80% of the bandwidth.

I set up a little PHP script* that took a YouTube URL and ran `youtube-dl -g f bestaudio` to give you the URL of an audio-only stream. (Directly from YouTube's servers!)

I could then just load it directly in my browser, or download it for later. (I think I should have used `worstaudio` instead.)

* That little utility page is not up anymore, but others found it very useful so I should probably make another one...

Another benefit of this is to battery life (decoding video is expensive) and being able to turn off the screen (a feature that Google banned from the app store, years before making their own (paid) version available...) Later I learned about f-droid and newpipe... good times :)

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.

Re:HN-text: an easy-to-use, text-first Hacker News terminal ... by mikenew on Monday June 03, 2024 @12:16AM (#40559280)
What do you mean by Bluetooth tunnel? I'm curious about that setup.
Re:HN-text: an easy-to-use, text-first Hacker News terminal ... by whatsevenreal on Monday June 03, 2024 @04:38AM (#40560532)
Same here! Please provide some details, very curious.
Re:HN-text: an easy-to-use, text-first Hacker News terminal ... by kuschkufan on Monday June 03, 2024 @06:01AM (#40561052)
Maybe it was something like a Raspberry Pi that he placed at that cafe? Curious that his Bluetooth had more reach than the Wifi itself though. Maybe with a directional antenna. Agree, would be interesting to know his setup.
Re:HN-text: an easy-to-use, text-first Hacker News terminal ... by andai on Monday June 03, 2024 @07:34PM (#40568997)
The best signal was had by hanging my phone from the ceiling. Since the phone itself was connected to the cafe Wifi, I couldn't use wifi to connect to the phone. So I shared the phone's (cafe wifi) internet over Bluetooth. (I didn't know that was a thing until I tried it!)

(I think I was able to connect to that with another phone and set up a wifi hotspot for all my devices... but it's been a while!)