Skip to content

Instantly share code, notes, and snippets.

@n2n3
Created October 12, 2010 18:45
Show Gist options
  • Save n2n3/622695 to your computer and use it in GitHub Desktop.
Save n2n3/622695 to your computer and use it in GitHub Desktop.
(= 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
(* (contro-factor s)
(if (mem 'gag s!keys)
gag-factor*
(lightweight s)
lightweight-factor*
1)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment