You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... space could be saved if words were not stored as a static newline-separated string but as something like (&'static [[u8; 1]], &'static [[u8; 2]], &'static [[u8; 3]], ...), i.e. lists of words indexed by length (even more efficient than [&'static str] because we don't need one reference per word). I hope such a list can be built at compile-time from the newline-separated files.
There are at least a couple of common things that the petname command-line tool lets you do that might benefit from preprocessing the word lists before they're compiled in, i.e. alliteration, and word length limits:
-a, --alliterate Generate names where each word begins with the same letter
-A, --alliterate-with <LETTER> Generate names where each word begins with the given letter
-l, --letters <LETTERS> Maximum number of letters in each word; 0 for unlimited [default: 0]
Separately, I am thinking about changing the -l, --letters <LETTERS> option to take a range, e.g. 3-8. That might have a bearing on how to preprocess the default word lists.
The text was updated successfully, but these errors were encountered:
This follows on from ideas in #76:
There are at least a couple of common things that the
petname
command-line tool lets you do that might benefit from preprocessing the word lists before they're compiled in, i.e. alliteration, and word length limits:Separately, I am thinking about changing the
-l, --letters <LETTERS>
option to take a range, e.g.3-8
. That might have a bearing on how to preprocess the default word lists.The text was updated successfully, but these errors were encountered: