Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

Seems like a lot of people have their own specific ideas to how they may want comments sorted / listed.

How hard would it be to allow people to implement their own version of the ranking function and then have the comments passed through that. Store the function in each person's profile, make them visible, and more importantly, make them share-able (like an app store?) so you can see which functions turn out to be most popular...

There's a giant can of worms there safety-wise (people running their own code on your server ?!?!) and unknown loading effects (nothing to stop people writing infinitely recursive loops...), although that said, it didn't stop you with viaweb did it?

Also haven't looked at the news.arc code recently so not entirely sure which part could be customised...



How hard would it be to allow people to implement their own version of the ranking function and then have the comments passed through that?

Harder than you think, I expect. You're proposing to do a custom query, of arbitrary, user-chosen complexity, for every single page view.

Moreover, the result will be of dubious merit. Individualized filter functions screw up conversation. That's what's wrong with conversation on the rest of the web -- people all read blogs, but nobody reads the same blogs, and people encounter the blogs in arbitrary order, and some blog entries are more out of date than others, and the result is like trying to carry on a conversation with a bright but slightly deaf time traveler who is probably a troll.

We have a distributed, personalized version of HN comments: They're called blogs and RSS feeds. The quality tends to be higher. Your personal filtering options are much more numerous and powerful. And they're just not the same thing. Otherwise I, for one, would be writing for my blog instead of posting on HN. Lord knows it would be better for my career.


To clarify my "how hard" sentiment - I had in mind that the normal sort function becomes a "function selector" that grabs the user's chosen sort function from their profile, then applies that to the comments.

The difficulty in all this would be policing the kind of code that can be written - perhaps a small DSL that compiles into arc code, or possibly direct arc code that gets vetted by a/some moderators.

The actual sort function seems to be (from arc3.tar, but may well have been changed here... nothing is safe from a REPL!) EDIT: indeed! see https://hackernews.hn/item?id=845932

  (def display-subcomments (c user whence (o indent 0))
    (each k (sort (compare > frontpage-rank:item) c!kids)
      (display-comment-tree (item k) user whence indent)))
so that in itself should not be too hard to modify, and provided it is not that much more complex, I can't see it putting that much more strain on the server. The sort function gets called for each page view, the user's profile (username / logout / threads) gets accessed for each view, so the only thing that needs to be resolved is the specific sort function.

The conversation threading could indeed become a bit fragmented, but then again, each time you look at a story on HN the comments will be in a different order due to the weighting and voting.




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

Search: