
Ask HN: How do Ask HN rankings work? - d--b
I&#x27;ve submitted a Ask HN today, which tanked in rankings within minutes. After 30 minutes it got off the ask hn front page and after 3 hours it went off all ask hn pages despite having scored 3 points. I still see some ask hn post on the front page with 2 points after 15 hours...<p>I am not complaining (just a little bit, but what comes into play? karma? number of comments?
======
bsvalley
It's much more complex... PG posted an updated version once.

    
    
        (= gravity* 1.8 timebase* 120 front-threshold* 1
           nourl-factor* .4 lightweight-factor* .17 gag-factor* .1)
    
        (def frontpage-rank (s (o scorefn realscore) (o gravity gravity*))
          (* (/ (let base (- (scorefn s) 1)
                  (if (> base 0) (expt base .8) base))
                (expt (/ (+ (item-age s) timebase*) 60) gravity))
             (if (no (in s!type 'story 'poll))  .8
                 (blank s!url)                  nourl-factor*
                 (mem 'bury s!keys)             .001

~~~
John23832
That's cool. Are they really using Clojure/Lisp?

~~~
lispm
The language is called Arc and runs on top of Scheme.

The function mentioned above is here:

[https://github.com/wting/hackernews/blob/master/news.arc](https://github.com/wting/hackernews/blob/master/news.arc)

~~~
John23832
The more you know. Thanks.

------
BayesStreet
Score = (P-1) / (T+2)^G

where, P = points of an item (and -1 is to negate submitters vote) T = time
since submission (in hours) G = Gravity, defaults to 1.8 in news.arc Edit:
obsolete algorithm, find updated below. From [https://medium.com/hacking-and-
gonzo/how-hacker-news-ranking...](https://medium.com/hacking-and-gonzo/how-
hacker-news-ranking-algorithm-works-1d9b0cf2c08d#.etm5srfyo)

~~~
alimw
If it needs more than one point to rank at all, how does a new submission come
in?

~~~
grzm
New submissions start with a single upvote, just as comments do.

------
arisAlexis
sounds like the fate of all my submissions

