HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
JuliaPhysics
Unitful.jl
Julia2020–2024
JuliaPhysics / Unitful.jl

Unitful.jl

Physical quantities with arbitrary units

10Distinct people
13Mentions
0Explicit recommenders
678GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Physical quantities with arbitrary units

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year13 dated mentions

Observed mentions: 2020-01-26 07:53:58 UTC to 2024-10-17 22:34:33 UTC.

0123452020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC202
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC505
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC303
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC202

What Hacker News says

13 sources
Distressingly few programming languages offer an acceptable implementation of units. It's a wonder we get anything done. One of the hidden gems of Julia is that it performs multiplication by juxtaposition, so if you define a variable `m`, then `2m` becomes `2 * m`. That plus overloading and multiple dispatch enables a rather nice library, Unitful[1], which does a fairly good job there. [1]: (Julia indexes by one) https://github.com/PainterQubits/Unitful.jl
In Arithmetic is an underrated world-modeling technology
Julia has Value types for when a primitive type can be used during compilation: https://docs.julialang.org/en/v1.10/manual/types/#%22Value-t... They aren't the same thing, I mostly brought them up to point out that Ada can only throw compile-time errors for range types under limited circumstances, otherwise you're expressing a runtime bounds check using the type system. Which I agree is a nice feature for a static language, which Julia is not; Ada won't let you leave out the runtime check, so numbers outside the range are unrepresentable in the program. It should be possible to use Value types to write a generated function which instantiates a constructor for a primitive type which is restricted to a range. All type errors in Julia are at runtime, but like I said, Ada has to push many range exceptions to runtime as well, and the property
Read the rest
that a number outside of the range is unrepresentable is preserved in both cases. Although I can't point you at an implementation of this in Julia, I'm increasingly confident that it could be done. Julia's type system is also powerful enough to express units https://github.com/PainterQubits/Unitful.jl
In Ada 95: The Craft of Object-Oriented Programming
Not by default, but Julia has various units packages which integrate fairly well with the rest of the ecosystem. Unitful.jl [1] is the most used one I believe and integrates with DifferentialEquations.jl for example. It should also work with many other things, but you might have to patch it up a bit, especially if operations change the units (such as derivatives). [1] https://github.com/PainterQubits/Unitful.jl
In Pint – A Python package to define, operate and manipulate physical quantities
It's really two separate problems but they kinda interact. Unitful quantities with heterogeneous units don't have a `zero` function that works correctly, which gets in the way inside numerical routines. [0] There are other places where 0 or 1 is added, which is an error for quantities but not for plain real numbers. [1] Zygote doesn't handle mutating arrays. [2] [0]: https://github.com/PainterQubits/Unitful.jl/pull/472 [1]: https://github.com/SciML/NonlinearSolve.jl/issues/36#issueco... [1]: https://github.com/rakeshvar/Zygote-Mutating-Arrays-WorkArou...
In ModelingToolkit, Modelica, and Modia: The Composable Modeling Future in Julia
> It's not JUST google and apple, I'm sure they have enough cash and expertise and will to create enough momentum to attract more domain experts in other areas. Maybe, but I'm doubtful. Scientific domain experts flock to languages like Python, Julia, Matlab, R, etc. because they're interactive and allow them to quickly iterate on ideas, query data, produce plots, etc. Swift is not much of an interactive language and is not built around that kind of repl driven experience. > In particular, do you have another example aside from DifferentialEquations.jl ? Sure, here's a smattering of high quality packages made by and for research scientists: https://github.com/JuliaApproximation/ApproxFun.jl https://github.com/BioJulia https://github.com/JuliaDiffEq/ModelingToolkit.jl https://github.com/crstnbr/MonteCarlo.jl https://gith
Read the rest
In Julia 1.4

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.