Built from raw machine code

Nexus

The world's most advanced programming language. Simpler than Python, more powerful than all. Zero external dependencies.

-- A neural network in Nexus
let weights = Tensor.random[784, 256]
let output = input @ weights + bias
let grads = grad loss over params

Designed from first principles

Every design decision serves a purpose. Nexus rethinks programming from the ground up.

Zero-Erasure

Reversible computing for minimal energy dissipation. Every operation can be undone, approaching the thermodynamic limit of computation.

📍

Locality of Intelligence

Code moves to data, not data to code. Computation happens where the information lives, eliminating unnecessary data transfer.

Parallelism by Default

No threads, no async, no await. The interaction net VM automatically parallelizes computations across all available cores.

Differentiability

Every function has a gradient. Automatic differentiation is built into the IR, making machine learning a first-class citizen.

Try Nexus in your browser

Write and run Nexus code instantly. No installation required.

editor.nx
Output
Press Run or Ctrl+Enter to execute
Ctrl+Enter to run | Tab to indent

Write code like you think

Natural English-like syntax. No colons, no parentheses clutter, no boilerplate.

hello.nx
-- The simplest Nexus program
say "Hello, Nexus!"

-- Variables with type inference
let x = 42
let name = "World"
let active = yes

-- Functions are natural
greet person
    say "Hello, " + person + "!"

greet "Alice"
tensor_ops.nx
-- Create tensors with explicit shapes
let weights = Tensor.random[784, 256]
let bias = Tensor.zeros[256]

-- Matrix multiplication with @ operator
let hidden = input @ weights + bias

-- Automatic differentiation
let dW = grad loss over weights
weights = weights - learning_rate * dW
neural_net.nx
struct Dense
    weights: Tensor[In, Out]
    bias: Tensor[Out]

    forward x
        x @ weights + bias

let model = create_mlp 784, [512, 256], 10

train model, data, epochs
    optimizer = Adam.create 0.001
    for epoch in 1 to epochs
        for batch in data.batches 32
            loss = cross_entropy predictions, batch.y
            for param in model.params
                g = grad loss over param
                param = optimizer.step param, g
parallel.nx
-- Parallelism is automatic
parallel
    for x in data
        process x

-- Reversible computing
reversible swap a, b
    temp = a
    a = b
    b = temp

undo swap -- reverses it

Everything you need, nothing you don't

A complete language ecosystem built from the ground up.

VM

Interaction Net Reduction

Based on Lafont's Interaction Combinators. Six fundamental rules govern all computation.

; Active pair queue (lock-free)
active_queue_cap: 1048576
Compiler

Automatic Differentiation

Every IR operation has forward and backward computation. Gradients are generated automatically.

let grads = grad loss over params
Language

First-Class Tensors

Matrix multiplication, convolutions, and activations are native primitives.

let C = A @ B
let activated = gelu hidden
Runtime

Work-Stealing Scheduler

Lock-free parallel scheduling across all CPU cores with zero manual thread management.

parallel
  for batch in data.batches 32
    model.forward batch.x
Language

Reversible Computing

Operations can be undone at any time. An undo stack tracks state changes.

reversible swap a, b
undo swap
Compiler

Self-Hosting Compiler

The compiler compiles itself. A 4-stage bootstrap from raw machine code.

-- Stage 0 to Stage 3
nexus build compiler\*.nxa

Built from nothing

No Rust. No C. No Node.js. Nexus bootstraps itself from raw x86-64 machine code.

0
Genesis
Raw PE executable
from PowerShell
1
Assembler
Nexus Assembly
instruction set
2
VM + Compiler
Interaction net
reduction engine
3
Self-Hosting
Compiler compiles
itself natively
bootstrap/
Genesis bootstrap from raw machine code
build-native.ps1, genesis.hex
compiler/
Self-hosting compiler in Nexus Assembly
lexer.nxa, parser.nxa, types.nxa, ir.nxa, codegen.nxa
vm/
Interaction net virtual machine
atom.nxa, memory.nxa, reducer.nxa, rules.nxa
stdlib/
Standard library
io.nx, math.nx, tensor.nx
backends/
CPU, GPU, NPU dispatch
unified.nxa
agent/
Hardware profiler & AI code gen
profiler.nxa, scribe.nxa

Complete language reference

Everything you need to write Nexus programs. Click any topic to expand.

Variables and Types

