No description
Find a file
Tiffany Bennett 1f5f636442
Reorganize definitions.units (#156)
## Changes to `definitions.units`

- Added vim folds repurposing the `!category`/`!endcategory` syntax. There's a modeline at the bottom of the file for this.
- To make the vim folds work better, every single unit now has a category. I also moved them around a little bit so that each category collapses to a single line. This makes the file much easier to navigate. Kind of acts as its own table of contents.
- Rearranged some of the categories, and moved things between categories.
- Adjusted several comments, and added an explanation of the file to the top.
- Deleted some legacy GNU Units directives like !utf8 that Rink will never use. Also several of the function/LUTs that are commented out.
- Uncommented some fractions that apparently GNU Units didn't like. Also uncommented `googol`.
- Moved mercury to the periodic table section.
- Moved the 4 newest elements to be alphabetically sorted.
- Added atomic numbers to every element. (I double checked that the numbers are correct, but I might have still gotten some mixed up...)
- Fixed a few typos and trailing whitespace.

![image](https://github.com/tiffany352/rink-rs/assets/1254344/3d3fbc58-1928-4ded-8612-a84778127c65)

## Changes to rink-core

- Now prints an error on unrecognized directives instead of silently ignoring them.
- Ignores categories for non-units. This may be re-added later but it will require refactoring `Context::categories` to respect namespaces.
- Improved some of the error messages from the units DB loader.
2024-03-15 19:08:13 -07:00
.github/workflows Add --no-fail-fast to coverage build 2022-12-13 18:08:56 -08:00
cli Release v0.7.0 2024-01-06 19:58:04 -08:00
core Reorganize definitions.units (#156) 2024-03-15 19:08:13 -07:00
irc Update dependencies (#89) 2021-04-01 16:13:17 -07:00
rink-js Release v0.7.0 2024-01-06 19:58:04 -08:00
sandbox Add an integration test to rink-sandbox (#128) 2022-04-16 15:58:03 -07:00
web Update live currency fetching (#153) 2024-01-06 18:57:29 -08:00
.codecov.yml Add Travis and Codecov configuration 2018-11-15 18:55:45 +01:00
.gitignore Cache currency data in a file for better reliability 2021-02-14 16:46:17 -08:00
.tokeignore Add tokei ignore file 2022-04-03 21:10:38 -07:00
.travis.yml Fix pattern in kcov invocation 2018-11-20 22:26:35 +01:00
Cargo.lock Release v0.7.0 2024-01-06 19:58:04 -08:00
Cargo.toml Move cli to member of workspace 2022-03-24 19:25:38 -07:00
LICENSE-GPL Switch to MPL 2016-08-22 10:46:22 -04:00
LICENSE-MPL Switch to MPL 2016-08-22 10:46:22 -04:00
README.md [README] Add scoop to package manager list 2021-09-19 11:28:01 -07:00

Rink

Build Status codecov crates.io downloads

Rink is a unit-aware calculator. It can be used for physics and engineering calculations, as well as dimensionality analysis.

Rink supports most systems of measurements including SI, CGS, natural, international customary, US customary, UK customary, as well as historical measurements. In addition, Rink supports currency conversions.

Unique features:

  • High-precision bignum rational arithmetic
  • Detailed error messages
  • Shows SI physical quantities
  • Finds applicable SI derived units automatically
  • Helps with dimensionality analysis, such as by offering unit factorizations and finding units for quantities.
  • Open source
  • First-class support for non-absolute temperature scales

Manual

Describes (hopefully) everything you need to know to use Rink's expression language.

Web Interface: rinkcalc.app

Rink is available via a web interface in addition to the terminal-based interface. Useful for doing calculations on mobile.

Install

The most common version of Rink is the command line interface rink.

Package Manager Command
Cargo cargo install rink
Pacman pacman -S rink
Nix nix-env -i rink
Scoop scoop install rink

Examples

> kWh/year -> W
0.1140795 watt (power)
> W -> J
Conformance error: 1 watt (power) != 1 joule (energy)
Suggestions: multiply left side by time, multiply right side by frequency
> gallon gasoline -> kWh
approx. 36.63388 kWh (energy)
> googol^100
1.0e10000 (dimensionless)

Library Usage

docs.rs

[dependencies]
rink-core = "0.6"

License

Rink source code is licensed under the Mozilla Public License, version 2. See LICENSE-MPL for details.

The data file definitions.units is licensed under the GNU General Public License, version 3. See LICENSE-GPL for details.

Contribution

Contribution guide can be found on the wiki: https://github.com/tiffany352/rink-rs/wiki#contribution-guide

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work will grant the rights lined out in the MPL, including larger works with secondary licenses.

Changelog

See here: https://github.com/tiffany352/rink-rs/releases