Re:Dear AI startups: Your ML models are dying quietly
by nabla9 on Tuesday April 23, 2019 @05:44AM
(#19726928)
You would like to have 'unit system' that would keep track of the units of measure in general and the ability to use concepts like dimensional homogeneity to avoid semantic errors while programming. Alas, they don't exist as far as I know.
[ Parent
| on HN ]
Re:Dear AI startups: Your ML models are dying quietly
by alkonaut on Tuesday April 23, 2019 @06:16AM
(#19727105)
F# has units of measure. A frontend is (usually) not F#, but even for a more loosely typed system such as your typical web frontend, it should be possible to represent scalars as tuples of a number and an identifier. Eg. { qty: 12, unit: "kgs" }.
Re:Dear AI startups: Your ML models are dying quietly
by AKrumbach on Tuesday April 23, 2019 @07:36AM
(#19727548)
A search on Google turns up this Common Lisp code, which appears to define a number of SI units (both base and derived) in the sort of manner described.
http://www-ksl.stanford.edu/knowledge-sharing/lib/unit-conve...
Given the way this appears to be defining some sort of class-based hierarchy, with the correct type requirements this code should perform exactly the sort of unit/type checking the grandparent post wanted, but I didn't go digging into the rest of the project files to confirm this code defined things in the correct manner for that to work.
Re:Dear AI startups: Your ML models are dying quietly
by alehander42 on Tuesday April 23, 2019 @11:43AM
(#19729691)
Nim also has it