Nexus has two kinds of variables. Use let to declare immutable variables -- once assigned, they cannot be changed. Use var for mutable variables that you intend to update later. This distinction helps catch bugs early: if a value should stay constant (a name, a config, a computed result), let ensures it is never accidentally overwritten.

-- IMMUTABLE: once you set it, it stays forever
let pi = 3.14159
let greeting = "Hello, Nexus!"
let is_ready = yes
let nothing_here = nothing

-- MUTABLE: you can reassign as many times as needed
var score = 0
score = score + 10       -- score is now 10
score = score * 2        -- score is now 20

-- Trying to reassign a let variable will cause an error
-- pi = 3.0   ERROR: cannot reassign immutable variable

The Seven Data Types

Nexus is dynamically typed -- you never write type annotations. The interpreter determines the type from the value you assign. Every value in Nexus belongs to one of these seven types:

Type What It Is Examples Notes
Int Whole numbers (positive, negative, or zero) 42, -7, 0, 1000 No size limit
Float Decimal numbers with fractional parts 3.14, -0.5, 2.0 Double precision
Text Strings of characters, always in double quotes "Hello", "abc" Supports concatenation with +
Bool Boolean true/false. Written as yes / no yes, no NOT true/false
Nothing Absence of a value (like null in other languages) nothing NOT null/None
List Ordered, mutable collection of any values [1, "a", yes] Mixed types allowed
Table Key-value pairs (dictionary/map/object) {name: "Alice"} Keys are strings

Type Checking and Conversion

Use type(value) to check the type of any value at runtime. It returns the type name as a string. Use string(), int(), and float() to convert between types:

say type(42)           -- "Int"
say type(3.14)         -- "Float"
say type("Hello")      -- "Text"
say type(yes)          -- "Bool"
say type([1,2,3])     -- "List"
say type(nothing)      -- "Nothing"

-- Converting between types
let num = int("42")    -- text to integer: 42
let dec = float("3.14") -- text to float: 3.14
let txt = string(100)  -- number to text: "100"

-- String concatenation auto-converts numbers
say "Score: " + 42     -- "Score: 42"

Common Mistakes for New Users

If you are coming from Python, JavaScript, or other languages, watch out for these differences:

  • Use yes / no instead of true / false
  • Use nothing instead of null, None, or undefined
  • Use is / isnt instead of == / !=
  • Strings must use double quotes "..." -- single quotes are not supported
Functions

Functions in Nexus are defined by writing the function name followed by its parameters, with the body indented below (4 spaces). There is no def, func, or function keyword -- just the name. Functions must be defined before they are called.

Defining and Calling Functions

-- Define a function: name, then parameters, then indented body
greet name
    say "Hello, " + name + "!"

-- Call it (two styles -- both work)
greet("Alice")          -- parentheses style
greet "Bob"             -- bare call style (no parens)

-- Function with multiple parameters
add x, y
    return x + y

say add(10, 20)         -- 30

Return Values

Use return to send a value back to the caller. If you forget return, the function returns nothing by default. This is a common mistake -- always include return when you need a result.

-- WRONG: computes but does not return
bad_add x, y
    x + y                -- this value is lost!

-- CORRECT: explicitly returns the result
good_add x, y
    return x + y         -- caller receives the value

say bad_add(2, 3)      -- nothing
say good_add(2, 3)     -- 5

Recursion

Functions can call themselves. This is useful for problems that have a naturally recursive structure, like computing factorials, traversing trees, or generating Fibonacci numbers.

factorial n
    if n <= 1
        return 1
    return n * factorial(n - 1)

say factorial(5)        -- 120 (5*4*3*2*1)
say factorial(10)       -- 3628800

fib n
    if n <= 1
        return n
    return fib(n - 1) + fib(n - 2)

say fib(10)             -- 55
Control Flow

Nexus provides several ways to make decisions in your code. All block structures use 4-space indentation to define the body -- there are no curly braces or end keywords.

If / Elif / Else

The basic conditional. elif (short for "else if") lets you chain multiple conditions. The else block runs when no preceding condition was true.

let score = 85

if score >= 90
    say "Grade: A"
elif score >= 80
    say "Grade: B"       -- this runs (85 >= 80)
elif score >= 70
    say "Grade: C"
else
    say "Grade: F"

Unless

The opposite of if. The block runs only when the condition is false. Useful for guard clauses and negative checks.

let logged_in = no

unless logged_in
    say "Please log in first"    -- runs because logged_in is no

Match (Pattern Matching)

Like switch in other languages, but cleaner. Compares a value against multiple patterns. Use _ as the default/wildcard case that matches anything.

