[Haskell] Announce: CalDims 1.0 (RC 1) - A calculator aware of units
schneegloeckchen at gmx.li
Tue Dec 19 05:17:26 EST 2006
i'd like to inform you about the first announced version of CalDims.
Its website is in the haskellwiki:
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
* to compile just type `make` and then (optionally) 'make install' as superuser.
* to read documentation, start the program and then enter `\?`
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
Here's an example session:
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
> # 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
> #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)
> #Save everything (units, functions) to a file
> \s my_calculation.cal
More information about the Haskell