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.
-
I can't prove it but it seems like they just added the cuneiform characters to unicode as they were requested by whoever needed them for their papers and that's the order they are in. "can you add these?" ... and a bunch of new ones get tacked on.
@futurebird I'm pretty sure that's exactly how the process works, there is a committee that you can submit requests to asking for new characters to be added, they review them periodically and assign numbers for each new one then release a new version of the standard which font makers and operating systems then target
-
@futurebird I'm pretty sure that's exactly how the process works, there is a committee that you can submit requests to asking for new characters to be added, they review them periodically and assign numbers for each new one then release a new version of the standard which font makers and operating systems then target
I know it's a bad idea and can think of so many reasons not to do it... but my SOUL longs for them to be in some kind of more coherent order... so that the indices could be used in elegant ways.
But, I guess that's why I have to write little programs like the one that I made.
-
chr(n)
is only defined up to n=256@futurebird @glitzersachen Not in my copy of python (3.13), help(chr) says:
"Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff." -
@futurebird @glitzersachen Not in my copy of python (3.13), help(chr) says:
"Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff."I'll try it in python 3 when I get home.
-
If any unicode/python nerds want to show me how to use the unicode addresses to make the string look-up table I'd *love* that but I found working with python and unicode very annoying and just ended up using the unicode support in trinket. Which is setting a bad example for The Children.
Think of the children!
@futurebird also I just found out through reading the docs that python has the library `unicodedata` and within that, there is `unicodedata.numeric` which works on cuneiform, maybe you could use that?
Also failing that `unicodedata.lookup` could be used to get the character values in a readable way
-
@futurebird also I just found out through reading the docs that python has the library `unicodedata` and within that, there is `unicodedata.numeric` which works on cuneiform, maybe you could use that?
Also failing that `unicodedata.lookup` could be used to get the character values in a readable way
Wait. Does this mean there are default integer values for these? So I could do math on them?
I'm a little skeptical because there are multiple symbols with the same meaning and some are missing...
-
chr(n)
is only defined up to n=256@futurebird This used to be the case when
str
andunicode
used to be different data types. In modern Python, they have been unified, though. -
@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.