News for hackers. Stuff that matters.
Re:Show HN: Free Reddit submission scheduling and vote poten... by pacofvf on Thursday June 04, 2015 @01:20PM (#9660650)

    cpdef double _hot(long ups, long downs, double date):
        """The hot formula. Should match the equivalent function in postgres."""
        s = score(ups, downs)
        order = log10(max(abs(s), 1))
        if s > 0:
            sign = 1
        elif s < 0:
            sign = -1
        else:
            sign = 0
        seconds = date - 1134028003
        return round(sign * order + seconds / 45000, 7)
here's the function in question, so yes a newer post with fewer votes than a minutes older post will remain on top.

There are no comments on this comment yet.