Welcome to N Lang — a self-evolving Node Language built to be the foundation for the next generation of Machine Learning languages and AI modeling. This guide will help you get started writing and deploying your own Sub-dividable N-Lang Apps (Snapps for short).
Under the hood, N Lang is a statically typed, declarative Temporal DAG — a directed acyclic graph with time as a first-class dimension. Its immutable ledger, distributed runtime, and programmable graph of nodes aren't just for building cloud and agentic software — they're the substrate that lets your types learn, train, and improve themselves over time, fully audited and reversible. If you’re looking for deeper technical details, check out the official N Lang Specification. We’re excited to see what you’ll build.
- What is N Lang?
- What is a Node Language?
- What are Nodes?
- What is a Temporal DAG?
- What type of language is N?
- What makes N unique?
- Is N Lang self-evolving?
- Is N Lang for Machine Learning & AI?
- Direct & Indirect Interpretation?
- Why create a new language?
- Is N Lang hard to learn?
- Why would I use N Lang?
- What would I use N Lang for?
- What is an N-gineer?
- What is an N Lang program?
- How do I learn to write a Snapp?
- Is N Lang extendable?
- Can I develop my own N Lang blocks?
- How do I develop my Snapp?
- How do I interpret my parsed Snapp?
- How do I deploy my Snapp as an application?
- How do Snapps communicate?
- How do I message my N Lang application?
- Where are Snapps stored?
- How is N Lang Licensed?
N Lang is a “Node Language” — a language for creating and programming distributed data on a programmable graph of nodes. It provides a framework for writing simple, sub-dividable programs (Snapps) that, when composed, build fast, reliable, and maintainable distributed software that securely scales.
-
ALWAYS Forward-Backward Compatible
Data and shape changes are core features, not afterthoughts. You can evolve your data and programs without breaking older versions — crucial at massive scale. -
Programmable Graph of Nodes (a Temporal DAG)
Data models imitate real life and programs are a graph of Nodes — formally a Temporal DAG, where time is a first-class dimension — that you can split, merge, or recombine into different modules, libraries, or services. -
First-Class Data
Data is king. Node state changes automatically trigger deterministic events, making it ideal for reactive and event-sourced apps. -
Built-In CEQRS
Extends CQRS into state-of-the-art CEQRS — Commands, Events Queries — so your data is consistent, trackable, and verifiable across distributed nodes. [TODO, link] -
Distributed Runtime
One ore more Nodes can run across machines or regions, unified by a persistent distributed ledger. Horizontal scaling and replication come standard. Easily set boundaries and endlessly vertically scale apps. -
Native & Foreign Function Interface
Tap into Rust, C, Java, Python, JavaScript or other languages seamlessly. N Lang’s FFI lets you integrate and extend easily and ship VMs where your nodes live. -
Declarative & Typed
Focus on what your data should do, not how to do it. Statically checked types reduce runtime errors, enhances testing, and keeps code reliable. -
Security & Reliability
Built-in permissions, robust error handling, and event-based orchestration help you craft secure, fault-tolerant systems ready for production. -
Functional, Reactive, Pattern Matching
N Lang is a functional language with reactive programming and pattern matching built-in. This makes it easy to write complex programs with simple, readable code. -
Self-Evolving by Design
Types can opt into self-improvement. The immutable ledger becomes automatic training data and monad operators (=>>,>>,@>>) are the evolution primitives — so your code can learn, adapt, and roll back on regression, all auditable and deterministic. Evolution isn't a framework bolted on; it's monad application on typed graphs. -
Machine Learning as a Native Type
Trainableextends the self-evolutionAdaptivetrait, so ML is first-class rather than a library afterthought: tensors with shape-checked types, automatic differentiation, training, and distributed gradient merge are built in. Every weight update is a versioned ledger entry — "what were the weights at epoch 50?" is just a time-travel query.
A Node Language uses recursively linked “programmable nodes” within a semi-directed graph. In N Lang, each Node can represent anything from a simple scalar value to an entire database or even an entirely other N Lang program.
Nodes are N Lang’s core data structures. They can be as simple as a single value or as complex as a nested hierarchy of data. Nodes become incredibly powerful when linked together in a graph, enabling distributed, reactive programming at scale.
It's the precise structural description of what every N Lang program is. A Directed Acyclic Graph (DAG) is a graph of nodes and directed edges with no cycles. A Temporal DAG adds time as a first-class dimension: each node is a fact at a specific causal moment, edges are causal relationships, and the graph only ever grows forward — nothing is removed or modified.
N Lang's immutable, append-only ledger is this structure: every entry is a DAG node, vector clocks define the causal edges, and no fact is ever erased. References between nodes are stored as path values, not structural edges — so even data that looks cyclic resolves to a traversal over an acyclic structure. The DAG itself can never cycle.
Because time is structural rather than bolted on, you get enormous leverage for free:
- Time-travel without infrastructure — any past state is just a traversal to a causal depth (
node@[datetime]). No history tables, no event-log service. - Auditability by construction — every change has a causal parent; you cannot write a program that loses history.
- Distribution without coordination — append-only + vector clocks give conflict-free merges (CRDT semantics fall out naturally).
- Parallelism by structure — independent (causally unrelated) branches are detected statically and evaluated in parallel.
This is the same model behind Git, blockchains, CRDTs, and event sourcing — unified into one statically typed, declarative language where the Temporal DAG is the thing you program against directly. See The Temporal DAG Model in the specification.
N Lang is a:
- Statically typed
- Declarative
- Functional
- Trait based
- A Temporal DAG — a directed acyclic graph with time as a first-class dimension
- Lazily initialized & evaluated distributed “tuple space” language
However, we prefer to call it a Node Language, keeping things simple. Simple is an N Lang theme.
N Lang has a built-in immutable ledger that stores your Nodes, offering powerful event sourcing and versioning through a novel implementation of CQRS called CEQRS (pronounced "Sea crest").
N can notably always (de)serialize to and from JSON.
Most of all, N Lang is self-evolving. Because every change to a Node is a recorded ledger event, the language has a complete, replayable history of how your data and programs behave — and it can use that history to improve them. This is what makes N Lang the foundation for the next generation of Machine Learning languages and AI modeling: the features ML needs (auditable state, distributed training, time-travel, typed numerical data) are features N Lang already has for other reasons.
Yes — and this is now core to N Lang's identity. N Lang treats self-evolving code as a first-class language feature.
The key insight: monads are evolutions. N Lang's monad operators already express the primitives evolution needs — replace (=>>), insert (>> / <<), crossover (>>> / <<<), selection (><), and population merge (@>>). So a type can improve itself with no special machinery; it's just monad application on a typed graph.
Types opt in through the std::evolve trait hierarchy — Evolvable, Fitness, Transformable, Crossable, Selectable, and Adaptive (which combines them all). Mark a method #[adaptive(...)] with a fitness function and a trigger, and the type automatically:
- Tracks every call in the immutable ledger (your training data, for free)
- Maintains a population of implementation variants
- Evolves when triggered (error spikes, latency, or an explicit signal)
- Selects the best-performing variant
- Rolls back on regression
Because the ledger is the source of truth, every evolution step is deterministic, auditable, and reversible. See Self-Evolution in the specification for the full trait hierarchy and triggers.
Yes. N Lang is designed to be the foundation for the next generation of ML languages and AI modeling — making machine learning as easy as defining a type.
ML in N Lang isn't a library bolted onto a language that was never meant for it. It's a natural extension of self-evolution: gradient-based optimization is just directed evolution. The loss function measures fitness, backpropagation computes the gradient of fitness, and gradient descent selects the next generation. That's why Trainable extends the Adaptive trait — every model inherits the full self-evolution toolkit.
What you get natively:
- Tensors with shape-checked types —
Tensor<f64, 784>is verified at the type level, not discovered at runtime. - Automatic differentiation —
#[differentiable]functions andgrad(), with lazy computation graphs. - Auditable training, for free — every weight update is a monad on a ledger node, so "what were the weights at epoch 50?" is a standard time-travel query. No separate experiment-tracking service.
- Distributed & federated by default — CRDT-based gradient merge (
@>>), sharding, and federated training reuse the runtime that already exists. - Models as Snapps — a trained model is a versioned, signed Snapp resolved like any other dependency.
A complete image classifier is roughly ten lines: derive Trainable, write a #[differentiable] forward pass, then fit and classify. The spec's Tensor and ML section covers supervised, unsupervised, and reinforcement learning, transformers, GNNs, diffusion models, and more — all built on the same node-and-ledger substrate you use for everything else.
The world has seen some pretty incredible languages over the years, but N Lang is here to solve two intertwined problems: fearless distributed computing and data-driven programming — and, on top of them, to become the foundation for self-evolving, AI-native software.
When we started N Lang, we saw how Hyper-text transformed how people connected with each other. N Lang aims to transform how data connects both humans and AI — and how software learns from that data. We've taken decades of human experience and modern development demands to devise a simple and intuitive syntax that enables distributed and event-driven patterns and makes them second nature.
We interviewed thousands of Engineers, Developers, Programmers, Designers, Architects, and even Business Owners to understand what they needed from software, and the result is a new language & system we could only describe as "N Lang".
Modern teams need to move fast in a distributed world, but building secure and reliable systems at scale is REALLY hard — and training and evolving models on top of them is harder still. N Lang is here to make both easy. We call it fearless distributed computing: the immutable ledger, type system, and permission model do the worrying so you don't have to, whether you're shipping a service or a self-improving model.
From CEQRS (Command, Event, Query, Responsibility, Segregation) and CRDTs to immutable ledgers, hot module swapping, and self-evolving types, we believe making these “hard problems” simple makes N Lang a go-to choice for building reliable, maintainable, and secure systems at scale.
We also believe that Foreign Functions should first class citizens. N Lang should be easy enough to be productive in a day, and still let you reach for the best tools for the job when you need them.
Just as HTML introduced a straightforward way to structure content, we wanted to create a common thread for some of computing's most difficult problems — one that any developer could pick up quickly.
Finally, Under the hood, N Lang follows a robust language → parser → interpreter → gateway approach, time-tested by global adoption in other paradigms, but supercharged for today’s data-driven and AI-modeling demands.
No. In fact, you likely already know more N Lang then you think. You should be able to pick it up in an afternoon, and spend years understanding and mastering its depths.
It's designed around the concept that small simple systems make complex systems work and ideal small systems are highly reusable. Which means you can learn it progressively. At scale, it does require a certain mindset around Nodes and ledgers.
Also, N Lang's syntax is intentionally human-readable and somewhat familiar (technically a superset of JSON). You can scale your knowledge gradually, creating small blocks that compose into large systems.
Bluntly, there are things that only N Lang can do, but also N Lang speeds up development and reduces maintenance for distributed, event-driven, data-centric, and increasingly AI-driven applications. Even complex operations and data types like CRDT based conflict resolution — and self-evolving, trainable types — are built-in. You’ll spend less time wiring and more time building real value. AND when there isn't something in N Lang's toolbox, you can simply extend the language with first class foreign functions from your favorite languages and applications.
Even if you are an absolute expert in distributed computing and large scale systems, it would take you months to write even a fraction of the code that N Lang can write securely in minutes. When we apply our collective knowledge to a common language, we can build systems that are more reliable, more maintainable, and more secure.
But it's more than just productivity and speed. N Lang enables you to create, connect, and recombine data in ways that can be shared globally across hundreds of different professions. It enables Software-as-a-Utility — for all.
N Lang is ideal for:
-
Machine Learning & AI Modeling
Define, train, and ship models as types. Training history is an auditable, time-travelable ledger query, and distributed/federated training is built in — no separate MLOps stack required. -
Self-Evolving Systems
Build programs that improve themselves against a fitness function, maintain a population of variants, and roll back automatically on regression. -
Cloud & Agentic Software
Use N Lang to make the ultimate agentic software fast. Fearless distributed computing — networked, self-improving software — is N Lang’s sweet spot. -
Service Creation and Integration
Make fast, maintainable APIs or connect existing services at scale. -
Auditability
Create systems that are auditable and verifiable at every step. -
Orchestration / Configuration
Similar to Infrastructure as Code, but extended into service creation, integration, or recombination. -
Complex Operations
Perfect for data pipelines, CQRS, or any environment where data modeling and reliable state transitions are paramount. -
Information Modeling
Replace or enhance a traditional CMS, unify shifting schemas, or structure data for content platforms, data warehouses, or operational stores. -
Data Transformation
Convert unstructured data into structured data, or manage schema evolutions and data transformations.
If you already use Infrastructure as Code, N Lang extends that mindset to services themselves—provision, connect, and recombine them with version-controlled declarations.
In an Internal Development Platform or multi-service environment, N Lang orchestrates and unifies microservices, speeding up integration and reducing complexity.
For CMS or content-driven systems, N Lang shapes your data and automates how it evolves. It can also serve as a bridging layer between unstructured data and well-defined schemas.
An N-gineer is someone who writes and maintains N Lang programs (Snapps). The name reflects the mix of disciplines involved in node-based, data-driven development.
An N Lang program, also called a Snapp, is a Sub-dividable, N-Lang, Application, or chunk of logic, configuration, or data transformations expressed in N Lang syntax. Snapps can be composed into larger systems or split into smaller modules by grouping nodes and sub-dividing them.
Check out the N Lang Tutorial Series or the N Lang Specification. Start small with a simple Snapp, then build up as you learn more advanced concepts.
Absolutely. N Lang supports foreign functions natively, letting you call into Rust, C, Java, Python, JavaScript or other languages for advanced features. It's important to note, N Lang follows a "let it crash" philosophy, so if foreign functions fail, it won't stop the rest of the program from running.
Yes. You can create new block types, parse, compile, and interpret them in the native syntax. This makes your Snapps more modular and reusable.
- Install N Lang CLI to manage, build, and run Snapps. [TODO, link]
- Use any UTF-8 editor or an IDE with syntax highlighting.
- Write
.nfiles for your N documents. You can also parse.n.md,.yaml, or.tomlinto N.
- Use the N Lang CLI [TODO, link] to start your N program.
- Or integrate it with a specialized interpreter.
nlang startdeploys an N Lang app if you’re using its built-in ledger graph.- Other interpreters exist for specialized use cases:
- Nimble: Integrates with SvelteKit for web apps.
- Strataform: Handles web infrastructure orchestration.
- Raconteur: Builds scalable APIs, automations, and integrations.
Snapps can exchange messages through N Lang Gateways using the N Lang Message Wire Protocol (MWP). They can also interoperate across different expression models. The Kong Gateway plugin converts standard HTTP requests into the N Lang MWP, offering a bridge for external services.
Depending on your chosen runtime/interpreter, you’ll typically send messages via an N Gateway or using the MWP directly. More gateway options will appear over time—watch the ecosystem grow!
Snapps are published to and resolved from the Snapp registry — N Lang's single distribution channel. There's no separate package manager and no alternative artifact store: libraries, applications, toolchain components, and CLI plugins all live in the same registry, with integrity verification (BLAKE3, SHA-256, Ed25519 signatures), SemVer resolution, and platform-specific artifacts for native/WASM FFI.
Every Snapp lives under a scoped name following the @kind::scope/name convention, where kind is a verification domain (com, org, dev, io, sol, eth, did):
@com::acme/deploy # Acme Corp's deploy tool, DNS-verified on acme.com
@com::acme::data-team/utils # a nested team sub-scope
@sol::5FHwkRdp/oracle # a Solana program owner's oracle, chain-verified
Before publishing you claim a scope (nlang registry scope claim @com::acme) and prove ownership — a DNS TXT record for com/org/io/dev, or a signed challenge for blockchain and DID scopes.
Three scopes are reserved and owned by Squillo, verified via DNS — no third party may publish under them:
| Scope | Domain | Purpose |
|---|---|---|
@io::nlang |
nlang.io |
Official N Lang standard library and toolchain Snapps |
@dev::squillo |
squillo.dev |
Squillo products — the Snapp store, registry infrastructure, enterprise tooling |
@com::squillo |
squillo.com |
Squillo commercial products and enterprise offerings |
You can still keep work in Git while developing; the registry is how Snapps are shared, versioned, and resolved as dependencies. For the full scope grammar, verification methods, and bundle format, see Registry and Scoping in the specification.
N Lang follows a “crawl, walk, run” philosophy. Currently:
- Research License (non-commercial use, free for annual revenue under \ $10,000)
- Commercial License (exclusively through Squillo for commercial use. Essentially, if you make money off the software, then part of it needs to go back to the community. Don't worry, the Snapp store will make this easy and help you too!)
As the project matures, the licensing model will evolve towards a more open model, so check back for updates.
Happy N-gineering! Feel free to contribute, ask questions, or share your Snapps. We’re excited to see how you’ll use N Lang to reshape data programming for the cloud and beyond.
