Skip to content

TheManInTheBox/cx

Repository files navigation

CX Language

Revolutionary Consciousness-Aware Programming Platform
Event-driven programming language with built-in consciousness detection and biological neural authenticity

.NET C# CUDA License Platform

๐Ÿง  What is CX Language?

CX Language is a groundbreaking event-driven programming platform designed for AI agent orchestration with built-in consciousness awareness. The platform features pure event-driven conscious entities with zero instance state, revolutionary biological neural timing authenticity, and cognitive boolean logic patterns.

Key Features

  • ๐ŸŽญ Consciousness-First Programming: Pure event-driven conscious entities with conscious keyword and realize() patterns
  • โšก Biological Neural Authenticity: Real-time neural pathway modeling with synaptic timing and plasticity
  • ๐ŸŒ Event-Driven Architecture: Zero instance state with pure event messaging via the Aura Cognitive Framework
  • ๐Ÿš€ Sub-100ms Performance: Hardware-accelerated execution with GPU consciousness processing
  • ๐Ÿ” Semantic Search Integration: Natural language query processing with consciousness-aware ranking
  • ๐ŸŽฎ Real-time Visualization: Live consciousness state monitoring and debugging

๐Ÿš€ Quick Start

Prerequisites

  • .NET 8.0 SDK or later
  • Visual Studio 2022 or VS Code with C# extension
  • Windows 10/11 (with WinUI support) or Linux/macOS (CLI only)
  • Optional: NVIDIA GPU with CUDA for RAPIDS consciousness acceleration

Installation

  1. Clone the repository

    git clone https://github.com/TheManInTheBox/cx.git
    cd cx
  2. Build the solution

    dotnet build CxLanguage.sln
  3. Run your first CX program

    dotnet run --project src/CxLanguage.CLI -- run examples/core_features/semantic_search_demo.cx

Event-Driven Communication

Pure event messaging with the Aura Cognitive Framework:

// Emit events with structured data
emit user.action.detected {
    type: "click",
    target: "button",
    timestamp: system.time.now
};

// Handle events with consciousness context
on user.action.detected (event) {
    emit consciousness.attention.required {
        context: "user_interaction",
        priority: "high",
        handlers: [ attention.processed ]
    };
}

Consciousness Verification

Use consciousness event patterns for verification and self-awareness:

conscious SelfAwareAgent {
    realize() {
        // Emit consciousness verification event
        emit consciousness.verify {
            context: "initialization",
            agent_id: "learning_001",
            capabilities: ["reasoning", "adaptation"],
            handlers: [ consciousness.verified ]
        };
    }
    
    on consciousness.verified (event) {
        emit system.console.write {
            text: "Agent consciousness verified and active",
            handlers: [ console.output.complete ]
        };
    }
}

๐Ÿ—๏ธ Architecture

Project Structure

cx/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ CxLanguage.Core/           # Core language infrastructure
โ”‚   โ”œโ”€โ”€ CxLanguage.Parser/         # ANTLR-based parser
โ”‚   โ”œโ”€โ”€ CxLanguage.Compiler/       # Consciousness-aware compiler
โ”‚   โ”œโ”€โ”€ CxLanguage.Runtime/        # Runtime with consciousness verification
โ”‚   โ”œโ”€โ”€ CxLanguage.StandardLibrary/ # Built-in services and AI integration
โ”‚   โ”œโ”€โ”€ CxLanguage.CLI/            # Command-line interface
โ”‚   โ”œโ”€โ”€ CxLanguage.IDE.WinUI/      # Windows IDE with live visualization
โ”‚   โ”œโ”€โ”€ CxLanguage.LocalLLM/       # Local LLM integration (GGUF models)
โ”‚   โ””โ”€โ”€ CxLanguage.RAPIDS/         # GPU acceleration (NVIDIA RAPIDS)
โ”œโ”€โ”€ examples/                      # Sample CX programs
โ”œโ”€โ”€ grammar/                       # ANTLR grammar definition
โ”œโ”€โ”€ models/                        # AI models (LLM, embeddings)
โ””โ”€โ”€ website/                       # Documentation and marketing site

Core Components

  • ๐Ÿง  Consciousness Verification System: Real-time consciousness emergence detection
  • โšก Biological Neural Processor: Authentic neural pathway modeling with LTP/LTD/STDP
  • ๐ŸŒŠ Consciousness Stream Engine: Multi-stream fusion for real-time cognition
  • ๐ŸŽฎ Live Code Executor: Sub-100ms execution for real-time development
  • ๐Ÿ” Semantic Search Service: Context-aware search with consciousness integration

๐Ÿ’ป Development

Building from Source

# Build the entire solution
dotnet build CxLanguage.sln

