README.md in deacon-0.0.3 vs README.md in deacon-1.0.0

- old
+ new

@@ -1,6 +1,6 @@ -# Deacon - human readable random name generator +# [Deacon](https://rubygems.org/gems/deacon) - human readable random name generator Out of ideas for incoming bare-metal host names in your cluster? This little gem is a way out! It contains frequently occurring given names and surnames from the 1990 US Census (public domain data): @@ -17,29 +17,30 @@ ### Random generator The random name generator makes use of [Fibonacci linear feedback shift register](https://en.wikipedia.org/wiki/Linear_feedback_shift_register) which -gives deterministic sequence of pseudo-random numbers. Additionally, algorighm +gives deterministic sequence of pseudo-random numbers. Additionally, algorithm makes sure names with same first name (or gender) and last name are not returned in succession. Since there are about 1% of such cases, there are -about 33 million unique total names. During plugin installation, the register -is seeded with a random value, so each installation gets unique sequence. -Example sequence: +about 33 million unique total names. Example sequence: * velma-pratico.my.lan * angie-warmbrod.my.lan * grant-goodgine.my.lan * alton-sieber.my.lan * velma-vanbeek.my.lan * don-otero.my.lan * sam-hulan.my.lan -The polynomial used in linear feedback shift register is x^25 + x^24 + x^23 + x^22 + 1. +The polynomial used in linear feedback shift register is + x^25 + x^24 + x^23 + x^22 + 1. + The key thing is to store register (a number) and use it for each generation -in order to get non-repeating sequence of name combinations. +in order to get non-repeating sequence of name combinations. See an example +below. ### MAC generator Examples of MAC-based names: @@ -88,9 +89,14 @@ LOREN SPAHN JULIO GIMBEL CORY SIBILIO PATSY CUSSON HUGH SHIMER + +By default, same firstname or surname successions are removed. To avoid that +behavior (e.g. in stateless applications where you can't store register), use + + register, firstname, lastname = generator.generate(register, false) Random LFSR generator example: require "deacon" generator = Deacon::RandomGenerator.new