# Programing language faster than Python for ML (Jaithon 3.1)

> Source: <https://github.com/abhiramasonny/jaithon>
> Published: 2026-08-14 04:12:59+00:00

Jaithon is a dynamically executed and garbage collected language with a bytecode VM. It takes heavy insp from the structure from Java (for its architecture) and insp for everything else from a combination of Rust & Python.

Pretty much everything (apart from the CORE primitive implementation stuff) is written in jaithon itself, making it VERY much bootstrapped and easy to extend with new features.

Most documentation within `.jai`

and `.c`

files is currently AI-generated to speed up development, though it is being rewritten as the language evolves. The README and most of `LANGUAGE.md`

are hand-written, thoroughly reviewed, and are currently 100% accurate. Docstrings in the code may still be inaccurate, as they were generated by an LLM.

Additionally, around 80% of the *raw code* in this repository was produced with agentic coding tools (claude code). My workflow is to first design a feature or bug fix completley by hand, then use an LLM to help either finish it, integrate it with the codebase, catch additioal bugs before I push, improve performance, or correct me on bad assumptions. The resulting code is something I completley understand and something that I stand by, and something that belongs to me.

The architecture is also 100% my own, 100% human generated, and not AI assisted.

I see agent-assisted coding as the future of software engineering. It let me build Jaithon 3 far faster than I could have done alone, while still keeping a real human in the loop for the important decisions. Without agentic coding, Jaithon 3 probably wouldnt have existed, and Jaithon would have been stuck at a primal level. The entire codebase is reviewed by me and I would not consider myself a "vibecoder", or jaithon as "ai slop"; it is collaborative engineering with LLMs used as a multiplier to exponentiate my productivity.

```
git clone https://github.com/abhiramasonny/jaithon
cd jaithon
make                        # builds ./jaithon
make test                   # this is optional, but it runs the benchmarks and tests and stuff
./scripts/install.sh        # also optional, it installs itself to /usr/local
```

The reqs to run jaithon are a C11 compiler and make, readline is used for the REPL if present. On macOS the Metal and Cocoa frameworks enable the GUI and GPU modules, however everything else builds and runs without them.

```
jaithon run program.jai     # run a file
jaithon                     # REPL
jaithon check src/          # type-check without running
jaithon fmt .               # canonical formatter, no options
jaithon test                # discover and run tests
jaithon doc --out docs/api  # generate API documentation
jaithon disasm program.jai  # bytecode listing
```

The REPL keeps its bindings across lines, continues an unfinished input on a
`...`

prompt, and takes meta-commands. `:help`

lists every one of them.

``` js
# let is immutable but var is not and const is compile time
let name = "Jaithon"
var count = 0
const MAX = 1 << 16

# types are optional, but they are checked if they are present
let ratio: float = 0.5
let names: list[str] = []
let lookup: dict[str, int] = {}
let maybe: int? = null           # T? is T | null

if names.len() > 0 { print(names[0]) }
print(maybe ?? -1)

# loops and ranges
for i in 0..10 { count += i }
'outer: for row in grid {
    for cell in row {
        if cell == target { break 'outer }
    }
}

# pattern matching
let kind = match code {
    200           => "ok",
    301 | 302     => "redirect",
    400..=499     => "client error",
    n if n >= 500 => "server error",
    _             => "unknown",
}

enum Shape {
    Circle(radius: float),
    Rect(w: float, h: float),
}

fn area(s: Shape) -> float {
    return match s {
        Shape.Circle(r)  => math.PI * r ** 2,
        Shape.Rect(w, h) => w * h,
    }
}

# traits are interfaces with default methods, and they are types.
trait Printable {
    fn to_str(self) -> str
    fn describe(self) -> str { return f"<{self.to_str()}>" }
}

# Errors are classes
fn load(path: str) -> str {
    let file = io.open(path, "r")
    defer { file.close() }
    return file.read()
}

# comphressons and lazy iterators.
let squares = [x ** 2 for x in 0..10 if x % 2 == 0]
let first_ten = iter(source).map(parse).filter(is_valid).take(10).collect()
```

more idepth file -> [ LANGUAGE.md](/abhiramasonny/jaithon/blob/main/LANGUAGE.md).

Also you can checkout the examples directory.

Libraries that can ship outside the Jaithon standard library can be found under
[ packages/](/abhiramasonny/jaithon/blob/main/packages/README.md). Each package owns its source, tests, version,
and dependency manifest. Jaithon finds workspace packages from a checkout and
from an installed

`share/jaithon/packages`

directory.`jaiplot`

is a library for Matplotlib-style figures and axes with file and window
backends.

`jaitensor`

provides Metal-resident float32 tensors and a Keras-style API.
It includes common tensor math, format-independent datasets, dense models,
ReLU/sigmoid/tanh/softmax activations, momentum SGD, Adam, validation,
prediction, and JSON weight files. The examples cover
[ MNIST](/abhiramasonny/jaithon/blob/main/examples/mnist_gpu.jai) and a

[.](/abhiramasonny/jaithon/blob/main/examples/spiral_classifier.jai)

`nonlinear spiral classifier`

Every error is in this format, so hopefully its easy to debug

``` php
error[E0301]: cannot assign to immutable binding `x`
  --> examples/demo.jai:7:5
   |
 5 | let x = 1
   |     - `x` declared immutable here
 ...
 7 |     x = 2
   |     ^^^^^ assignment to immutable binding
   |
help: change the declaration to `var x = 1`
```

These are what the codes mean:

| Code | Area |
|---|---|
`E00xx` |
lexical |
`E01xx` |
syntax |
`E02xx` |
names |
`E03xx` |
bindings |
`E04xx` |
types |
`E05xx` |
match |
`E06xx` |
functions |
`E07xx` |
classes |
`E08xx` |
modules |

``` php
source --> lexer --> parser --> resolver --> type checker --> codegen --> VM
            |         │           │              │               │         │
          tokens     AST      symbols +      types +          bytecode   values
                               slots          casts           + caches   + GC
make debug            # -O0 -g, assertions on
make check            # type-check the whole tree
make test             # full suite
make bootstrap        # differential front-end verification
jaithon fmt --check . # formatting gate
```

MIT. See [LICENSE](/abhiramasonny/jaithon/blob/main/LICENSE).

Created by [Abhirama Sonny](https://abhiramasonny.com/).
