urbit-hob

Haskell utilities for phonetic base wrangling.
Log | Files | Refs | README | LICENSE

commit f64c3cbefb307b4ace2fff16b3d23bca1d6a500d
parent e84b86d977e3f47a66264224f59fdb1072a0501e
Author: Jared Tobin <jared@jtobin.io>
Date:   Fri,  6 Sep 2019 15:16:28 -0230

readme: update

Diffstat:
MREADME.md | 24++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md @@ -8,11 +8,27 @@ Utilities for phonetic base wrangling. ## What -Here you can primarily find functions for dealing with the *phonetic bases* -used by Urbit. The `@p` encoding is used for naming ships, while the `@q` -encoding is used for representing arbitrary data in a memorable and -pronounceable fashion. +Here you can primarily find functions for dealing with the "patp" *phonetic +base* used by Urbit. The `@p` encoding is used for naming ships; it uniquely +represents a 32-bit number in a memorable and pronounceable fashion. The `@p` encoding is an *obfuscated* representation of an underlying 32-bit number, in particular, hence the 'ob' in the library's name. +## Usage + +The library exposes two functions, `patp` and `fromPatp`, for converting +between representations. You can render a `patp` value via the `render` +function. + +Here's a quick example: + +``` +> import qualified Urbit.Ob as Ob +> let nidsut = Ob.patp 15663360 +> Ob.render nidsut +"~nidsut-tomdun" +> Ob.fromPatp nidsut +15663360 +``` +