Mutant Language Datatypes

From University
Jump to: navigation, search



Bit Width

How many bits is the OS or program designed for?
The first step in a conversion from lower to higher bit bus, say 16bit to 32bit, is determining the original bus bitwidth. For this application use a one byte wide tag where:

Number (N) Meaning
0-253 bits where, 8 * 2N
254 Not Applicable, item does not have a bitwidth.
255 Unknown

Since 2254 = 2.8948022309329048855892746252172e+76 this should provide bits a plenty.

DateTime

Use Julian Day[1] calendar as a baseline. Time is milliseconds since midnight.

DateTime Formats for Software[2]
US Standards ANSI INCITS 30-1997 (R2008) and NIST FIPS PUB 4-2[3]

The standards focus on displaying Date and Time, not how to represent it in software.
So make it easy. The Default Date and Time splits a Int64 into two 32bit segments with the high bits the days after 4713 B.C.E. and the low bits as miliseconds since midnight on that day.

Scientific version is two types. Type 1, use Int64 for Julian Day and Int64 for microseconds since midnight.

Nope the need is for six types.
DateTime, Date, Time -- Int32 bit
DateTime, Date, Time -- Int64 bit

DeepTime
DateTime, Date, Time -- Nibble string


Now for the Banana Problem [4]
How to solve it? Here it's hauling around all the methods needed to translate a DateTime data type to various human and machine readable type. Break it down. Create a separate interpreter library that ONLY works on this datatype -- strong typing -- and call each library element as needed.

Example:
using Time.DateTime.Ordinary
using Library.Time.DateTime.ISO8601
Datetime DT
DateTime.Gregorian GDT.initial( DT )

Internal Links

Parent Article: Mutant_Language