let status = 404

match status
    200 -> say "OK - Request succeeded"
    301 -> say "Moved permanently"
    404 -> say "Not Found"            -- this matches
    500 -> say "Server Error"
    _ -> say "Unknown status: " + status

-- Works with strings too
let fruit = "apple"
match fruit
    "apple"  -> say "Red or green"
    "banana" -> say "Yellow"
    _ -> say "Unknown fruit"

Comparison Operators

Nexus uses English words for equality: is (equals), isnt (not equals). Standard symbols work for ordering: <, >, <=, >=. Logical operators: and, or, not.

if x is 42               -- equality (NOT ==)
if x isnt 0              -- inequality (NOT !=)
if x > 10 and x < 100    -- logical AND
if x is 0 or x is 1     -- logical OR
if not done              -- logical NOT
Loops

Nexus offers four loop types, each suited to different situations. All loops use 4-space indentation for the body. Nexus includes a safety limit of 100,000 iterations to prevent infinite loops from freezing your program.

For Loop (Range)

Iterates over a numeric range. The range is inclusive on both ends (unlike Python). Use by to set a custom step.

-- Counts 1, 2, 3, 4, 5 (inclusive on both ends)
for i in 1 to 5
    say i

-- With a step: 0, 10, 20, 30, ..., 100
for i in 0 to 100 by 10
    say i

For Loop (List Iteration)

Iterates over every element in a list, string, or other collection. The variable takes each value in order.

let colors = ["crimson", "gold", "ivory"]
for color in colors
    say "Color: " + color

-- Iterate over characters in a string
for ch in "Nexus".chars
    say ch         -- N, e, x, u, s

While Loop

Repeats as long as a condition is true. Make sure the condition eventually becomes false, otherwise you will hit the 100,000 iteration safety limit.

var n = 1
while n < 1000
    say n          -- 1, 2, 4, 8, 16, ...
    n = n * 2

Repeat N Times

Runs a block exactly N times. Simpler than a for loop when you do not need the counter variable.

repeat 3 times
    say "Hip hip hooray!"

Skip and Stop (Continue and Break)

Use skip to jump to the next iteration (like continue in other languages). Use stop to exit the loop entirely (like break).

-- Print only odd numbers up to 10
for i in 1 to 20
    if i mod 2 is 0
        skip           -- skip even numbers
    if i > 10
        stop           -- stop at 10
    say i              -- 1, 3, 5, 7, 9
String Methods

Nexus strings (type Text) support a rich set of properties and methods. Properties are accessed without parentheses and return a computed value. Methods take arguments and require parentheses. This distinction matters -- forgetting parentheses on a method will not call it.

Properties (No Parentheses)

Property Returns Example Result
.length Number of characters "hello".length 5
.upper Uppercase copy "hello".upper "HELLO"
.lower Lowercase copy "HELLO".lower "hello"
.trim Removes leading/trailing spaces " hi ".trim "hi"
.reverse Reversed string "abc".reverse "cba"
.chars List of individual characters "hi".chars ["h","i"]
.words List split by whitespace "hi there".words ["hi","there"]
.lines List split by newlines "a\nb".lines ["a","b"]
.is_empty yes if length is zero "".is_empty yes
.is_digit yes if all chars are digits "123".is_digit yes
.is_alpha yes if all chars are letters "abc".is_alpha yes

Methods (Require Parentheses)

Method What It Does Example Result
.split(sep) Splits string into list by separator "a-b-c".split("-") ["a","b","c"]
.replace(old,new) Replaces all occurrences "hello".replace("l","r") "herro"
.contains(sub) Checks if substring exists "hello".contains("ell") yes
.starts_with(pre) Checks prefix "hello".starts_with("he") yes
.ends_with(suf) Checks suffix "hello".ends_with("lo") yes
.find(sub) Index of first occurrence (-1 if not found) "hello".find("ll") 2
.count(sub) Number of occurrences "hello".count("l") 2
.repeat(n) Repeats string n times "ha".repeat(3) "hahaha"
.slice(start,end) Substring from start to end "hello".slice(1,3) "ell"

String Indexing

Access individual characters by index (0-based). Negative indices count from the end: -1 is the last character, -2 is second to last, etc.

let s = "Nexus"
say s[0]           -- "N" (first character)
say s[-1]          -- "s" (last character)
say s[-2]          -- "u" (second from end)

String Concatenation

Use + to join strings. Numbers are auto-converted when concatenated with a string:

