Advertisement
Guest User

Untitled

a guest
Feb 24th, 2012
2,885
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.70 KB | None | 0 0
  1. ; Votes divided by the age in hours to the gravityth power.
  2. ; Would be interesting to scale gravity in a slider.
  3.  
  4. (= gravity* 1.8 timebase* 120 front-threshold* 1
  5.    nourl-factor* .4 lightweight-factor* .3 )
  6.  
  7. (def frontpage-rank (s (o scorefn realscore) (o gravity gravity*))
  8.   (* (/ (let base (- (scorefn s) 1)
  9.           (if (> base 0) (expt base .8) base))
  10.         (expt (/ (+ (item-age s) timebase*) 60) gravity))
  11.      (if (no (in s!type 'story 'poll))  1
  12.          (blank s!url)                  nourl-factor*
  13.          (lightweight s)                (min lightweight-factor*
  14.                                              (contro-factor s))
  15.                                         (contro-factor s))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement