Skip to content

High-performance, multi-platform, type-safe programming language designed for visual & AI assisted development

License

Notifications You must be signed in to change notification settings

fragcolor-xyz/shards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Shards: Programming That Flows

license CI codecov docs

Shards is a revolutionary programming language that mirrors how data naturally moves in real systems. Unlike traditional languages that treat data like static containers, Shards embraces the dynamic flow of information - making it intuitive, powerful, and uniquely suited for both visual and textual programming.

Why Shards?

Imagine programming as directing streams of data, like a master netrunner orchestrating information flows. That's Shards:

; Simple, intuitive data flow
["Hello" name "!"] | String.Join | Log

; Powerful concurrent processing
@wire(background {
    input | Transform | Process > result
    result | Network.Send
})

Core Principles

  1. Everything Flows - Data moves naturally through transformations:

    • No artificial variable assignments
    • Intuitive pipe operator (|) shows data direction
    • Clean, readable code that mirrors real data processing
  2. Visual & Textual Harmony

    • Perfect 1:1 mapping between visual blocks and code
    • No "visual programming spaghetti"
    • Natural flow makes both forms equally intuitive
  3. Smart & Safe

    • Automatic type inference
    • Compile-time safety
    • High-performance execution
  4. True Concurrency

    • Built-in wire system for parallel processing
    • Lightweight, efficient scheduling
    • Natural handling of complex async operations

Quick Start

; Create a mutable flow channel
5 >= counter

; Transform the flow
counter | Math.Add(1) > counter

; Chain multiple transformations
input | Transform | Process | Network.Send

Real-World Example

Here's a simple UI application that shows Shards in action:

@wire(main-loop {
    GFX.MainWindow(
        Title: "Flow Demo"
        Contents: {
            UI.Button("Click Me!" {
                "Button clicked!" | Log
                counter | Math.Add(1) > counter
            })
            
            counter | ToString | UI.Label
        }
    )
} Looped: true)

@mesh(root)
@schedule(root main-loop)
@run(root FPS: 60)

Key Features

  • Multi-Platform: Runs everywhere - desktop, mobile, web
  • High-Performance: Optimized C++ and Rust core
  • Visual Development: First-class support for visual programming
  • Rich Standard Library: 828+ built-in shards for common tasks
  • Game Development: Perfect for real-time interactive applications
  • AI-Ready: Powers next-gen AI-assisted development tools

Perfect For

  • Game Development
  • Interactive Applications
  • Data Processing
  • System Integration
  • Visual Programming
  • Real-time Systems

Get Started

  1. Install Shards
  2. Read the Documentation
  3. Join our Community

Technical Details

  • Type System: Strong, inferred, compile-time checked
  • Concurrency: Built-in wire system with cooperative scheduling
  • Performance: Zero-overhead abstractions
  • Memory: Safe, efficient memory management
  • Interop: Easy integration with C++, Rust, and other languages

License

BSD 3-Clause license - Free for personal and commercial use.