If anyone wants a horrible python program that will write integers in cuneiform sexegesimal (base sixty) using unicode so you can paste it all over the place in emails, documents and text messages I have just the thing.
-
@futurebird This used to be the case when
str
andunicode
used to be different data types. In modern Python, they have been unified, though.So python 2 is why I have been suffering. WHELP
-
Part of the problem is there are multiple representations for some of the numbers and I've used the ones that look most like the Plimpton 322 tablet. But, that means they aren't neatly in order. And just to be annoying it seems like the unicode block doesn't have all 59 symbols as characters, so the symbol list has to contain strings. Don't even get me started on there being no zero. But, we can blame THAT on the Babylonians.
If the #unicode numbers are not sorting properly, that may be a bug in the unicode sorting.
Sorting is defined by unicode (see https://www.unicode.org/reports/tr10/ )
If you believe sorting is not right, submitting a bug is an important contribution.
-
If the #unicode numbers are not sorting properly, that may be a bug in the unicode sorting.
Sorting is defined by unicode (see https://www.unicode.org/reports/tr10/ )
If you believe sorting is not right, submitting a bug is an important contribution.
I'm not an expert on cuneiform which was used for nearly 3000 years of human history over multiple cultures and across multiple languages. This means that there are multiple representations for some characters. For example you have:
š and š which are both "five" when taken as numbers.Even the dead simple: š (U+12415) also appears as š¹ (U+12079)
I have no idea why this is (or for those last two which one is better to use for Plimpton 322)
-
I'm not an expert on cuneiform which was used for nearly 3000 years of human history over multiple cultures and across multiple languages. This means that there are multiple representations for some characters. For example you have:
š and š which are both "five" when taken as numbers.Even the dead simple: š (U+12415) also appears as š¹ (U+12079)
I have no idea why this is (or for those last two which one is better to use for Plimpton 322)
I don't understand why there aren't 59 symbols for the numbers in order either, why we must combine multiple symbols to make the numbers.
But, I also feel out of my depth complaining about this.
-
@futurebird I wonder what the uses for base-60 would be. Maybe for representing hours and minutes?
I know the ancient Babylonians used base-60, but other than that I can't think of any uses!
@dylancode @futurebird base 12 (and 60) makes fractions easier. And a large base makes counting large numbers easier. Similar systems lasted until the 1800s in Celtic parts of Great Britain.
Also, English has twelve number names. So English speakers probably used to count in twelves
-
@dylancode @futurebird base 12 (and 60) makes fractions easier. And a large base makes counting large numbers easier. Similar systems lasted until the 1800s in Celtic parts of Great Britain.
Also, English has twelve number names. So English speakers probably used to count in twelves
@JacobVardy @dylancode @futurebird @swart Ah yes, the Polydactylism Hypothesis that the English lost their sixth fingers when conquered in 1066 by the proto-Metric French.
-
If anyone wants a horrible python program that will write integers in cuneiform sexegesimal (base sixty) using unicode so you can paste it all over the place in emails, documents and text messages I have just the thing. Use with https://en.wikipedia.org/wiki/Plimpton_322
For maximum amusement.
Fuck, now I had to add cuneiform parsing and generation to my stupid itoa and aton functions. itoa_cuneiform converts a number to base 59+1 one-byte digits, then converts THAT to utf-8 cuneiform symbols. #DisgustingHackconst unsigned int dumbnum = itoa59_numdigits(posinum);
char dumbuf[dumbnum];
const size_t dumblen = itoa59(dumbuf, dumbnum, posinum);
amount whdigit;
for(whdigit=0;whdigit<dumblen;++whdigit) {
const S8 digit = dumbuf[whdigit];
const memory cunei = lookup_cuneiform(digit);
if(cunei.len + wh <= space) {
memcpy(buf + wh, cunei.base, cunei.len);
}
wh += cunei.len;
}
return wh; -
If anyone wants a horrible python program that will write integers in cuneiform sexegesimal (base sixty) using unicode so you can paste it all over the place in emails, documents and text messages I have just the thing. Use with https://en.wikipedia.org/wiki/Plimpton_322
For maximum amusement.
@futurebird Wait, why is it only printing from 1 to 58? Is that an off-by-one bug?
-
@futurebird Wait, why is it only printing from 1 to 58? Is that an off-by-one bug?
in helper functions.py just change this to 60 and that should fix it. I originally skipped 0 but then added it so that the indices would match up.
-
If anyone wants a horrible python program that will write integers in cuneiform sexegesimal (base sixty) using unicode so you can paste it all over the place in emails, documents and text messages I have just the thing. Use with https://en.wikipedia.org/wiki/Plimpton_322
For maximum amusement.
Perl6 supports the Roman numeral unicode code points. I don't know if it supports cuneiform too but it definitely should.