let first = "Hello"
let last = "World"
say first + ", " + last + "!"    -- "Hello, World!"
say "Age: " + 25                  -- "Age: 25" (auto-converts)
Lists

Lists are ordered, mutable collections that can hold values of any type. They are created with square brackets [] and support indexing, slicing, and a wide range of built-in methods. Lists are zero-indexed (the first element is at index 0).

Creating and Accessing Lists

let nums = [10, 20, 30, 40, 50]
let mixed = [1, "two", yes, [3, 4]]  -- mixed types, nested lists
let empty = []                          -- empty list

-- Access by index (0-based)
say nums[0]          -- 10 (first element)
say nums[2]          -- 30 (third element)

-- Negative indexing (count from end)
say nums[-1]         -- 50 (last element)
say nums[-2]         -- 40 (second from end)

-- Properties
say nums.length      -- 5
say nums.first       -- 10
say nums.last        -- 50
say nums.is_empty    -- no

Mutation Methods

These methods modify the list in place. Use var (not let) if you plan to mutate the list.

Method What It Does Example
.append(val) Adds value to the end of the list list.append(42)
.pop() Removes and returns the last element list.pop()
.insert(idx, val) Inserts value at the given index list.insert(0, "first")
.remove(val) Removes the first occurrence of value list.remove(42)
.sort() Sorts the list in ascending order list.sort()
.reverse() Reverses the list in place list.reverse()

Non-Mutating Built-in Functions

These return a new list/value without changing the original:

Function Returns Example Result
sorted(list) New sorted list sorted([3,1,2]) [1,2,3]
reversed(list) New reversed list reversed([1,2,3]) [3,2,1]
unique(list) List with duplicates removed unique([1,1,2,3]) [1,2,3]
flatten(list) Flattens nested lists flatten([[1],[2,3]]) [1,2,3]
sum(list) Sum of all elements sum([1,2,3,4]) 10
min(list) Smallest element min([5,3,8]) 3
max(list) Largest element max([5,3,8]) 8
mean(list) Average of elements mean([2,4,6]) 4
zip(a, b) Pairs elements from two lists zip([1,2],["a","b"]) [[1,"a"],[2,"b"]]
enumerate(list) Adds index to each element enumerate(["a","b"]) [[0,"a"],[1,"b"]]

Higher-Order Functions

Pass functions to map, filter, and reduce for functional-style list processing:

double x
    return x * 2

say map(double, [1,2,3])    -- [2, 4, 6]

is_even x
    return x mod 2 is 0

say filter(is_even, [1,2,3,4])  -- [2, 4]
Tables (Dictionaries)

Tables are key-value collections, similar to dictionaries in Python, objects in JavaScript, or hashmaps in Java. Keys are always strings. Values can be any type, including other tables or lists.

Creating and Accessing Tables

let user = {
    name: "Alice",
    age: 30,
    role: "Engineer",
    active: yes
}

-- Access with dot notation
say user.name         -- "Alice"
say user.age          -- 30

Table Properties and Methods

Property/Method Returns Example
.keys List of all keys user.keys --> ["name","age","role","active"]
.values List of all values user.values --> ["Alice",30,"Engineer",yes]
.count Number of key-value pairs user.count --> 4
.has(key) Checks if key exists user.has("name") --> yes
.remove(key) Removes a key-value pair user.remove("role")
.merge(other) Combines two tables user.merge({city: "NYC"})

Nested Tables

let config = {
    app: "Nexus",
    version: 1,
    settings: {
        theme: "dark",
        font_size: 14
    }
}

say config.settings.theme    -- "dark"
Structs

Structs let you define custom data types with named fields and methods. They are like lightweight classes. Define a struct with the struct keyword, list its fields with type annotations, and optionally add methods.

struct Point
    x: Float
    y: Float

    magnitude
        return sqrt(x * x + y * y)

    distance other
        let dx = x - other.x
        let dy = y - other.y
        return sqrt(dx * dx + dy * dy)

-- Create instances by calling the struct like a function
let a = Point(3, 4)
let b = Point(0, 0)

say a.x                -- 3
say a.y                -- 4
say a.magnitude()      -- 5.0
say a.distance(b)      -- 5.0

Example: A Rectangle Struct

struct Rectangle
    width: Float
    height: Float

    area
        return width * height

    perimeter
        return 2 * (width + height)

    is_square
        return width is height

let r = Rectangle(10, 5)
say "Area: " + r.area()            -- 50
say "Perimeter: " + r.perimeter()  -- 30
say "Square? " + r.is_square()     -- no
All Built-in Functions

