Skip to content

spuder/angry_purple_tiger-rb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<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"

About

Ruby implementation of helum/angry-purple-tiger

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published