3 ms·
Seeing this gave me the idea to use Julia's metaprogramming to create a package for this... and of course someone has already done it: https://github.com/anthon
by sundarurfriend 3y ago
Seeing this gave me the idea to use Julia's metaprogramming to create a package for this... and of course someone has already done it: https://github.com/anthonyclays/RomanNumerals.jl https://github.com/anthonyclays/RomanNumerals.jl
Amazingly, R actually seems to support Roman numerals natively: https://stat.ethz.ch/R-manual/R-devel/library/utils/html/roman.html https://stat.ethz.ch/R-manual/R-devel/library/utils/html/rom...
Limited numerical range, but seems to have full support for treating them as normal numbers!
The Wolfram Language has some support for converting to and from Roman numerals [1], and Common Lisp's `format` takes a `@R` modifier to print a number as its Roman numeral [2].
[1] https://reference.wolfram.com/language/ref/RomanNumeral.html https://reference.wolfram.com/language/ref/RomanNumeral.html
[2] http://www.lispworks.com/documentation/HyperSpec/Body/22_c.htm http://www.lispworks.com/documentation/HyperSpec/Body/22_c.h...
- JoBrad 3y agoIt would be great if we could extend the parser for “ruf” str prefixes in Python to add new string functionality. I’m sure we could subclass str, but using something like rn”XV” would be much nicer!