synapsomorphy
timewizard
I use the gem 'ruby-units' with "irb" on the command line. It's an exceptionally useful library.
anta40
I wonder if there's a similar CLI tool? Nothing against GUI-based tool, but easily usable on terminal is plus point.
dangrie158
Rink: https://github.com/tiffany352/rink-rs/ Is an Open Source CLI implementation
timewizard
I present you, if you're into this sort of thing, one of the snarkiest files on the internet.
https://frinklang.org/frinkdata/units.txt
Alan's editorializing on the nature of radians and hertz is my favorite thing.
defaultcompany
// Beware the SI's broken definition
// of Hz. You should treat the radian as being correct, as a fundamental
// dimensionless property of the universe that falls out of pure math like
// the Taylor series for sin[x], and you should treat the Hz as being a
// fundamental property of incompetence by committee.
This is all quite entertaining.spcebar
> // I dislike having a prefixed unit as the base reference. What a horrible decision. Why don't you just have it go to ten and make ten a little louder?
Really delightful.
mananaysiempre
That question (regarding the unit of mass, not the volume control) does apparently have an answer[1,2], and the answer (if true) is really funny: this was in fact the original plan, and the proposed unit was called the grave[3] (pronounced “grahv”). Then the French Revolution came and that name’s similarity to the word grave (count, the noble title, from German; cf. English margrave) led to it being superseded by the gram.
I don’t like the reference I have, though, so take this whole story with a grain of salt.
[1] https://phys.libretexts.org/Courses/Prince_Georges_Community...
mananaysiempre
There are other contenders if you like your snark on the ranty side.
// At this point, I'd like to take a moment to speak to you about the Adobe PSD format.
https://github.com/gco/xee/blob/4fa3a6d609dd72b8493e52a68f31...camtarn
Haha, wow. And he really has it in for the candela too. Thanks for pointing to this, I would never have thought to look here, but it's an excellent read.
photonthug
// Alan's editorializing:
// I think the candela is a scam, and I am completely
// opposed to it. Some good-for-nothing lighting "engineers"
// or psychologists probably got this perceptually-rigged
// abomination into the whole otherwise scientific endeavor.
//
// What an unbelievably useless and stupid unit. Is light
// at 540.00000001 x 10^12 Hz (or any other frequency) zero
// candela? Is this expected to be an impulse function at
// this frequency? Oh, wait, the Heisenberg Uncertainty
// Principle makes this impossible. No mention for
// correction (ideally along the blackbody curve) for other
// wavelengths? Damn you, 16th CGPM! Damn you all to hell!
//
bschmidt987
[flagged]
bschmidt714
[flagged]
nkrisc
Looking at the sample calculations, isn’t the first example missing the temperature of the water?
mbrubeck
units.txt defines `water` like this:
water := gram / cm^3 // Standard density of water (defined)
1 g/cm^3 is the maximum density of water at standard pressure (1 atm), which it reaches at 3.98°C.(Or at least, that used to be true by definition. Using the current definition of the kilogram, and the latest measurements of water density, the maximum density is actually closer to 0.99997 g/cm^3.)
nkrisc
I see, that makes sense now.
bschmidt960
[flagged]
bschmidt751
[flagged]
bschmidt832
[flagged]
Interesting project. I use command line Qalculate [1] for this (has a very similar feature set to Frink AFAICT) and Pint [2] for scripting. I feel like unit-aware calculators are hugely underused by physical engineers, it's the same idea and benefit as type safety but they're virtually unheard of, everyone just uses excel. Having guaranteed dimensional correctness is so great for the early design stage, it makes it a lot easier to explore the problem space.
[1] https://qalculate.github.io/ [2] https://pint.readthedocs.io/en/stable/