Rank

The Rank programming language / pre-alpha

Small screens. Big algorithms.

An array-oriented programming language designed for vertical screens and phone keyboards.

Click a line to edit. Enter evaluates.
Ctrl-R steps. Ctrl-L runs all. Ctrl-G selects an iteration.

Compact enough for your pocket. Powerful enough for programming contests, data analysis, and neural networks.

Unlock the GPU and NPU already in your device to hack anywhere.

Open the console →   Read the wiki →

Try on your computer.

npx @arrrank/cli

Requires Node.js 22.12+, Python and a C++20 build toolchain.

Get it on Google Play Download on the App Store

Closed beta

The language

Rank is a modern BASIC with an array-oriented model. Source is designed to stay around 40 characters per line, using words and familiar keyboard symbols rather than punctuation-heavy syntax.

Data flows through functions from left to right. A range can feed directly into a sum:

rank> use numbers
rank> 1 to 5 sum
15

Work with whole arrays and tensors, or select rows from a table. Arithmetic applies to each element without writing a loop:

rank> A = array 1 2 3
1 2 3
rank> A * 10 + 1
11 21 31

A notebook-style CLI with editable cells, inline results and step-by-step execution, available in your terminal, browser and on your phone.

Advanced capabilities

Tensor operations include broadcasting, reductions along axis, operations on cells with rank, matrix multiplication and linear-system solvers.

M = (1 to 9) (array 3 3) reshape
Blocks = M (array 2 2) window
Blocks sum rank 2
12 16 24 28
shape 2 2

Built-in primitives for programming contests include sliding windows, Fenwick trees, segment trees and priority queues. Lazy ranges and generators let you process sequences without first storing every element.

Compile to Rust

Lazy sequences and array operations can be fused into efficient loops without intermediate arrays.

AI-assisted compilation turns Rank programs into standalone Rust. Generated agent prompts carry the source, AST, type and loop analysis, tests and optimization guidance. The resulting Rust is checked against the original Rank program on the same test inputs.

Rust workflow →

Notable examples