--- layout: qualia title: VibeScript ---
VibeScript 0.1 · Current dialect · Growing Host catalog

The Human & Machine
Semantic Scripting Language

A capability-bounded, typed, deterministic scripting engine for reactive UI cells, signed agent modules, and Host-family apps (using Cosmic;, using LinearAlgebra;). vibe-0.1 is the current dialect and may grow when humans need a better form (versioned and documented). The Host catalog grows. Complements JavaScript for ordinary DOM work while making semantic data, authority, and eligible deterministic execution explicit.

0.1
Current dialect
1,121
Host ALL_BOUND (tip)
105
Capability Families
42 MB
Sentinel Ceiling
41
Bytecode Opcodes
Four ops
Parse · Check · Diagnose · Invoke

Why VibeScript? A semantic execution layer

VibeScript is for programs whose data meaning, authority, and replay semantics are part of the product. It does not ask a browser runtime to infer those boundaries from ad-hoc objects, network calls, and framework conventions.

VibeScript (or Vibe) is the native scripting layer of QualiaDB and the Poet creative environment. It is an interpreted, typed, capability-bounded language engineered with zero heap allocations in hot paths, first-class RDF 1.2 and SPARQL semantics, verifiable deontic norms, and deterministic execution for eligible programs. The 0.1 grammar is current and may grow. The Host catalog grows: more than a thousand live Family.method invoke ids (Cosmic.*, LinearAlgebra.*, GraphDatabase.*, …) bind through using Family; and capability.invoke. Agents repair from vibe::diagnose(src) JSON. JavaScript remains useful for conventional DOM work; Vibe supplies the semantic and authority-bearing layer beneath a UI.

Role 01

Reactive Cell Graphs

Pure, high-frequency formulas driving desktop UI manifolds and QApps. Cells form dependency DAGs with bounded evaluation and strict cycle detection. Performance depends on the selected target and workload; the important invariant is that the hot evaluator does not allocate.

Role 02

Signed Agent Modules

Cryptographically signed programs that query and mutate knowledge graphs. Every external capability (graph query, network pulse, sensor feed) requires an explicit lease grant and execution route, allowing a host to deny or diagnose unavailable authority.

Role 03

Deontic & Event Hooks

Deterministic lifecycle handlers like on pulse:message(...) and on tick(). Prohibitions and obligations can be checked against the QualiaDB logic surface; host effects remain explicit rather than being silently substituted in a standalone browser target.

Where Vibe fits beside other runtimes

Vibe is not a universal replacement for JavaScript, Python, Lua, or embedded Rust interpreters. Its advantage appears when a program needs a typed semantic graph, declared authority, Q42 portability, or an auditable execution boundary.

Dimension VibeScript (vibe-0.1) JavaScript / Node.js Python (CPython) Lua / LuaJIT Rhai / WASM Lite
Security & Sandboxing Capability-Bounded
Strict compile-time leases; no ambient I/O
Host-Defined
Web and Node hosts expose different permission and sandbox models
Open Ambient
Full OS/filesystem reach; monkey-patchable
Manual Sandbox
Requires table-stripping; easily bypassed
Engine Bounded
Host bindings, but lacks deontic norm leases
Hot-Path Allocation Tier-1 Zero Heap
Fixed stack buffers & 42MB Sentinel arena
Managed Heap
Excellent general-purpose tooling; allocation is not the Vibe hot-path contract
Heavy Heap
Reference counting + cyclic GC pauses
Incremental GC
Lightweight, but non-zero heap allocation
Heap Allocations
Extensive Box/Vec/String usage
Graph & RDF Native Native RDF 1.2 & SPARQL
48-byte Super-Quins, <<( s p o )>>, graph?
Libraries available
Flexible RDF tooling, with graph semantics chosen by the application
rdflib / networkx
Extremely slow Python object graphs
None
No native semantic data structures
None
Generic map/arrays only
Determinism & Audit Eligible programs replay
Pure evaluation and canonical representations are deterministic; host effects are declared separately
Application-defined
Determinism is achievable, but framework scheduling and host APIs are application choices
Application-defined
Determinism is achievable, but clock, I/O, and dependency choices remain external
Partially Deterministic
Hash table order nondeterminism
Varies
Depends on host engine configuration
Modal & Deontic Logic Built-In Modalities
obligate, permit, knows, always
Libraries / services
Can integrate solvers, but has no equivalent language-level QualiaDB modality surface
None
External SAT/Z3 solver bindings only
None
No formal verification support
None
Basic conditional control flow only
AI / LLM Generation GBNF & EBNF Constrained
Strict grammar decode guarantees valid code
Grammar Ambiguous
Vulnerable to runtime syntax & type hallucinations
Indentation Fragile
Whitespace errors frequently break generation
Small Grammar
Clean syntax, but runtime fails silently
Medium
Custom syntax not widely trained into LLMs
Physical & Temporal Types First-Class Quantities
400ms, oklch(...), 500nm with checked units
Raw Numbers
No built-in unit dimension algebra
Pint / astropy
Heavyweight external dependencies
Raw Doubles
No unit or color space abstractions
Primitive Types
Requires custom Rust type registration
Runtime Footprint Target-dependent WASM
Small standalone modules are possible; portal, science, and model profiles deliberately differ
30 MB – 100 MB+
V8 engine binary footprint
20 MB – 50 MB
CPython standard library footprint
~300 KB
Minimal C runtime
~1 MB – 3 MB
Rust interpreter bundle

