-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
bugSomething isn't workingSomething isn't working
Description
With codename v0.5.0 (and maybe before?), strings that are longer than 9 alphanumeric characters result in the same seed: 0:
library(codename)
char2seed("My project title is really long")
#> Warning in char2seed("My project title is really long"): probable complete loss
#> of accuracy in modulus
#> [1] 0
char2seed("Here's another really long seed")
#> Warning in char2seed("Here's another really long seed"): probable complete loss
#> of accuracy in modulus
#> [1] 0
codename(type = "ubuntu", "My project title is really long")
#> Warning in char2seed(seed): probable complete loss of accuracy in modulus
#> [1] "sapphire stoat"
codename(type = "ubuntu", "Here's another really long seed")
#> Warning in char2seed(seed): probable complete loss of accuracy in modulus
#> [1] "sapphire stoat"The documentation for char2seed() currently says
The function may warn of "loss of accuracy", but this just means you supplied it a really long character vector.
But in practice that "loss of accuracy" warning means that the really long character vector will always generate a seed of 0.
I don't know what to do about it though :( so I've just been making sure my character seeds stay at ≤9 characters
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working