Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

Add @q, phonetic data representation #824

Merged
merged 1 commit into from
Nov 13, 2018
Merged

Add @q, phonetic data representation #824

merged 1 commit into from
Nov 13, 2018

Conversation

Fang-
Copy link
Member

@Fang- Fang- commented Sep 28, 2018

It's @p, except never scrambles, doesn't care about even number of bytes, and doesn't use -- in large values.
This is needed for tickets, and useful for anything else that may want to use the @p look-and-feel to display data.

Syntax for literals is .~. A .~ by itself is invalid, you need at least one syllable. They follow byte ordering as in the @ux case, so:

@ux       @q
0x1       .~nec
0x201     .~binnec
0x3.0201  .~wes-binnec

Note that leading zeroes are valid, but won't change the value. .~dozzod-dozzod is equivalent to .~zod.

I have included some tests! Pretty sure this is how you test auras: just using them.

It's @p, except never scrambles, and doesn't use -- in large values.
@Fang- Fang- added the %hoon label Sep 28, 2018
@Fang- Fang- requested a review from cgyarvin September 28, 2018 04:17
@Fang- Fang- mentioned this pull request Sep 28, 2018
@ohAitch
Copy link
Contributor

ohAitch commented Oct 4, 2018

What is the use case for diverging on scrambling, saving on a syllable of zero padding for odd numbers of bytes(>1), non-roundtripping "valid" inputs, or removing the long value visual chunking? Can't tickets have the @p look and feel, by being literally @p?

@Fang-
Copy link
Member Author

Fang- commented Oct 4, 2018

They could, but it wouldn't be right. @p is strictly about ship names, and as far as I'm concerned all existing usage of it that isn't literally about representing/storing ship names is incorrect. From a data representation point of view, having ~palfun-foslup and ~palfun-fosnup differ in more than just a single byte is super weird.

I'm not yet 100% set on the removal of visual chunking for longer values by the way, waiting to hear @cgyarvin's thoughts.

@ohAitch
Copy link
Contributor

ohAitch commented Oct 4, 2018

I don't think that matches up with historical usage? Ship names are @p yes, but so are like all currently issued tickets, various hashes that get printed throughout the system, eyre one-time codes, etc.
@p was very much designed to be a generic phonetic representation, with address space merely as the driving central use case

@Fang-
Copy link
Member Author

Fang- commented Oct 4, 2018

Most of the things you listed are going away in the near term anyway. (^:
History was maybe wrong here. @cgyarvin and I agree that @q is more correct for such uses moving forward.

jtobin added a commit to urbit/urbit-ob that referenced this pull request Oct 5, 2018
@vvisigoth
Copy link
Contributor

vvisigoth commented Oct 5, 2018 via email

@Fang-
Copy link
Member Author

Fang- commented Nov 5, 2018

@cgyarvin ping!

@mikolajpp
Copy link

Also pinging. The new parser wants to know whether or not we are supporting this ;-)

@cgyarvin
Copy link
Contributor

cgyarvin commented Nov 11, 2018 via email

@Fang-
Copy link
Member Author

Fang- commented Nov 11, 2018

fyi, @cgyarvin, I will just like merge this sometime during the coming week and assume this is as clean and correct as it gets.

Copy link
Contributor

@cgyarvin cgyarvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, yes, yes! This all looks fine.

@Fang- Fang- merged commit 113f82b into release-candidate Nov 13, 2018
@Fang- Fang- deleted the vat-q branch November 13, 2018 19:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants