[racket] Units/measures library

From: Jos Koot (jos.koot at telefonica.net)
Date: Thu Nov 17 10:29:49 EST 2011

Good idea, but I am not sure all unit systems have different abbreviations
for their units.
>From other posts in this thread I see that much material already exists.
I'll wait how this thread will go on.
Jos 

-----Original Message-----
From: Matthias Felleisen [mailto:matthias at ccs.neu.edu] 
Sent: jueves, 17 de noviembre de 2011 16:11
To: Jos Koot
Cc: Racket Users
Subject: Re: [racket] Units/measures library


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.