rDrama/files
TLSM 716f078e81 Fix 'hot' sort intermediate value out-of-bounds.
Fixes #321. Due to the extremely large quantity of comments on a
typical Motte post, 'hot' sorting logic underflowed an intermediate
value. Roughly:

  |(-1 000 000) * (103 [votes] + 1 + 2723 [comments] / 1)| > 2^31

We resolve this by reducing the coefficient from 1e6 to 1e5, which
reduces precision of intermediate calculations somewhat, and by
dividing #comments by 10 rather than 1, which better matches Motte
user behavior regardless: Users comment much more often than vote.
This buys us two orders of magnitude more headroom before out-of-
bounds. Shouldn't be an issue until the CW thread reaches ~200k
comments.
2022-09-12 12:16:54 -05:00
..
assets Reduce favicon size. 2022-09-12 06:11:24 -05:00
classes nicer and more efficient sanitisation 2022-09-11 06:12:26 -05:00
commands [#72] Add seed_db command 2022-06-09 01:33:58 -07:00
helpers nicer and more efficient sanitisation 2022-09-11 06:12:26 -05:00
mail Split SITE_NAME into computer-readable SITE_ID and human-readable SITE_TITLE. 2022-07-31 18:53:18 -05:00
routes Fix 'hot' sort intermediate value out-of-bounds. 2022-09-12 12:16:54 -05:00
templates Change default RSS sort to 'new'. 2022-09-12 12:16:54 -05:00
tests Add basic posting to the e2e test. 2022-05-21 21:39:54 -05:00
__init__.py Initial e2e testing 2022-05-13 02:55:29 -05:00
__main__.py Added comments-per-page config. 2022-09-09 17:11:12 -05:00
cli.py [#72] Ensure seed_db command is actually imported when calling into flask 2022-06-09 01:34:46 -07:00