dc is worth having installed because of this CLI gem alone: echo "[q]sa[ln0=aln256%Pln256/snlbx]sb729901041524823122snlbxq" | dc I've never tried to understand what's really going on to produce the result, but also wouldn't really know where to start - maybe someone in HN's audience can enlighten me? :)
echo '1033333377708482P' | dc
produces the same output using Unix dc but not in the GNU near-clone. (To understand why, you have to R the P as well as the M.)