[racket] Units/measures library

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Nov 17 10:10:40 EST 2011

On Nov 17, 2011, at 8:41 AM, Jos Koot wrote:

> That should not be too difficult. I think of:
> Temperatures: Celcius, Fharenheit, Kelvin
> Distance: Meters, kilometers, land miles, nautic miles, lightyear nand so
> on.
> Mass: grams, kilograms, tons, slugs, and so on.
> Weight: grams, kilograms, ounces, pounds, and so on.
> Force: Newton, dyne, etc.
> Energy: Joule, Erg, etc.
> May be more.
> This is easy to do.
> Most work will be looking up references to physical units.
> If no such library exists, I am willing to prepare a function like:
> (unit-conversion from-unit to-unit from-number) -> to-number
> Where from-unit and to-unit are two symbols naming units of the same
> physical dimension.

You may actually consider consuming real names instead of symbols 
so that people can write expressions such as 

 (convert 1/2 m ft)
 (convert 212 f c)
 (convert (sqrt i) g on) ; (I don't know the abbreviation for ounce)

-- Matthias

Posted on the users mailing list.