npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@uor-foundation/sigmatics

v0.3.2

Published

Sigmatics: the Atlas Sigil Algebra reference implementation from the UOR Foundation

Readme

@uor-foundation/sigmatics

The core Atlas Sigil Algebra library - a complete TypeScript implementation of the formal specification v1.0.

Installation

npm install @uor-foundation/sigmatics

Quick Start

import { Atlas } from '@uor-foundation/sigmatics';

// Parse and evaluate a sigil expression
const result = Atlas.evaluate('evaluate@c21 . copy@c05');

console.log(result.literal.bytes); // [0x2A, 0x0A]
console.log(result.operational.words); // ["phase[h₂=0]", "evaluate", ...]

Module Structure

This package is organized into focused modules:

  • api - High-level Atlas class and convenience methods
  • types - TypeScript interfaces and type definitions
  • lexer - Tokenization of sigil expressions
  • parser - AST construction from tokens
  • evaluator - Dual backends (literal/operational)
  • class-system - 96-class equivalence structure and transforms

Sub-module Imports

You can import specific modules for fine-grained control:

// Import specific modules
import { tokenize } from '@uor-foundation/sigmatics/lexer';
import { Parser } from '@uor-foundation/sigmatics/parser';
import { evaluateLiteral } from '@uor-foundation/sigmatics/evaluator';
import type { Phrase, ClassInfo } from '@uor-foundation/sigmatics/types';

API Reference

Main API

// Parse expressions
const ast = Atlas.parse('copy@c05 . swap@c10');

// Evaluate to bytes (literal backend)
const bytes = Atlas.evaluateBytes('mark@c21');
// → { bytes: [0x2A], addresses?: [...] }

// Evaluate to words (operational backend)
const words = Atlas.evaluateWords('evaluate@c21');
// → { words: ["phase[h₂=0]", "evaluate"] }

// Complete evaluation (both backends)
const result = Atlas.evaluate('copy@c05');
// → { ast, literal, operational }

Class Utilities

// Get class information
const info = Atlas.classInfo(0x2a);
// → { classIndex: 21, components: {...}, canonicalByte: 0x2A }

// Test equivalence
Atlas.equivalent(0x2a, 0x2b); // → true (same class)

// Get equivalence class
Atlas.equivalenceClass(21); // → [0x2A, 0x2B]

Belt Addressing

// Compute belt address
const addr = Atlas.beltAddress(17, 0x2a);
// → { page: 17, byte: 42, address: 4394 }

// Decode address
Atlas.decodeBeltAddress(4394);
// → { page: 17, byte: 42, address: 4394 }

D-Transform (Triality Rotation)

The D-transform rotates the modality parameter d with period 3:

// D+k: (h₂, d, ℓ) ↦ (h₂, (d+k) mod 3, ℓ)

// Apply D-transform
const result = Atlas.applyDTransform(21, 1);
console.log(result.newClass); // 5
console.log(result.transformation);
// { h2: 0, d_old: 2, d_new: 0, l: 5 }

// Get triality orbit
const orbit = Atlas.getTrialityOrbit(21);
console.log(orbit.classes); // [5, 13, 21]
console.log(orbit.baseCoordinates); // { h2: 0, l: 5 }

// Get all triality orbits
const orbits = Atlas.getAllTrialityOrbits();
console.log(orbits.length); // 32 orbits covering all 96 classes

Properties:

  • Period 3: D+3 = identity
  • Preserves h₂ and
  • Commutes with R and T
  • 32 triality orbits (96 classes / 3)

Grammar:

<transform> ::= [ R±q ] [ D±k ] [ T±m ] [ ~ ]

Examples:

// Prefix transform
Atlas.evaluateBytes('D+1@ mark@c21'); // → c5

// Combined transforms
Atlas.evaluateBytes('R+2 D+1 T+3@ mark@c0');

// Postfix transform
Atlas.evaluateBytes('mark@c21^D+1'); // → c5

Features

  • Dual Semantics: Both literal (byte) and operational (word) backends
  • 🎯 96-Class System: Authoritative ≡₉₆ equivalence structure
  • 🔄 Transform Algebra: Rotate (R), Triality (D), Twist (T), and Mirror (M) operations
  • 📐 Formal Grammar: Complete parser for sigil expressions
  • 🌐 Belt Addressing: Content-addressable 12,288-slot belt
  • Verified: Includes all specification test vectors
  • 🚀 Zero Dependencies: Pure TypeScript implementation

Development

# Build
npm run build

# Test
npm test

# Watch mode
npm run watch

License

MIT © UOR Foundation