Coming Soon • In Active Development
Puffin Mascot Logo

Puffin Programming Language

A structured, modular language engineered for lexical scoping, first-class namespaces, nested collections, and seamless preprocessor compilation.

server_metrics.pfn Puffin Syntax
# Puffin: Lexical blocks, namespaces, macro directives & collections
:>def SERVICE_ID "puffin-core"
:>require_env RUNTIME_ENV
:>coprocess METRICS "system-collector --json"

namespace Telemetry {
    :>export record_event

    function record_event(event_name) {
        static call_count = 0
        let timestamp = systime()
        call_count++

        # Nested dictionary & list literal constructors
        let record = D{
            "service": @{SERVICE_ID},
            "event": event_name,
            "env": ENVIRON["RUNTIME_ENV"],
            "stats": D{
                "invocations": call_count,
                "epoch": timestamp
            },
            "tags": L["fast", "scoped", "modular"]
        }

        return record
    }
}

BEGIN {
    let report = Telemetry.record_event("service_boot")
    :>assert ExistsPath(report, "stats", "invocations"), "Missing stats"
    
    print "Puffin Engine Ready -> Invocations:", GetPath(report, "stats", "invocations")
}
🧩

Lexical Scoping & State

True block-level scoping with let, persistent function-lifetime memory with static, and immutable const folding.

📦

Namespaces & Modules

Encapsulate code with namespace, explicit symbol exports (:>export), and guard-protected multi-file inclusion (:>inc, :>ninc).

🗂️

Nested Collections

First-class literal syntax for lists (L[...]) and dictionaries (D{...}) with deep path traversal via GetPath and SetPath.

Coprocesses & Safety

Bidirectional interactive shell coprocesses (:>coprocess), runtime assertions (:>assert), and environment verification (:>require_env).

puffin-lang.org www.puffin-lang.org puffinlang.org puffin-lang.com puffinlang.com