Nexus ships with 60+ built-in functions organized into categories. These are available everywhere without imports. Each function is listed below with its purpose and signature.

Math Functions

Function Description Example Result
sqrt(x) Square root sqrt(144) 12
abs(x) Absolute value abs(-42) 42
sin(x), cos(x), tan(x) Trigonometric functions (radians) sin(pi/2) 1.0
exp(x) e raised to the power x exp(1) 2.718...
log(x) Natural logarithm log(e) 1.0
floor(x) Round down to nearest integer floor(3.7) 3
ceil(x) Round up to nearest integer ceil(3.2) 4
round(x) Round to nearest integer (or precision) round(3.456, 2) 3.46
pow(x, y) x raised to the power y pow(2, 10) 1024
factorial(n) n! = n * (n-1) * ... * 1 factorial(5) 120
gcd(a, b) Greatest common divisor gcd(12, 8) 4
clamp(x, lo, hi) Constrain x between lo and hi clamp(15, 0, 10) 10
relu(x) max(0, x) -- used in neural networks relu(-5) 0
sigmoid(x) 1/(1+e^-x) -- logistic function sigmoid(0) 0.5

Constants: pi = 3.14159... and e = 2.71828... are available as global constants.

Aggregation Functions

Function Description Example Result
sum(list) Sum of all numbers in a list sum([1,2,3,4]) 10
mean(list) Arithmetic average mean([2,4,6]) 4
min(list) / min(a,b) Smallest value min([5,3,8]) 3
max(list) / max(a,b) Largest value max([5,3,8]) 8
count(list) Number of elements count([1,2,3]) 3
any(list) yes if any element is truthy any([no,yes,no]) yes
all(list) yes only if all elements are truthy all([yes,yes,no]) no

I/O Functions

Function Description Example
say value Print a value followed by a newline say "Hello"
print(a, b, ...) Print multiple values space-separated print("x =", 42)
input(prompt) Read a line of text from the user let name = input("Name: ")
read_file(path) Read entire file contents as text let data = read_file("data.txt")
write_file(path, text) Write text to a file (overwrites) write_file("out.txt", "hello")
file_exists(path) Check if a file exists if file_exists("config.nx")

Random Functions

Function Description Example
random() Random float between 0.0 and 1.0 let r = random()
random_int(min, max) Random integer in range [min, max] random_int(1, 6)
random_choice(list) Pick a random element from a list random_choice(["a","b","c"])

Date/Time and Misc

Function Description Example
now() Current date and time as text say now()
timestamp() Unix timestamp in seconds let t = timestamp()
hash(value) Hash a value to a string hash("password")
sleep(ms) Pause execution for N milliseconds sleep(1000)
exit(code) Stop the program with exit code exit(0)
Operators

A complete reference of all operators in Nexus, from arithmetic to logic. Nexus uses English words for equality and boolean logic, making code read more naturally.

Category Operators Example Notes
Arithmetic +   -   *   /   ^   mod 2 ^ 10 is 1024 ^ is power, mod is remainder
Matrix Multiply @ A @ B For tensor/matrix operations
Equality is   isnt x is 42, x isnt 0 NOT == or != (those are errors)
Ordering <   >   <=   >= x >= 10 Standard comparison
Logical and   or   not a and b, not done Short-circuit evaluation
String + "Hi " + name Concatenation (auto-converts numbers)
Assignment = x = 42 Used with var (mutable) only

Operator Precedence (Highest to Lowest)

When multiple operators appear in one expression, higher-precedence operators bind first. Use parentheses to override:

-- ^ binds before *
say 2 + 3 * 4          -- 14 (not 20)
say (2 + 3) * 4        -- 20 (parentheses override)
say 2 ^ 3 ^ 2          -- 512 (2^(3^2) = 2^9)
Download and Installation

You can download Nexus directly from this website using the buttons at the top of the page, or follow these platform-specific instructions. Nexus requires PowerShell (included on Windows, installable on Mac/Linux). No other dependencies are needed.

Option 1: Download from This Website

Click the Download Nexus (Universal) button in the header. Extract the downloaded `nexus.zip` folder. Open a terminal inside the extracted nexus folder, and run your .nx programs:

-- Windows (PowerShell)
.\nexus-lang.ps1 run examples\hello.nx

-- macOS / Linux (Bash)
chmod +x nexus.sh
./nexus.sh run examples/hello.nx

Option 2: Clone the Full Repository (includes examples)

