5 ms·
Ask PG: What's The Most Points One Submission Has Ever Received?
Ask PG: What's The Most Points One Submission Has Ever Recieved on Hackernews? What Was The Article?
- ckopec 17y agoUnder the lists section of HN there is a best category with the top submissions. http://news.ycombinator.com/best http://news.ycombinator.com/best
- raquo 17y agoIt counts only recent submissions as far as I can tell though
- pg 17y ago> (with (topi nil topscore 0) (each-loaded-item i (when (and (astory i) (> (realscore i) topscore)) (= topi i topscore (realscore i)))) (list topi!id topscore)) (459289 521)
- SwellJoe 17y agoDirect link: http://news.ycombinator.com/item?id=459289 http://news.ycombinator.com/item?id=459289
- ivankirigin 17y agoIn django, this might look something like this: s = Stories.objects.order_by('-num_votes')[0]
- pg 17y agoThe query I did was much more complicated. The Arc equivalent of yours is ((sort (compare > score) stories*) 0)
- ivankirigin 17y agoJust in case it isn't clear, that order_by actually digs into the database layer to do the sorting there. It's a query that returns an iterator that gives you stories in that order one at a time. To sort an existing list, over a particular member, it would be Stories.sort( key = lambda x: x.score ) That lambda has certainly confused a lot of people I know. Probably because they used the word "lambda" and not "function".
- gaika 17y agohttp://top.searchyc.com/submissions http://top.searchyc.com/submissions