loic/crates/loic
Kamal Tufekcic 4eb2362b20
All checks were successful
CI / build (push) Successful in 1m41s
CI / lint (push) Successful in 43s
CI / test (push) Successful in 2m7s
CI / publish (push) Successful in 12s
CI / release (push) Successful in 1m15s
initial commit
2026-09-12 10:37:55 +03:00
..
src initial commit 2026-09-12 10:37:55 +03:00
Cargo.toml initial commit 2026-09-12 10:37:55 +03:00
README.md initial commit 2026-09-12 10:37:55 +03:00

loic

The core library for the Loic Calendar—a temporal framework measuring time from the first ARPANET transmission with Planck-scale precision.

Overview

This library provides:

  • LoicInstant — A moment in time, represented as a 512-bit signed integer counting Planck times (~5.39 x 10^-44 seconds) since the epoch
  • LoicDuration — A span of time in Planck units
  • Mask — An observer configuration selecting active primes from the 15-prime lattice
  • GridCoord — A position in the 128x256 asymmetric lattice (7 cosmic bits x 8 cycle bits)
  • SubdivisionResult — The result of observing an instant through a mask
  • Cosmological coordinates — Your position between Creation (Big Bang) and Annihilation (heat death)

Usage

use loic::{LoicInstant, Mask};

// Observe the current moment
let now = LoicInstant::now();

// Raw Planck timestamp
println!("{}", now.planck());

// Cosmological inquiry
println!("Since Creation: {}", now.cosmic_time());
println!("Until Annihilation: {}", now.terminal_time());

// Lattice position
let coord = now.grid_coord();
println!("Grid: ({}, {})", coord.cosmic(), coord.cycle());

// Observe through a mask (the mask is the observer)
let mask = Mask::dyad();  // The binary split — cycle prime 2
let observation = mask.observe(&now).unwrap();
println!("Position: {}", observation.position());

The Lattice

15 prime factors (7 cosmic, 8 cycle) generate 32,768 temporal subdivisions. A mask selects which primes are active. The product of active primes determines the divisor. Any instant can be observed at any mask's resolution.

Cosmic Primes (7 — named for logic gates)

Name Gate Prime
Andyte AND 16,631
Xoryte XOR 57,251
Oryte OR 21,325,891
Noryte NOR 3,014,283,645,143
Xnoryte XNOR 128,029,476,410,837,813,209,853,261
Notyte NOT 298,824,857,074,158,001,946,609,249
Nandyte NAND 2,862,914,325,674,107...999,805,373

Cycle Primes (8 — axes of temporal subdivision)

Name Prime Character
Dyad 2 The binary split
Pentad 5 The decimal bridge
Heptad 7 The week
Hendecad 11 The prime of primes
Sigma 683 The first stranger
Tau 2,887 The second stranger
Phi 4,279,037,621,376,791,777,197 The cosmic grain
Psi 80,553,260,809,276,197,882,377 The final factor

The Epoch

1969-10-30 06:30:41 UTC

The moment the first ARPANET message was transmitted. The offset 5,419,722 seconds from Unix epoch is squarefree (2 x 3 x 7 x 11 x 11,731), containing three cycle primes.

Platform Requirements

This library requires Linux with CLOCK_TAI support (kernel 3.10+).

The Loic Calendar is built on TAI (International Atomic Time), which maintains the noble pretense that time flows uniformly. Operating systems that smear leap seconds, pretend they don't exist, or fail to provide atomic time have disqualified themselves from temporal inquiry.

Attempting to compile on unsupported platforms will fail. This is intentional.

It also requires the kernel to actually know what TAI is. CLOCK_TAI is CLOCK_REALTIME plus an offset that the kernel does not learn by itself: a time daemon has to read a leap-second table and set it through adjtimex(2). chrony does this with leapseclist /usr/share/zoneinfo/leap-seconds.list or leapsectz right/UTC; ntpd with a leapfile; systemd-timesyncd does not do it at all. On a machine where the offset is zero, the first call to LoicInstant::now() panics and tells you which of those to configure. It will not observe a clock that is lying by a known amount.

Precision and Storage

Time is stored as I512 (512-bit signed integer) internally, providing:

  • Precision: Individual Planck times (~5.39 x 10^-44 seconds)
  • Range: From Creation (~13.8 billion years before epoch) to Annihilation (2^511 - 1 Planck times, ~1.1 x 10^103 years from now — three orders of magnitude after the last black hole evaporates)

No floating-point arithmetic contaminates temporal calculations. The integers are exact. The timestamps are correct.

License

Dual-licensed under AGPL-3.0 and the Loic Public License. See the workspace root for full terms, and the workspace README for the theoretical substrate the license keeps citing.