-- All platforms:
git clone https://github.com/nexus-lang/nexus.git
cd nexus

Windows Setup

Windows comes with PowerShell pre-installed. Just open PowerShell or Terminal and run:

.\nexus-lang.ps1 run examples\hello.nx
.\nexus-lang.ps1 repl                    -- interactive mode

macOS Setup

Install PowerShell via Homebrew, then run:

brew install powershell/tap/powershell
chmod +x nexus.sh
./nexus.sh run examples/hello.nx

Linux Setup (Ubuntu/Debian)

sudo snap install powershell --classic
chmod +x nexus.sh
./nexus.sh run examples/hello.nx

Linux Setup (Fedora)

sudo dnf install powershell
chmod +x nexus.sh
./nexus.sh run examples/hello.nx

Linux Setup (Arch)

yay -S powershell-bin
chmod +x nexus.sh
./nexus.sh run examples/hello.nx

Writing Code (VS Code Extension)

Create files with the .nx extension in any text editor. For the best experience, install the official Nexus VS Code Extension included in your download:

  1. Open VS Code.
  2. Press Ctrl+Shift+X (or Cmd+Shift+X) to open the Extensions panel.
  3. Click the ... menu at the top right of the Extensions panel and select "Install from VSIX..."
  4. Select the nexus-lang-1.0.0.vsix file located inside your downloaded nexus-vscode folder!

This provides syntax highlighting, auto-indentation, and bracket matching for Nexus. Run programs from your terminal using the repl command for an interactive prompt.

Fix errors instantly

Click any error to see the explanation and fix. Playground errors link here.

NX001 Variable not defined
"x" is not defined. Did you mean to declare it?

Fix

-- Wrong: say x
-- Fix:   let x = 42
          say x
NX002 Expected token (syntax error)
Expected = after variable name, or missing bracket/parenthesis.

Fix

-- Wrong: let x 42
-- Fix:   let x = 42

-- Wrong: let a = [1, 2
-- Fix:   let a = [1, 2]
NX003 Indentation error
Nexus uses 4-space indentation for blocks.

Fix

-- Wrong:
if x > 0
say "yes"    -- not indented!

-- Fix:
if x > 0
    say "yes"
NX004 Infinite loop detected
Loop exceeded 100,000 iterations. Use "stop" to break.

Fix

-- Wrong: while yes
              say "forever"

-- Fix:   var i = 0
          while i < 100
              say i
              i = i + 1
NX005 Use "is" not "=="
Nexus uses "is" for equality, not "==".

Fix

-- Wrong: if x == 42
-- Fix:   if x is 42
          if x isnt 0
NX006 Booleans are "yes" / "no"
"true" is not defined. Use "yes" and "no".

Fix

-- Wrong: let active = true
-- Fix:   let active = yes
          let done = no
NX007 Function returns nothing
Function returned nothing. Missing "return" statement?

Fix

-- Wrong: add x, y
              x + y

-- Fix:   add x, y
              return x + y
NX008 Method needs parentheses
Methods with arguments need parentheses. Properties do not.

Fix

-- Properties (no parens):
"hi".upper  "hi".length

-- Methods (need parens):
"a-b".split("-")
"hi".replace("i","o")
NX009 Use "say" not "print"
In Nexus, output uses "say" (or "print" as a function).

Fix

-- Nexus style:
say "Hello"

-- Also works:
print("Hello", "World")
NX010 Value is "nothing"
Nexus uses "nothing" instead of null/None/undefined.

Fix

let x = nothing
if x is nothing
    say "no value"

Up and running in seconds

Build the toolchain from scratch or just run a program.

1

Build the Bootstrap

Generate the native assembler from raw machine code.

cd nexus\bootstrap\stage0 .\build.ps1
2

Build the Toolchain

Compile the VM, compiler, and link everything.

cd nexus .\build.ps1
3

Run a Program

Execute a Nexus program or start the REPL.

.\nexus-lang.ps1 run examples\hello.nx .\nexus-lang.ps1 repl

Build the future together

Every contribution matters. Join the Nexus community and help shape the language.

How to Contribute

Whether you are fixing a bug, adding a feature, writing documentation, or creating examples -- every contribution is recorded and credited to you.

Read the CONTRIBUTING.md file in the repository for detailed guidelines on code style, pull request process, and community standards.

0Contributors
0Contributions
4Examples

Record a Contribution

Upload a Package

Submit your .nx library to the Nexus registry. Once approved, users can install it via nexus install <name>.

Contributors