Top 23 Unit Open-Source Projects

  • mathjs

    An extensive math library for JavaScript and Node.js

  • Project mention: Show HN: Heynote – A Dedicated Scratchpad for Developers | news.ycombinator.com | 2023-12-22

    The Math blocks are powered by Math.js (https://mathjs.org/).

  • insect

    High precision scientific calculator with support for physical units

  • Project mention: Show HN: Numbat – A programming language with physical dimensions as types | news.ycombinator.com | 2023-11-16

    Apparently this replaces https://github.com/sharkdp/insect

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • pint

    Operate and manipulate physical quantities in Python (by hgrecco)

  • Project mention: GNU Units | news.ycombinator.com | 2023-08-03

    Only tangential to this but somebody might find it usefull. I’m doing lots of calculations in Python involving various units. I’m using a similar library called Pint. https://github.com/hgrecco/pint

    My business is thermodynamics of power plants. Professionals in the industry tend to use convenient units like C, bars, kJ/kg and so on. But the formulas usualy need basic SI units.

  • UnitsNet

    Makes life working with units of measurement just a little bit better.

  • Project mention: Java opensource projects that need help from community. | /r/java | 2023-05-20

    If engineering/scientific projects appeal to you, Units of measurement implementations for Java are woefully behind when compared with the likes of UnitsNet for C#.

  • mp-units

    The quantities and units library for C++

  • Project mention: Is it just mean, or is C# easier to learn than JavaScript or even PHP? | /r/dotnet | 2023-12-06

    It's not the type system you're complaining about, though. It takes a bit of work but you can write types that include units information with no loss of performance.

  • numbat

    A statically typed programming language for scientific computations with first class support for physical dimensions and units

  • Project mention: Show HN: Numbat – A programming language with physical dimensions as types | news.ycombinator.com | 2023-11-16

    > 365·243 ought to be 365·2425 exactly:

    Yes. This is also how it is defined: https://github.com/sharkdp/numbat/blob/ba9e97b1fbf6353d24695...

    The calculation above is showing a rounded result (6 significant digits by default).

  • Unitful.jl

    Physical quantities with arbitrary units

  • Project mention: What Is Dimensional Analysis? | news.ycombinator.com | 2023-09-15
  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • SI

    A header only C++ library that provides type safety and user defined literals for physical units (by bernedom)

  • rink-rs

    Unit conversion tool and library written in rust

  • Project mention: Frink is a programming language designed to make physical calculations simple | news.ycombinator.com | 2023-11-03
  • jsr354-api

    JSR 354 - Money and Currency API

  • dimensioned

    Compile-time dimensional analysis for various unit systems using Rust's type system.

  • Project mention: Frink is a programming language designed to make physical calculations simple | news.ycombinator.com | 2023-11-03

    Rust as well. There are at least a few libraries to do it, but I'll link the one I wrote:

    https://crates.io/crates/dimensioned

  • au

    A C++14-compatible physical units library with no dependencies and a single-file delivery option. Emphasis on safety, accessibility, performance, and developer experience. (by aurora-opensource)

  • desktop

    Next generation notepad-based calculator, built with extendibility and privacy in mind. (by parsify-dev)

  • safe-units

    Type-safe TypeScript units of measure 👷📏

  • coulomb

    coulomb: unit analysis for Scala

  • measured

    Type-safe, intuitive units of measure (by nacular)

  • cpc

    Text calculator with support for units and conversion

  • indriya

    JSR 385 - Reference Implementation

  • Project mention: Java opensource projects that need help from community. | /r/java | 2023-05-20

    JSR 385 reference implementation Indriya - https://github.com/unitsofmeasurement/indriya

  • Unchained

    A fully type safe, compile time only units library. (by SciNim)

  • Project mention: GNU Units | news.ycombinator.com | 2023-08-03

    Anything with a finite (200 is small even) number of units misses the algebraic structure of the problem mentioned in https://news.ycombinator.com/item?id=36988497 wherein multiplying|dividing two things gives you a (potentially) new unit which implies an open ended "space" of units.

    To be concrete (hah!), in C++ a template meta-type with 12 signed integer parameters (6 numerators & 6 denominators for rational exponents of SI base units) might be one way to model it.

    Unlike C++ template stuff, Nim macros (like Lisp macros) makes metaprogramming more like procedural programming - just against abstract syntax trees. I think that helps to shield some of this type complexity from users, but the documentation README https://github.com/SciNim/Unchained does better job than I can in an HN comment.

    Of course, for unit system conversion, the number of dimensions (6 in SI, 3 in CGS/Gaussian) changes. So, for full generality you need compile-time (if you want static type integration/CT errors) linear algebra over a rational field (at least & conventionally) to project|inverse project. That might be theoretically possible in C++. I would think it very un-fun and unlikely to ever have been done. There's probably a Mathematica package, though.

  • Unity-RTS-Selection

    Unity RTS-style unit selection

  • php-unit-conversion

    A library providing full PSR-4 compatible unit conversions

  • membrain

    🧠 Type-safe memory units

  • broch

    A library for handling numbers with units.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Units related posts

  • Is it just mean, or is C# easier to learn than JavaScript or even PHP?

    2 projects | /r/dotnet | 6 Dec 2023
  • Show HN: Numbat – A programming language with physical dimensions as types

    8 projects | news.ycombinator.com | 16 Nov 2023
  • Frink is a programming language designed to make physical calculations simple

    6 projects | news.ycombinator.com | 3 Nov 2023
  • What Is Dimensional Analysis?

    2 projects | news.ycombinator.com | 15 Sep 2023
  • GNU Units

    7 projects | news.ycombinator.com | 3 Aug 2023
  • All I can say is that I relate, very much

    1 project | /r/physicsmemes | 13 Jun 2023
  • Are there any languages that allow units?

    1 project | news.ycombinator.com | 29 May 2023
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 5 May 2024
    Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →

Index

What are some of the best open-source Unit projects? This list will help you:

Project Stars
1 mathjs 14,043
2 insect 3,151
3 pint 2,271
4 UnitsNet 2,136
5 mp-units 950
6 numbat 849
7 Unitful.jl 575
8 SI 482
9 rink-rs 396
10 jsr354-api 346
11 dimensioned 293
12 au 279
13 desktop 203
14 safe-units 200
15 coulomb 140
16 measured 117
17 cpc 114
18 indriya 111
19 Unchained 106
20 Unity-RTS-Selection 74
21 php-unit-conversion 65
22 membrain 61
23 broch 52

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com