VibeScript 0.1 Feature Highlights

Workshop Dialect

Human-friendly syntax using Animation; with clean method calls like Animation.orbit_spin(t). Unleased method paths fail closed at check-time.

🔗

Two-Way Data Binding

Native bind slider <-> volume using Clamp[0.0, 1.0] resolve latest; keeps reactive states synchronised across UI widgets.

⏱️

Temporal Tweens & Springs

First-class interpolation with 0.0 ~ 10.0 over 400ms ease linear and dynamic physics dampening via spring(stiffness, damping).

λ

Pure Non-Capturing Lambdas

Lightweight |x| expr pipelines for transformation like [1, 2, 3].map(|x| x * 2).filter(|x| x > 2) with zero closure escape overhead.

📜

Ontological Vocab Chunks

Load domain ontologies (SNOMED, QUDT) as tree-shaken .n3 dependency chunks. Canonical IRIs are preserved with zero string table bloat.

🎨

Presentation Sheaves

Colour and pose are first-class values: oklch(0.72, 0.12, 230.0) plus Animation.orbit_spin, returned from main as a record the host can present.

🌏

Multi-Lingual Identifiers

Support for Chinese (locale zh;), Cyrillic, and Arabic identifiers. Golden CBOR-AST hashing guarantees identical execution across all locales.

🛡️

Deontic Norm Enforcement

First-class obligate, permit, and forbid operators evaluate against the verified deontic engine, securing autonomous agent actions.

Stack Bytecode VM

VBC1 stack-based bytecode compiler and VM with 41 opcodes for instant zero-copy serialization and deterministic sandboxed execution.

🩺

Diagnose JSON

Agent loop is vibe::diagnose(src)error_code, byte span, suggested_fix. Codes E001E800. Invalid source is never executed.

🌍

Cosmic & LinearAlgebra Hosts

Live catalog ids such as Cosmic.geodetic_to_ecef and LinearAlgebra.matmul sit on the same four-op host ABI (vibe-host-0.1). Browser LocalHost runs Cosmic kernels in-process; daemon-backed families fail closed with E300.

Canonical VibeScript Demos

Explore real VibeScript programs demonstrating reactive graphics, two-way bindings, clinical vocab, and Cosmic geodesy:

1. 3D Manifold Animation & Presentation Sheaf

using Animation, HID;

// Reactive cells stepping on live temporal ticks
effect cell t := time.now();
cell pose := Animation.orbit_spin(1.0);
cell glow := oklch(0.72, 0.12, 230.0);

// Declarative visual surface present block
present lamp {
    color: glow
    pose: pose
}

2. Two-Way UI Data Binding with Clamp & Resolve

let mut volume = 0.2;
let mut slider = 0.2;

// Two-way reactive bind with bounding clamp
bind slider <-> volume using Clamp[0.0, 1.0] resolve latest;

fn main() -> f64 {
    // Temporal tween easing
    return 0.0 ~ 10.0 over 400ms ease linear;
}

3. Clinical Knowledge Graph & Tree-Shaken SNOMED Vocab

prefix snomed: <http://snomed.info/id/>;
using GraphDatabase;

// Tree-shaken vocabulary query resolved against bounded clinic chunk
pure fn get_diagnosis() -> Iri {
    return snomed:386661006; // Fever (finding)
}

fn main() -> Iri {
    return get_diagnosis();
}

4. Cosmic geodesy (North Spring WGS84)

using Cosmic;

effect fn main() -> Record {
    return Cosmic.geodetic_to_ecef({
        lat_deg: -37.8,
        lon_deg: 144.9,
        alt_m: 0.0
    });
}

VibeScript Ecosystem & Developer Tooling

The VibeScript developer ecosystem is distributed across standalone tooling crates and extensions. Tooling validates a selected execution profile before a native-only call reaches a browser-only target: