Skip to content
kmmbvnrPublic

About

A readable array language — the power of APL's model with words instead of glyphs, small enough to write on a phone.

Topics

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Rank

CI npm License: MIT status: pre-alpha

Rank is a modern BASIC for small screens and big algorithms.

  • Data-first pipelines: values flow through functions from left to right.
  • Multidimensional arrays, broadcasting, and operations by rank or axis.
  • Lazy sequences, ranges, and generators.
  • Functions, closures, and memoization.
  • A notebook-style CLI: edit cells, rerun code, and see results alongside it.
  • LLM-aided Rust rewrite: export a task, generate Rust, check it against Rank.

Project Euler #2: sum the even Fibonacci numbers. Start with 100, edit the limit to 4 million, press Ctrl-R. Answer: 4613732.

Rank REPL: edit the Fibonacci limit and rerun to solve Project Euler #2

Run

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

Open the REPL without a global install:

npx @arrrank/cli

npx downloads the package to its cache on the first run. For a permanent rank command:

npm install -g @arrrank/cli
rank

Or run from source:

npm install
npm run build
npm run rank
rank> use numbers
rank> 2 + 3 * 4
14
rank> 1 to 5 sum
15

Run a file, optionally passing inputs:

npx @arrrank/cli demos/euler/001_multiples.ra --limit 10

Tests

npm test
npm run rank -- test demos/euler

Documentation

About

A readable array language — the power of APL's model with words instead of glyphs, small enough to write on a phone.

Topics

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages