A simple command-line calculator program writen with Rust.

Overview

Calculator.rs

An simple command-line calculator program writen with Rust.

Features

  • Math functions support
> sin(1) 
= 0.84147098
  • Variable support
> a = 1
= 1
> a
= 1
  • Lazy-Expression support
> a = 10
> b = 20
> sum = {a + b}
> sum()
= 30
> a += 1
> sum()
= 31
  • Comment support
> 1 + 1 # plus
= 2
  • Array support
> arr = [1, 2, 3] 
= [
  1, 2, 3,
]
> push(arr, 4) 
> arr
= [
  1, 2, 3, 4,
]
>
  • Function defining support
> plus1 = fn(i $num) {i + 1} 
> plus1(1) 
= 2
  • Script execute support
calculator.exe script
  • OOP support
> Person = cls {age, name}
= {
  name,
  age,
}
> inst = new Person["test", 10] 
= {
  name : 'test',
  age : 10,
}

Installation

Go to the release page and download the latest released .exe file

Then just execuse it.

Build-ins

  • Functions

    • Basic
      • int
      • float
      • string
    • Array
      • push
      • pop
      • shift
      • unshift
      • insert
      • remove
      • update
      • len
    • Math
      • sin

      • cos

      • tan

      • asin

      • acos

      • atan

      • sinh

      • cosh

      • tanh

      • rad

      • deg

      • log10

      • log2

      • ln

      • exp

      • abs

      • sqrt

      • floor

      • round

  • Constants

    • PI
    • E
You might also like...
Command-Line program that takes images and produces the copy of the image with a thin frame and palette made of the 10 most frequent colors.
Command-Line program that takes images and produces the copy of the image with a thin frame and palette made of the 10 most frequent colors.

paleatra v.0.0.1 Command-Line program that takes an image and produces the copy of the image with a thin frame and palette made of the 10 most frequen

Command-line program to manage PS battle logs. WIP.

psbattletools psbattletools is a command-line tool written in Rust for manipulating PokΓ©mon Showdown battle logs. Installation psbattletools currently

Command-line HTTP client for sending a POST request to specified URI on each stdin line.

line2httppost Simple tool to read lines from stdin and post each line as separate POST request to a specified URL (TCP connection is reused though). G

Pink is a command-line tool inspired by the Unix man command.

Pink is a command-line tool inspired by the Unix man command. It displays custom-formatted text pages in the terminal using a subset of HTML-like tags.

That program use on platform windows. And if you write any text on uncorrect keyboard layout, that program for that.
That program use on platform windows. And if you write any text on uncorrect keyboard layout, that program for that.

πŸ“Œ This program is designed to translate text into the correct layout when typing is incorrect. πŸ“Œ Example ghbdtn - ΠΏΡ€ΠΈΠ²Π΅Ρ‚ Just (by default) pressing

An Intel HAXM powered, protected mode, 32 bit, hypervisor addition calculator, written in Rust.

HyperCalc An Intel HAXM powered, protected mode, 32 bit, hypervisor addition calculator, written in Rust. Purpose None 😏 . Mostly just to learn Rust

A CLI calculator written in Rust that isn't blazingly fast.

Calcamabob A command line calculator Is written in Rust Is not blazing fast, and could be faster. Calcamabob can interpret operator precedence. For ex

osu!Skills calculator rewritten in rust.

osu!Skills rs osu!Skills calculator rewritten in rust. Usage osu_skills_rs [OPTION]... Skill Calculator Mandatory: --in=FILE: Path to .osu file to pa

Calc: A fully-featured minimalistic configurable calculator written in Rust
Calc: A fully-featured minimalistic configurable calculator written in Rust

Calc Calc: A fully-featured minimalistic configurable rust calculator Install You can install the latest version from source git clone https://github.

Releases(1.4.3)
Owner
BHznJNs
Bilibili: BHznJNs | Zhihu: BHznJNs | Code changes the world!
BHznJNs
Cork is a simple command-line calculator, mainly targeted towards people who deal with hex numbers

Cork is a simple command-line calculator, mainly targeted towards people who deal with hex numbers. It deals only with integer arithmetic. Expressions may involve mixed bases (limited to decimal, hexadecimal, octal and binary numbers). The global output format may be set to a particular radix - by default it is hex.

Deep Majumder 50 Dec 22, 2022
A simple command line based RPN calculator

stak A simple command line based RPN calculator Usage stak can be used in two modes: one-shot from the command line, or in an interactive shell One-sh

null 1 Nov 17, 2021
Command Line Scientific Calculator. Free Forever. Made with ❀️ using πŸ¦€

β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ•β•β•β•β•β•β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•β•β• -

zahash 17 Oct 28, 2023
A simple command line program to upload file or directory to web3.storage with optional encryption and compression

w3s-cli A simple command line program to upload file or directory to web3.storage with optional encryption and compression. Features Uploads single fi

qdwang 5 Oct 22, 2022
Small command-line tool to switch monitor inputs from command line

swmon Small command-line tool to switch monitor inputs from command line Installation git clone https://github.com/cr1901/swmon cargo install --path .

William D. Jones 5 Aug 20, 2022
A simple program for C program IO testing. Written in Rust

A simple program for C program IO testing. Written in Rust, using concurrency to speed up valgrind testing. Make sure to update settings at your first run of the program!

null 1 Feb 22, 2022
A simple calculator, Rust implemention.

Calc A simple calculator. Usage If the name of the binary is calculator, To calculate: $ calculator -c <EXPRESSION> # or $ calculator --calc <EXPRESSI

Umoho Qerty 2 Aug 7, 2022
A silly program written in Rust to output nonsensical sentences in the command line interface.

A silly program written in Rust to output nonsensical sentences in the command line interface.

Rachael Ava 1 Dec 13, 2021
A Rust port of the command line program playing with the cutscenes files (USM) from Genshin Impact.

GI-cutscenes : Rust Remix A command line program playing with the cutscene files (USM) from Genshin Impact, reimplemented in Rust. Much like its origi

Lymkwi 5 Nov 6, 2022
Simple calculator REPL, similar to bc(1), with syntax highlighting and persistent history

eva simple calculator REPL, similar to bc(1), with syntax highlighting and persistent history installation Homebrew $ brew install eva crates.io $ car

Akshay 632 Jan 4, 2023