Expand description
Sigil Standard Library
A comprehensive collection of built-in functions that leverage Sigil’s polysynthetic syntax and evidentiality type system.
§Modules
- core: Essential functions (print, assert, panic)
- math: Mathematical operations including poly-cultural math
- collections: Array, map, set operations
- string: String manipulation
- evidence: Evidentiality markers and operations
- iter: Iterator-style operations for pipes
- io: File and console I/O
- time: Date, time, and measurement
- random: Random number generation
- convert: Type conversions
- json: JSON parsing and serialization
- fs: File system operations
- crypto: Hashing and encoding (SHA256, MD5, base64)
- regex: Regular expression matching
- uuid: UUID generation
- system: Environment, args, process control
- stats: Statistical functions
- matrix: Matrix operations
- polycultural_text: World-class text handling for all scripts
- Script detection (Latin, Arabic, CJK, Cyrillic, etc.)
- Bidirectional text (RTL/LTR)
- Locale-aware case mapping (Turkish İ, German ß)
- Locale-aware collation (Swedish ä vs German ä)
- ICU-based segmentation (Thai, CJK word boundaries)
- Transliteration to ASCII
- Emoji handling
- Diacritic manipulation
- text_intelligence: AI-native text analysis
- String similarity (Levenshtein, Jaro-Winkler, Sørensen-Dice)
- Phonetic encoding (Soundex, Metaphone, Cologne)
- Language detection with confidence scores
- LLM token counting (OpenAI, Claude-compatible)
- Stemming (Porter, Snowball for 15+ languages)
- Stopword filtering
- N-grams and shingles for similarity
- Fuzzy matching utilities
Structs§
- Quantum
State - Quantum state: 2^n complex amplitudes for n qubits State |ψ⟩ = Σ αᵢ|i⟩ where i is binary representation
Constants§
Statics§
Functions§
- create_
qregister_ value - Create a QRegister value with the given state ID and qubit count
- get_
bufreader_ registry - get_
listener_ registry - get_
quantum_ state - get_
stream_ registry - get_
tcp_ stream - invalidate_
qubit - Invalidate a qubit (mark as consumed for linear type checking)
- merge_
qubit_ states - Merge two qubits from different states into a single joint state Returns (new_state_id, control_idx, target_idx)
- register_
stdlib - Register all standard library functions
- store_
bufreader - store_
quantum_ state - store_
tcp_ stream