Popularity
8.2
Declining
Activity
0.0
Declining
6
20
1

Monthly Downloads: 36
Programming language: Haskell
License: MIT License
Tags: Urbit    
Latest version: v0.3.2

urbit-hob alternatives and similar packages

Based on the "Urbit" category.
Alternatively, view urbit-hob alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of urbit-hob or a related project?

Add another 'Urbit' Package

README

urbit-hob

Build Status Hackage Version Stackage Version License: MIT

Utilities for phonetic base wrangling.

What

Here you can primarily find functions for dealing with the "patp" and "patq" phonetic bases used by Urbit. The @p encoding is used for naming ships, whereas the @q encoding is used for arbitrary data; they both uniquely represent nonnegative integers (i.e. atoms) in a memorable and pronounceable fashion.

The @p encoding is an obfuscated representation of an underlying atom, in particular, hence the 'ob' in the library's name.

Usage

The library exposes two families of functions, patp and fromPatp, and then patq and fromPatq, for converting between representations appropriately. You can render {patp, patq} values via the render{Patp, Patq} functions, and parse them from Text via parse{Patp, Patq} respectively.

The useful clan and sein functions, for determining a ship's class and (default) parent, are also exposed.

Here are some quick examples:

> :set -XOverloadedStrings
> import qualified Urbit.Ob as Ob
> let nidsut = Ob.patp 15663360
> let marzod = Ob.patq (Ob.fromPatp nidsut)
> Ob.renderPatp nidsut
"~nidsut-tomdun"
> Ob.renderPatq marzod
"~mun-marzod"
> Ob.fromPatp nidsut
15663360
> Ob.parsePatp "~nidsut-tomdun"
Right ~nidsut-tomdun
> Ob.clan nidsut
Planet
> Ob.sein nidsut
~marzod

See also


*Note that all licence references and agreements mentioned in the urbit-hob README section above are relevant to that project's source code only.