-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This implements a new algorithm for getting fortunes randomly, based on the weighted sum of all fortunes, where the weight is the file size in bytes. This prevents the problem of all files being uniformly distributed, leading to small files being overrepresented, and thus often repeating fortunes from these files, in a very unsatisfactory way. Refs: #15 Signed-off-by: Christina Sørensen <christina@cafkafk.com>
- Loading branch information
Showing
3 changed files
with
109 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters