| Crates.io | abacus |
| lib.rs | abacus |
| version | 0.1.6 |
| created_at | 2025-11-06 09:50:59.314563+00 |
| updated_at | 2026-01-20 06:47:48.431271+00 |
| description | The mathemagical programming language |
| homepage | https://github.com/cyanboy/abacus |
| repository | https://github.com/cyanboy/abacus |
| max_upload_size | |
| id | 1919374 |
| size | 303,496 |
Abacus is a experimental, interpreted functional programming language with a pleasant REPL

cargo install abacus
The Abacus calculator REPL and runner
Usage: abc [OPTIONS] [FILE]
Arguments:
[FILE] Execute the given Abacus source file
Options:
-e, --expr <EXPR> Evaluate a single expression and exit
--no-color Disable ANSI color output
--recursion-limit <N> Maximum recursion depth (default: 1000)
--completions <SHELL> Generate shell completions [bash, zsh, fish, powershell]
-h, --help Print help
-V, --version Print version
abcabc -e "2 + 2"abc path/to/program.abc--no-color (e.g. abc --no-color -e "1/3")NO_COLOR disables color, CLICOLOR_FORCE=1 forces it, and CLICOLOR=0 disables it unless forced. Color is off when stdout is not a TTY unless forced.false.--recursion-limit or ABACUS_MAX_CALL_DEPTH); unbounded recursion (e.g., inf(n) = n * inf(n)) will eventually raise a recursion-limit diagnostic instead of looping forever.REPL sessions retain history, coloring, and diagnostic output between entries:
[0x00]: rate = 0.0825
[0x01]: with_tax(amount) = amount * (1 + rate)
[0x02]: with_tax(24.99)
[0x02]: 27.05475
[0x03]: fib(0) = 0
[0x04]: fib(1) = 1
[0x05]: fib(n) = fib(n-1) + fib(n-2)
[0x06]: fib(10)
[0x06]: 55
[0x07]: odd(n) = n % 2 == 1
[0x08]: odd(41)
[0x08]: true
cargo build
Generate shell completions for your shell:
# Bash
abc --completions bash > ~/.local/share/bash-completion/completions/abc
# Zsh
abc --completions zsh > ~/.zfunc/_abc
# Fish
abc --completions fish > ~/.config/fish/completions/abc.fish
# PowerShell
abc --completions powershell > abc.ps1
This project is licensed under the MIT License.