a guest Feb 24th, 2012 1,445 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- ; Votes divided by the age in hours to the gravityth power.
- ; Would be interesting to scale gravity in a slider.
- (= gravity* 1.8 timebase* 120 front-threshold* 1
- nourl-factor* .4 lightweight-factor* .3 )
- (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)) 1
- (blank s!url) nourl-factor*
- (lightweight s) (min lightweight-factor*
- (contro-factor s))
- (contro-factor s))))
RAW Paste Data