gritzko / ron

(dated, see the site) Replicated Object Notation, a distributed live data format, golang/ragel lib
http://replicated.cc
Apache License 2.0
360 stars 7 forks source link

Clarify Number UUID #35

Open lambdafu opened 6 years ago

lambdafu commented 6 years ago

uuid.md says:

        00. ?decimal index (up to 9999999999%, also 2D indices 4%5)

This needs clarification. Due to the rules for compression, 4%5 should be the same as 4000000000%5000000000, which is unexpected :smile: The 2D index (4,5) would be represented as 0000000004%0000000005, right?

It seems number UUIDs are currently unused, so the impact is low.

gritzko commented 5 years ago

Yep, so far we are unsure how to implement nice readable array/matrix indices. The currently working variant is :00001%00002 for matrix[1][2]

cblp commented 5 years ago

@gritzko do you mean 0000000001%0000000002 or 0000100000%0000200000?

cblp commented 5 years ago

Why should it be readable?

gritzko commented 5 years ago

Nope. Frame size limit is 2^31. Hence, we only need five base64 digits for an index. Hence, this fixed-width form: :00001%00002

Human readability is the reason we need the text format.

gritzko commented 5 years ago

Recently, I was working a lot with JNI, which uses JVM's internal notation a lot. Got used to those (JJ)V, (JLjava/nio/ByteBuffer;)V and suchlike. The mandatory semicolon was a bit inconvenient, but otherwise OK.

cblp commented 5 years ago

@gritzko such exceptions make the format harder to implement. 5 zeroes which will be often shortened to ) don't worth a special format.

gritzko commented 5 years ago

@cblp IMO, that's a minor convention. I mean, using the upper 30 bits.

cblp commented 5 years ago

@gritzko OK, this may work