How does publishing work?

Modules are published to Primoca in a content addressable format. They are identified by a hash and cannot be modified.

Why are the URLs so long and ugly?

In the published URLs e.g. the subdomain is a hash of the published content with an additional prefix that conforms to the Multihash spec. Currently all hashes are SHA256, so the binary prefix is 0x12, 0x20. The encoding algorithm is Base-X with a base26 alphabet of 'bcdfghkmnpqrstvwxz23456789'