When you click "hide" on a post on the homepage, it loads a new 30th entry for the page. This works great on page 1, but on other pages it always loads entry "30" instead of "60" for page 2 or "90" for page 3. So if I'm on page 2 and hide 3 posts, then the bottom of the page is 58/59/60 and all 3 are duplicates of what should be 30 on page 1.
Edit: ok you guys, be my ChatGPT. Say you have page 2 loaded and you hide a story. What story should replace it at the bottom? Keep in mind that the story rankings may have shifted around quite a bit since you loaded the page you're looking at.
I remember puzzling over this when we first implemented /hide and that was many years ago. (Edit: July 2016 in fact)
Edit: the original bug is fixed at least. Let's not let the better be the enemy of the proper.
In the dynamic JS instance, I’d rather the page just removed the entry and reduced the displayed items to 29 without brokenly repopulating entries, and dimmed the ‘next’ link with a ‘reload’ link shown ahead of it. It’s vastly easier on the server (14 less article fragment for 15 hides on one page of /new!) and that way you don’t have to fight against pagination.
In the non-dynamic no-JS instance, the homepage has no timestamp context like /new URL pagination does, so I assume I’m getting a reload every time I click any button. I used HN without JS for 6 months as a test and it was honestly better than the site trying to load articles to replace ones I hide.
Seems like a good place to give attention to something that was missed or might get missed? Something random from the second chance pool or what ever would have been there an hour or two ago? A random but highly active thread from days gone by would be fun but could result in lots of "HN used to be better" remember whenning (larping), or it might remind people that things have not changed so much, or at least not as much as they have. I would not mind being confronted with my past self on occasion.
My recommendation is whatever is currently the top of the subsequent page at the time of click. So if you’re on page 2, whatever is rank 61 at the time of click regardless of if 61 changed after the user loaded 31-60.
Oh I see the challenge. So because the ranking could’ve changed, there’s a chance anything on the current page could’ve slipped to the following page. So with my naive algorithm, you could even end up with the replacement for 60 matching the user’s stale 59. In that case I’d go one step further and say whatever is 61 or higher currently that isn’t shown on the user’s stale page. If they refresh or navigate the expectation is rankings could change so it seems like a reasonable compromise. Though I really don’t have strong opinions here and trust y’all to get it right.
Honestly just hide it and be done. Unless you're going to keep a stateful cursor or something, there's no real consistent "next" item when next is a function of time. (Then there's other complexity, right? like showdead, /news using `p` vs. /newest using `n`, etc.) All the offsets stay the same.
There's no expectation that page 2 now is page 2 when I refresh. Just don't auto-refresh because I probably want to visit other links from the current page load.
Get the next available. Match it against the client's current list on thr screen. If it is not there, in-place replace with that one. If it's a dupe, try the next one. Everything client side like it's 2020 again.
On that note, it would be great to get an option in settings to hide the 'flag' and 'hide' links when on mobile, at least on the front page. 95% of the time I click either one on mobile it's by accident.
HN has an API, it's easy (enough) to write a client as long as you don't care about speed (in which case maybe use the Algolia API) and don't want to post.
Have been using https://hcker.news/ for some time now. Works splendidly for reading. The dev also has a chrome extension for voting that works but I think hopping over to HN isn't too bad an experience with hyperlinks on hacker.
It seems to have rotted a bit, but still does a good job. I just use OpenWRT's standard "Network" → "DHCP and DNS" → "List of domains to force an IP address" (and force them to 127.0.0.1).
But yeah, the Roku Express is nigh-unusable without DNS ad-blocking.
FAQ
Where do these files come from?
They were uploaded to archive.org by thousands of different users.
Think of this site as a partial mirror of select archive.org items, extracted and presented with a different interface.
I get that, but if you can't find it with a normal search on archive.org it's worth uploading for a dedicated page and a few details.
I'm setting up my own retro lab atm and would love to use this but the only way I'll ever find it is by coming back to this thread and hunting for it. I guess I'll upload it myself when I get to it.
"<-chan TYPE" is the receive end, "chan<- TYPE" is the send end, "chan TYPE" without an arrow can be used for either.
close() on a chan is "indicate end-of-transmission"; you should only ever use it from the send end. There is no way to explicitly "close" the receive end.
You can use `select` to do a non-blocking sends/receives, but yeah normal sends/receives are blocking.
> "<-chan TYPE" is the receive end, "chan<- TYPE" is the send end, "chan TYPE" without an arrow can be used for either.
The problem is that there is pretty much just a subtyping relationship, when you convert a channel to a send or receive channel you don't get a different object, you just get the relevant subset of operations.
> There is no way to explicitly "close" the receive end.
And that's the root cause of half of more of the example issues in TFA. With the ability to close either end of the channel (and to handle closed receivers from the senders, obviously), most of the issues just go away (even more reliably so if that happens for you when the relevant end stops being used).
8" floppy drives were not compatible mechanically with IBM PC cases, but there were 8" floppy drives with their own enclosures and power supplies, which could be put on a desktop along the PC case.
IBM PCs have never supported 8" floppy drives, but it was easy to make an adapter between IBM PC floppy cables and 8" floppy drives, so there have existed IBM PC clones from countries where 5¼" floppies were scarce (e.g. Eastern Europe), which supported the attachment of 8" floppy drives.
The original 5¼" floppies had only the size advantage, but they had both a lower capacity and a lower speed than 8" floppies, so attaching 8" floppy drives would have been a higher performance option in the beginning.
Only after the IBM PC/AT introduced the high-density 1.2 Mbyte floppy disks, the 5¼" format matched (actually very slightly exceeded) the performance of the old 8" floppies.
When you click "hide" on a post on the homepage, it loads a new 30th entry for the page. This works great on page 1, but on other pages it always loads entry "30" instead of "60" for page 2 or "90" for page 3. So if I'm on page 2 and hide 3 posts, then the bottom of the page is 58/59/60 and all 3 are duplicates of what should be 30 on page 1.
reply