News for hackers. Stuff that matters.
Re:Why does HN generate unique URL's for the 'more' pages? by DrJokepu on Wednesday February 22, 2012 @09:03PM (#3623461)
It's called a continuation. Continuations are essentially closures being passed around to represent state (hence "fnid"), check the Wikipedia page on them for a proper, computer sciencey definition. The nature of Lisp really lends itself to continuation-based programming. Sometimes (like on HN) it's used in web applications. In the context of web applications, it's a different approach than, for example, REST/MVC. It has a few nice properties, such as easy state management. This can be very useful when a web application is an interface to a process (e.g. checkout in a web store) as opposed to CRUDA. On HN, it allows paging that "remembers" the order of things at the time you visited the first page. Reddit uses a similar mechanism. The obvious downside is that you have to keep track of all those states and if you lose them (for example because they expire), the user workflow is interrupted (hence the error message).

It's not the trendiest programming technique around these days but it's a useful tool in the toolkit of a good developer.

Re:Why does HN generate unique URL's for the 'more' pages? by a_a_r_o_n on Wednesday February 22, 2012 @09:32PM (#3623538)
"The nature of Lisp really lends itself to continuation-based programming."

This comes up occasionally on HN. I've never seen anyone say anything positive about it.

It seems like a software detail that's unnecessary exposed to users. It doesn't make the site better, it makes it worse.

Re:Why does HN generate unique URL's for the 'more' pages? by MrTortoise2 on Thursday February 23, 2012 @04:55AM (#3624390)
I disagree, as i look at HN several times a day i like how pages expire. It explicitly tells me that the order has changed. People are WAY too fussy about messages in their UX because we have abstracted UX to such an extent that we expect the same smooth UE independently of function. The internets expectations (and sheepishness) is making all software like that crap you get free with your camera.
Re:Why does HN generate unique URL's for the 'more' pages? by funkah on Wednesday February 22, 2012 @10:06PM (#3623609)
I completely agree, but I wouldn't mind it nearly so much if the "expired link" page at the very least had a link to the home page.
Re:Why does HN generate unique URL's for the 'more' pages? by pjob on Wednesday February 22, 2012 @10:51PM (#3623711)
I added a suggestion to that effect on the Feature Request thread (http://news.ycombinator.com/item?id=363) a while ago, but it slipped off into the long tail of comments pretty quickly:

http://news.ycombinator.com/item?id=1480352

Re:Why does HN generate unique URL's for the 'more' pages? by a_a_r_o_n on Wednesday February 22, 2012 @10:49PM (#3623708)
Or to the next page.
Re:Why does HN generate unique URL's for the 'more' pages? by recursive on Wednesday February 22, 2012 @10:09PM (#3623616)
Reddit does not use a similar mechanism. Here's an example of one of their next page links: http://www.reddit.com/?count=100&after=t3_q1sxk

The count is the number of stories to skip, the after is the id of the last story on the previous page.

Re:Why does HN generate unique URL's for the 'more' pages? by tensor on Wednesday February 22, 2012 @10:57PM (#3623723)
I don't see how that improves anything. If you click that link, you still see "nothing here".
Re:Why does HN generate unique URL's for the 'more' pages? by notJim on Wednesday February 22, 2012 @11:03PM (#3623742)
The point isn't that it's an improvement, the point is that it's completely different. It's the "standard" way of doing pagination (limit + offset), not a continuation.
Re:Why does HN generate unique URL's for the 'more' pages? by bri3d on Thursday February 23, 2012 @12:26AM (#3623929)
That's not offset + limit; it's start ID + count, which is functionally very different from offset + limit.

If Reddit were to use offset + limit, one would frequently visit page 2 only to see the same articles they were reading on page 1 five minutes before. A good example of this issue with offset + limit based pagination is 4chan, which is basically impossible to read in a linear or sane manner.

Reddit somewhat alleviates the problem by ensuring that posts after the last one you read are displayed - you'll occasionally see some of the same posts you were reading on page one, and occasionally miss posts that "jump" to page one while you're reading it, but it'll at least be usable, unlike 4chan.

Re:Why does HN generate unique URL's for the 'more' pages? by notJim on Thursday February 23, 2012 @12:51AM (#3623979)
Yes, you are correct, I was merely being lazy in my description.
Re:Why does HN generate unique URL's for the 'more' pages? by recursive on Wednesday February 22, 2012 @11:07PM (#3623759)
I'm not claiming it's an improvement.
Re:Why does HN generate unique URL's for the 'more' pages? by jQueryIsAwesome on Wednesday February 22, 2012 @11:54PM (#3623852)
Strange... i clicked it and it works (and i do consider that an improvement).
Re:Why does HN generate unique URL's for the 'more' pages? by DrJokepu on Thursday February 23, 2012 @06:06AM (#3624510)
You're right, Reddit does not use a similar mechanism. My bad.
Re:Why does HN generate unique URL's for the 'more' pages? by sj26 on Friday February 24, 2012 @11:58PM (#3632210)
This reminds me waaaay too much of ASP.NET's oh-so-wonderful __VIEWSTATE.