Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.27 KB

README.md

File metadata and controls

42 lines (30 loc) · 1.27 KB

<img src="./images/purple-tiger.png" width-"100"/>

AngryPurpleTiger

Ruby port of helum/angry-purple-tiger

Takes any string and converts it into a friendly human phrase consisting of 3 words

<adjective> <color> <animal>

This naming convention is used in the helium network for naming hundreds of thousands of hotspots.

There are 256^3 (16,777,216) possible combinations of 3 letter words. This algorithm is deterministic in that the same input will always produce the same output, however it is not guaranteed to be free from collisions.

input 3 words
my ugly input string rapid grey rattlesnake
C89A436B-66C5-4427-9480-A67BB3211943 petite tin mantis
DE:AD:BE:EF:CO:FE formal berry kitten

Usage

require angry_purple_tiger
AngryPurpleTiger.new('my ugly input string')
=> "rapid grey rattlesnake"

Development

If developing locally, you may need to change require angry_purple_tiger to require_relative './lib/angry_purple_tiger'

require_relative './lib/angry_purple_tiger'
AngryPurpleTiger.new('my ugly input string')
=> "rapid grey rattlesnake"