urbit / sigil-js

~4.2 billion default profile pics
MIT License
152 stars 21 forks source link

Sigils for invalid @p's are displayed #24

Closed rmariani closed 5 years ago

rmariani commented 5 years ago

In http://sigil.tlon.io/. Entering ~mar, for example, returns a sigil, even though ~mar is not a valid @p. mar is a prefix, and only suffix phonemes can be galaxies. All illegal combinations (~zodzod, ~zodmar) return sigils.

vvisigoth commented 5 years ago

lol stop — ~poldec-tonteg http://urbit.org

On Mon, May 6, 2019 at 3:37 PM rmariani notifications@github.com wrote:

In http://sigil.tlon.io/. Entering ~mar, for example, returns a sigil, even though ~mar is not a valid @p. mar is a prefix, and only suffix phonemes can be galaxies. All illegal combinations (~zodzod, ~zodmar) return sigils.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/urbit/sigil-js/issues/24, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMJBY3PQDOGAEQ6I72MZBLPUCXJTANCNFSM4HLD5RVQ .

rmariani commented 5 years ago

what D:

Fang- commented 5 years ago

This is fine imo? We shouldn't restrict exploration of the sigil space.

(Other than that, unsure what needs to be stopped.)

g-a-v-i-n commented 5 years ago

This would require checking against a 512-length array, which makes me wonder what the performance impact would be.

g-a-v-i-n commented 5 years ago

Can someone verify if zodzod-zodzod is valid patp?

bencalder commented 5 years ago

~zodzod-zodzod isn't valid because zod isn't a valid prefix. However my understanding is that ~dozzod-dozzod is technically ~zod's full name.

Fang- commented 5 years ago

However my understanding is that ~dozzod-dozzod is technically ~zod's full name.

ackshually, @p notation discards leading zeroes before rendering, so ~dozzod-dozzod is not a valid @p representation. 0x0000.0000 just becomes 0x0 aka ~zod.

This is also failing to account for planet scrambling/swizzling, ie:

> `@ux`~doznec-dozzod
0xac45.8de2

All that said, .~dozzod-dozzod is valid @q notation (and just resolves to 0x0).

@g-a-v-i-n I still don't think sigil-js should really care about what it's being asked to render. In case you feel differently, urbit-ob implements validity checks in isValidPatp and isValidPatq, the latter of which just makes sure prefix and suffix syllables are in the right order/places.

g-a-v-i-n commented 5 years ago

I agree that its not worth implementing this check. This limitation is natural to the address space.