Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

edadma/nex

Repository files navigation

Nex

Maven Central Last Commit GitHub Scala Version ScalaJS Version Scala Native Version

A modern, AOT-compiled, array-first numerical programming language.

Fortran's heritage — built-in complex numbers and matrices, IEEE 754 throughout, AOT performance. Modern syntax — Scala 3-style indentation, expression-oriented, math-flavored juxtaposition (2pi, 4a*c, 3sin(2pi*t)). Fusion-aware compilation — array expressions compile to fused loops with no intermediate temporaries.

def normalize(v: [real]) =
 val mag = sqrt(sum(v * v))
 if mag == 0.0 then v
 else v / mag

Status

The current implementation runs the language end-to-end: a tree-walking interpreter plus an AOT compiler that produces native Mac arm64 binaries (LLVM IR → clang -O1) for the full surface — scalar arithmetic, arrays + ARC + slicing + fusion, tuples and structs, lambdas + closures (val + var capture), the prelude scalar math and assertion family, higher-order array functions (map / reduce / filter), and complex numbers. Every commit verifies the AOT output byte-for-byte against the reference tree-walking interpreter (around 700 unit tests).

sbt "nexJVM/runMain io.github.edadma.nex.run run examples/fft/main.nex"
sbt "nexJVM/runMain io.github.edadma.nex.run compile examples/fft/main.nex"
./examples/fft/main

See nexlang.org for the full documentation.

License

ISC — see LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /