Neo 3.1.0Native compiler and Neo interpreter

A vector-native language.

Neo applies the same operations to scalars, vectors, and matrices. It has first-class unknown values and a complete interpreter written in Neo.

3.1.0 current releaseNeo in Neo interpreter milestone
example.neoNeo 3.1
neo
{def square (x)
  {* x x}}

{square 5}
{square [1 2 3 4]}
output25 [1 4 9 16]

Current compiler syntax and behavior.

Philosophy

Programs transform vectors.

Vectors are the basic unit of data and computation in Neo.
Interpreter written in Neo

Neo can now run through Neo.

The repository includes a complete interpreter implemented in the language itself. It has its own lexer, parser, evaluator, runtime environment, file runner, and persistent multiline REPL.

It executes Neo's full regression suite. The native compiler remains the path to fast executables; the interpreter is the semantic reference and the next step toward self-hosting.

Neo REPLimplemented in Neo
Neo REPL. Type :quit to exit.
> {var x 40}
40
> {+ x 2}
42
> {def square (value)
... {* value value}}
> {square 6}
36
NEO FULL REGRESSION TEST PASSED
Syntax

The brackets tell you what you are looking at.

Square brackets hold typed data, parentheses hold mixed data, and braces run code.

[ ]

Homogeneous data

Typed vectors, nested vectors, matrices, and numerical kernels.

[1 2 3 4]
( )

Heterogeneous data

Dictionaries, mixed values, complex numbers, and stored programs.

(name:"Neo" version:3)
{ }

Executable code

Calls, functions, declarations, control flow, and scoped blocks.

{+ 1 2}
Vector operations

Write the function once. Use it on a number or a vector.

Scalars broadcast. Vectors are handled element by element. Ordinary arithmetic needs no separate array API.

No mapNo foreachNo manual indexing
neo
{def affine (x scale bias)
  {+ {* x scale} bias}}

{affine 5 2 1}
; 11

{affine [1 2 3 4] 2 1}
; [3 5 7 9]
scalar{square 5}25
vector{square [1 2 3 4]}[1 4 9 16]
broadcast{+ [1 2 3] 10}[11 12 13]
Unknown values

Missing data has a value: ?

? can live inside ordinary vectors and participate in arithmetic, comparisons, logic, statistics, and control flow. Errors use the separate value !.

?

unknown or missing value

!

runtime error value

if

true, false, and unknown branches

neo
{var temperature ?}

{print
  {if {< temperature 40}
    "safe"
    "too hot"
    "sensor unavailable"}}
outputsensor unavailable
Spread

Use @ when you need every combination.

Normal vector calls are element-wise. Mark an input with @to request a Cartesian product. Two marked vectors produce a matrix; more naturally produce higher-dimensional results.

See spread in the docs →
102030
12
112131122232
{+ @[1 2] @[10 20 30]}
Standard library

Numerical tools are available from the start.

Statistics, matrices, AI primitives, complex numbers, quaternions, dictionaries, JSON, file I/O, and set operations share Neo's vector model.

01

Data analysis

filter · reduce · sort · find · JSON · dictionaries
02

Statistics

mean · variance · sd · min · max
03

Matrices

matmul · transpose · outer · identity · trace
04

AI primitives

relu · sigmoid · softmax · mse · cross-entropy
05

Numerical types

complex · quaternion · conjugate · rotation
06

Programs and text

command-line args · string concat · string push/pop · file I/O
neo
{def layer (input weights bias)
  {relu
    {+ {matmul input weights} bias}}}
“Analyze the data, then compile the program.”

Read data, transform vectors, handle missing values, compute statistics, perform matrix operations, and ship the result as a native application.

Applications

Made for numerical and systems work.

01

Robotics

Sensor processing, control systems, matrices, quaternions, and hardware libraries.

02

Edge AI

Compact inference pipelines, activations, loss functions, and native deployment.

03

Games

Vector math, simulation, rotation, procedural systems, graphics and engine libraries.

04

Data

Statistics, JSON, dictionaries, unknown values, and executable transformation pipelines.

05

Embedded

Device interaction, signal processing, small processors, and deterministic memory work.

Code and data

Store code as data, then run it when you choose.

Heterogeneous data vectors keep code inert. The {run}bridge makes the move from data to execution visible, allowing programs to be generated, extended, and executed using the same vector principles.

Read the full model →
Neo 3.1.0

Install Neo and compile a program.