{"id":13408828,"url":"https://github.com/PaddiM8/kalker","last_synced_at":"2025-03-14T13:32:08.849Z","repository":{"id":38388865,"uuid":"269425900","full_name":"PaddiM8/kalker","owner":"PaddiM8","description":"Scientific calculator with math syntax that supports user-defined variables and functions, complex numbers, and estimation of derivatives and integrals","archived":false,"fork":false,"pushed_at":"2024-04-03T15:30:54.000Z","size":2751,"stargazers_count":1524,"open_issues_count":25,"forks_count":71,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-04-14T03:03:02.767Z","etag":null,"topics":["calculator","math","rust","rust-crate"],"latest_commit_sha":null,"homepage":"https://kalker.xyz","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PaddiM8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-06-04T17:43:54.000Z","updated_at":"2024-04-20T22:45:06.297Z","dependencies_parsed_at":"2024-04-02T23:22:39.154Z","dependency_job_id":"45aaec04-f4af-490b-a576-c087df5d7d92","html_url":"https://github.com/PaddiM8/kalker","commit_stats":{"total_commits":521,"total_committers":17,"mean_commits":"30.647058823529413","dds":0.5124760076775432,"last_synced_commit":"9b55f894427b84b43065579bbf3900eb7d46daf6"},"previous_names":["paddim8/kalk"],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaddiM8%2Fkalker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaddiM8%2Fkalker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaddiM8%2Fkalker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PaddiM8%2Fkalker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PaddiM8","download_url":"https://codeload.github.com/PaddiM8/kalker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243526926,"owners_count":20305113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calculator","math","rust","rust-crate"],"created_at":"2024-07-30T20:00:55.582Z","updated_at":"2025-03-14T13:32:07.825Z","avatar_url":"https://github.com/PaddiM8.png","language":"Rust","funding_links":[],"categories":["\u003ca name=\"calc\"\u003e\u003c/a\u003eCalculators","Rust","Command Line","Applications","应用程序 Applications","Calculators \u0026 Math","Calculator"],"sub_categories":["Dependency Management"],"readme":"![](logo.png)\n\nKalker is a calculator program/website that supports user-defined variables, functions, differentiation, and integration. It runs on Windows, macOS, Linux, Android, and in web browsers (with WebAssembly).\n\n[![Crates.io](https://img.shields.io/crates/v/kalker)](https://crates.io/crates/kalker) ![npm](https://img.shields.io/npm/v/@paddim8/kalk) [![GitHub](https://img.shields.io/github/license/PaddiM8/kalk)](https://github.com/PaddiM8/kalker/blob/master/LICENSE) [![Docs.rs](https://docs.rs/kalk/badge.svg)](https://docs.rs/kalk/latest/kalk/) ![Build status](https://img.shields.io/github/actions/workflow/status/PaddiM8/kalker/build.yml?branch=master\u0026label=build%20%26%20test)\n\n[Website - Try it out here!](https://kalker.xyz)\n\n\u003cimg src=\"preview.png\" width=\"750\"\u003e\n\n# Features\n\n* Operators: `+`, `-`, `*`, `/`, `!`\n* Groups: `()`, `[]`, `⌈ceil⌉`, `⌊floor⌋`\n* [Vectors](https://kalker.xyz/#vectors): (x, y, z, ...)\n* [Matrices](https://kalker.xyz/#matrices): [x, y, z; a, b, c; ...]\n* [Pre-defined functions and constants](https://kalker.xyz/#functions)\n* User-defined functions and variables. `f(x, y) = xy`, `x = 5`\n* Root finding using Newton's method (eg. x^2 = 64). Note: estimation and limited to one root\n* Derivative of functions (derivatives of noisy functions or of higher order can be a bit inaccurate). `f'(2)`, `sin'(-pi)`\n* Integration. `∫(0, pi, sin(x) dx)` or `∫(0, π, sin(x) dx)`, maybe sometimes be slightly off\n* Understands fairly ambiguous syntax. Eg. `2sin50 + 2xy`\n* Syntax highlighting\n* Special-symbol completion on tab. Eg. write `sqrt` and press tab. It will be turned into `√`\n* Sum function: `sum(start, to, expression)` Eg. `sum(1, 3, 2n+1)` is the same as `2*1+1 + 2*2+1 + 2*3+1` = `15`\n* Piecewise functions: `f(x) = { f(x + 1) if x \u003c= 1; x otherwise }`, pressing enter before typing the final `}` will make a new line without submitting\n* Load a file including predefined functions and constants. For example, if you're going to use kalker for physics, you load up your file with physics functions/constants when starting kalker. This is done either using the `-i file` flag or by putting files in a certain directory and then doing `load filename` inside kalker. [More about files here](https://kalker.xyz/#files)\n* Different number bases: Either with a format like `0b1101`, `0o5.3`, `0xff` or a format like `1101_2`. The latter does not support letters, as they would be interpreted as variables\n* Misc: separate expressions by a semicolon to write them on the same line, use the `ans` variable to get the value of the previously calculated expression\n\n# Installation\n\n## Package managers\n\n### macOS (Homebrew)\n`brew install kalker`\n\n### macOS (MacPorts)\n`sudo port install kalker` ([info](https://ports.macports.org/port/kalker/))\n\n### Arch Linux\n`kalker` in the AUR, eg. `yay -S kalker`\n\n### Nix/NixOS\n`kalker` in the [`nixpkgs`](https://search.nixos.org/packages?channel=unstable\u0026show=kalker\u0026from=0\u0026size=50\u0026sort=relevance\u0026type=packages\u0026query=kalker) repository.\nThe most up to date version is also available as a [`flake`](https://search.nixos.org/flakes?channel=unstable\u0026show=kalker\u0026from=0\u0026size=50\u0026sort=relevance\u0026type=packages\u0026query=kalker).\n\n### NetBSD\n`pkgin install kalker` (from the [`official repositories`](https://pkgsrc.se/math/kalker))\n\n## Binaries\n\nPre-compiled binaries for Linux, Windows, and macOS (64-bit) are available in the [releases page](https://github.com/PaddiM8/kalker/releases).\n\n## Compiling\n\n**Minimum rust version: v1.36.0**. Make sure you have `diffutils` `gcc` `make` and `m4` installed. **If you use windows:** [follow the instructions here](https://docs.rs/gmp-mpfr-sys/1.2.3/gmp_mpfr_sys/index.html#building-on-windows) (don't forget to install `mingw-w64-x86_64-rust` in MSYS2).\n\n### Cargo\n\nRun `cargo install kalker`\n\n### Manually\n\n1. Go into the `cli` directory.\n2. Run `cargo build --release`\n3. Grab the binary from `targets/release`\n\n# Libraries\n\nThere are currently three different libraries related to kalker.\n\n* [kalk](https://crates.io/crates/kalk): The Rust crate that powers it all.\n* [@paddim8/kalk](https://www.npmjs.com/package/@paddim8/kalk): JavaScript bindings for `kalk`. This lets you use it in the browser thanks to WebAssembly.\n* [@paddim8/kalk-component](https://www.npmjs.com/package/@paddim8/kalk-component): A web component that runs `@paddim8/kalk`, which let's you use kalk in the browser with a command line-like interface.\n\n# Syntax\n\nA complete reference can be found on [the website](https://kalker.xyz).\n\n# Contributing\n\n## kalk and cli (Rust)\n\nAfter making changes to the kalk library (in `kalk/`), you can easily try them out by going to the root of the project directory, and doing `cargo run`. This will start kalker (cli), with the new changes. If you're using Windows, you will need to [follow the instructions here](https://docs.rs/gmp-mpfr-sys/1.2.3/gmp_mpfr_sys/index.html#building-on-windows), but also make sure to install `mingw-w64-x86_64-rust` in MSYS2.\n\nAll Rust code is expected to be formatted with `rustfmt\n\n## web (Svelte, TypeScript, Sass)\n\nRun:\n1. `npm install`  \n2. `npm run dev` - this will automatically re-compile the project when changes are made\n\n## mobile (Android)\n\nRun:  \n1. `npm install`\n2. `npm run build`\n3. `npx cap sync`\n4. Build the project using Android Studio, or Gradle directly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPaddiM8%2Fkalker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPaddiM8%2Fkalker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPaddiM8%2Fkalker/lists"}