Our great sponsors
-
Does the GNU projet makes it repositories available online ?
I'd like to have a look at the code but all I found is an outdated mirror : https://github.com/ryantenney/gnu-units
-
Looks like it is comparable to javax.measure (https://jcp.org/en/jsr/detail?id=363). I used an implementation of that a few years ago: https://github.com/unitsofmeasurement/uom-se
It's a complex domain, especially if you get down to having more complex units composed of other units and want to do conversions between metric and imperial. In our case we were dealing with material properties (chemical, physical, magnetic, etc.) and different countries and companies using different ways to record characteristics for materials.
-
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.
-
Or if you'd rather see it in git https://github.com/dspinellis/unix-history-repo/blob/BSD-4-S...
-
Thanks, I did not know that units is able to work with constants. I always used Insect[0] for this.
-
I've seen a few before, and a quick search yielded a bunch for me, right off the bat. By no means exhaustive:
Julia: https://github.com/PainterQubits/Unitful.jl
Python: https://pint.readthedocs.io/en/0.6/
C++: https://github.com/nholthaus/units
etc.
And yes, it has always struck me as strange that date/time/calendar libraries are standard as canonical libraries shipped with language distributions, but units are not.
-
pqm
Physical Quantities and Measures (PQM) is a Node and browser package for dealing with numbers with units
There are heaps of libraries for all languages because it is a fairly fun and straight forward project. I personally created this one because I was frustrated with how slow and clunky the existing javascript libraries were:
https://github.com/GhostWrench/pqm
Also, I open sourced just the unit database (in JSON format) for anyone interested in making their own version:
-
There's also uom for Rust https://github.com/iliekturtles/uom which also provides types for type level operations
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
You are probably right.
The one in FreeBSD is from NetBSD: https://svnweb.freebsd.org/base/head/usr.bin/units/units.c?v...
The NetBSD version is from Adrian Mariano: http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/units/units....
The one in Plan9 is in yacc: http://9p.io/sources/plan9/sys/src/cmd/units.y
This GitHub repo claims to be V6: https://github.com/memnoth/unix-v6/blob/master/source/s2/uni...
-
> I don’t think I can link Ada libraries into my Ruby or Elixir codebase
Ruby has (among others, I’m certain): https://github.com/olbrich/ruby-units
-
Recently I created a library for unit conversion in Julia, which is the most complete tool for unit conversion I am currently aware of
Related posts
- A better/faster JavaScript library for physical math
- I'm a beginner making a library for unit conversion, contributions are welcome
- Ask HN: Show your failed projects and share a lesson you learned
- Is it just mean, or is C# easier to learn than JavaScript or even PHP?
- Show HN: Numbat – A programming language with physical dimensions as types