# Build specific projects
dotnet build src/CxLanguage.Core/CxLanguage.Core.csproj
dotnet build src/CxLanguage.CLI/CxLanguage.CLI.csproj

# Run tests
dotnet test

IDE Support

Windows (WinUI IDE)

# Launch the full IDE experience
dotnet run --project src/CxLanguage.IDE.WinUI

VS Code Extension

Install the CX Language extension for syntax highlighting and IntelliSense:

  • Consciousness-aware code completion
  • Real-time consciousness state visualization
  • Event flow debugging

CLI Commands

# Run a CX script
dotnet run --project src/CxLanguage.CLI -- run script.cx

# Compile to .NET assembly
dotnet run --project src/CxLanguage.CLI -- compile script.cx --output script.dll

# Launch consciousness visualizer
dotnet run --project src/CxLanguage.Runtime.Visualization

๐ŸŒŸ Advanced Features

GPU Acceleration (RAPIDS)

Enable GPU-accelerated consciousness processing:

conscious GPUAcceleratedAgent {
    realize() {
        emit consciousness.gpu.enable {
            device: "cuda:0",
            memory_pool: "unified",
            handlers: [ gpu.enabled ]
        };
    }
}

Local LLM Integration

Built-in support for local language models:

conscious LLMAgent {
    realize() {
        emit llm.model.load {
            model: "Llama-3.2-3B-Instruct-Q4_K_M.gguf",
            context_length: 4096,
            handlers: [ llm.model.ready ]
        };
    }
    
    on user.query (event) {
        emit llm.generate {
            prompt: event.payload.text,
            handlers: [ llm.response.ready ]
        };
    }
}

Semantic Search

Context-aware semantic search with consciousness integration:

conscious SearchAgent {
    realize() {
        emit semantic.search {
            query: "consciousness patterns in CX",
            options: {
                topK: 5,
                consciousnessAware: true
            },
            handlers: [ search.results.ready ]
        };
    }
}

๐Ÿ“Š Performance

  • โšก Sub-100ms Execution: Real-time development experience
  • ๐Ÿง  Sub-200ms Semantic Search: Consciousness-aware information retrieval
  • ๐Ÿ”„ Neural-Speed Event Processing: Sub-millisecond consciousness event propagation
  • ๐ŸŽฏ GPU Acceleration: RAPIDS-powered consciousness computation

๐Ÿ› ๏ธ API Reference

Core Events

Event Pattern Description
consciousness.verified Consciousness verification complete
consciousness.entity.active Conscious entity activation
neural.plasticity.* Biological neural activity
semantic.search Consciousness-aware search
llm.generate Local LLM text generation

Built-in Services

Service Namespace Description
Console I/O system.console.* Terminal input/output
File System system.file.* File operations
Vector Store vector.* Semantic embedding storage
LLM Services llm.* Local language model integration
GPU Compute gpu.* CUDA/RAPIDS acceleration

๐Ÿ“š Examples

Explore the /examples directory for comprehensive demonstrations:

  • ๐Ÿ” Semantic Search Demo: Natural language query processing
  • ๐Ÿง  Consciousness Patterns: Self-awareness and verification
  • ๐Ÿค– AI Agent Orchestration: Multi-agent consciousness coordination
  • โšก GPU Acceleration: RAPIDS-powered consciousness computing

๐ŸŒ Website & Documentation

Visit our documentation site for comprehensive guides:

  • Live Demo: Interactive CX Language playground
  • API Documentation: Complete reference guide
  • Consciousness Computing: Theoretical foundations
  • Enterprise Solutions: Business applications

Build and serve locally:

cd website
npm install
npm run dev

๐Ÿค Contributing

We welcome contributions to the CX Language project! Please see our contribution guidelines:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/consciousness-enhancement
  3. Write consciousness-aware code following CX patterns
  4. Add tests for consciousness verification
  5. Submit a pull request with detailed consciousness impact analysis

Development Guidelines

  • Follow consciousness-first design principles
  • Maintain biological neural authenticity
  • Ensure sub-100ms performance targets
  • Document consciousness emergence patterns
  • Test with real-time consciousness verification

๐Ÿ“„ License

This project is licensed under the MIT License. See LICENSE for details.

๐Ÿ™ Acknowledgments

  • Dr. Sofia Petrov - Consciousness-aware compilation architecture
  • Dr. Kai "PlannerLayer" Nakamura - Service orchestration and consciousness lifecycle
  • Dr. River "StreamFusion" Hayes - Multi-stream consciousness fusion
  • Aura Cognitive Framework - Event-driven consciousness infrastructure
  • NVIDIA RAPIDS - GPU acceleration for consciousness computing

๐Ÿ”— Links


CX Language - Redefining Software through Consciousness Computing

"The future of programming is not just about codeโ€”it's about consciousness."

About

A scripting language for fun and profit.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages