[Haskell] Announce: CalDims 1.0 (RC 1) - A calculator aware of units

mm schneegloeckchen at gmx.li
Tue Dec 19 05:17:26 EST 2006


Hello,

i'd like to inform you about the first announced version of CalDims.
Its website is in the haskellwiki:

http://www.haskell.org/haskellwiki/CalDims


CalDims is a calculation tool with the following features:

    * Support for user defined basic units and derrived units
    * user defined functions
    * work sheets can be modified/saved via shell
    * (1/3)*3 == 1 (No rounding errors)
    * built-in feature to simplify units
    * easy unit-conversion 


Useful hints:
	
    * to compile just type `make` and then (optionally) 'make install' as superuser.
    * to read documentation, start the program and then enter `\?`


Future:

Short term goal is to provide a stable release so please report all bugs and quirks.
For the next major release I am planning to write a worksheet GUI for CalDims + support
more datatypes.


Here's an example session:

/home/schneegloeckchen# caldims
CalDims 1.0-rc1
Version: GPL 2 (see the LICENSE file)

Type in `\?' to read the inline help.

> # A 60 Watt electric light is burning 2 hours a day. How much energy is consumed in one week?
> 60 W * 2 h / d * 7 d
3024000.0 J
> # What's that in Watt hours?
> 60 W * 2 h / d * 7 d | W h
840.0 W h
> #How much kWh is it in a year (we derrive `year` and `kW` first)
> year := 365 d
New unit year:d ok.
> kW := 1000 W
New unit kW:W ok.
> 60 W * 2 h / d * 1 year | kW h
43.8 h kW
> #Define new basic dimension for currency + variable for energy price
> \u USD
Added basic unit `USD'.
> energy_price = 0.2 USD / kW / h
New function energy_price:USD / kW / h ok.
> 43.8 kW h * energy_price
8.76 USD
> #A simple function for energy costs
> energy_costs (t : s, e:W) = t*e*energy_price
New function energy_costs:USD W s / kW / h ok.
> energy_costs (20 min, 60 kW)
4.0 USD
> #Save everything (units, functions) to a file
> \s my_calculation.cal


schneegloeckchen


More information about the Haskell mailing list