[racket] Numbers with dimensions

From: Laurent (laurent.orseau at gmail.com)
Date: Thu Oct 31 12:43:22 EDT 2013

On Wed, Oct 30, 2013 at 10:32 AM, Konrad Hinsen
<konrad.hinsen at fastmail.net>wrote:

> Laurent writes:
>  > Pushed: https://github.com/Metaxal/measures#4-dimensions-and-contracts
> This is getting better and better every day! The use of contracts looks
> like the best way to do run-time dimensional analysis.

Thanks, that's mainly thanks to your feedback.

My only remaining wish is to be able to define my own set of units and
> prefixes, i.e. factor out the second half of convert.rkt. Unfortunately
> this doesn't look straightforward, because it must be possible to
> use multiple unit systems in the same Racket instance. It might actually
> be best to have a specific module per unit system, as there are not
> so many useful ones anyway. Each client module would then require the
> module with the unit system it needs, i.e. measures/si or measures/atomic.

The units are now in a separate file but I did not try to build another
But at least it's possible to require only measures/measure and
and define one's own set of dimensions and units.

I also added the list of chemical elements (just for fun), parsed
automatically from Wikipedia's page:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20131031/a7d3203d/attachment.html>

Posted on the users mailing list.