I was watched this yt video. Seemed in interesting so I thought I would make a package for using Mayan numerals since Julia has Unicode support and what not. Here is the package (MayanNumerals.jl).
The github readme doesnโt do your work justice
julia> using MayanNumerals
julia> Mayan(0)
๐
julia> Mayan(1)
๐ก
julia> Mayan(3)
๐ฃ
julia> Mayan(5)
๐ฅ
julia> Mayan(8)
๐จ
julia> Mayan(14)
๐ฎ
julia> Mayan(20)
๐ก๐
julia> Mayan(100)
๐ฅ๐
julia> Mayan(369)
๐ก๐ ๐ฉ
julia> Mayan(359)
๐ฑ๐ณ
julia> Mayan(360)
๐ก๐ ๐
julia> Mayan(420)
๐ก๐ฃ๐
julia> Mayan(1024)
๐ข๐ฏ๐ค
I didnโt even think of people not having the font installed. Oops! I wonder if there is a way to check if the user has the right font to render the glyphs (not much help in the readme though).
How do you do numbers less than one?
What is Pi in Mayan number system???
What about negative and imaginary numbers?
You donโt need fonts, just use an array of Ints
Are you going to use Big Mayan Indians or Small Mayan Indians for your array?
You might like my AncientNumbers.jl, which supports calculations like XV + ๐ - ไท == ๐๐๐
โฆ but no Mayan. (Maybe becaue ๐
doesnโt parse as in Julia?)
I did absolutely consider it to have negative and decimal. I decided against it because it would have been a bit anachronistic. Technically, the numeral system is base 20 where on the 3rd (1st being the ones place) base is different.
I did consider using an array of Ints, but decided to make the Mayan number a think wrapper around an Int type since it makes it easier to implement arithmetic.
Wow great package! Iโll have to check it out! The interesting about the Mayan Unicode codepoints is that Julia does recognize them as numerals since isnumeric('๐ ') == true
.
Iโve recently been dealing with a shady merchant who sent me a bad delivery, finally I can calculate the refund Iโm owed for the adjusted value of this pile of low-grade copper (not to mention the terrible customer service my employee had to deal with)