https://github.com/hasufell/clac
Simple RPN calculator
https://github.com/hasufell/clac
Last synced: about 2 months ago
JSON representation
Simple RPN calculator
- Host: GitHub
- URL: https://github.com/hasufell/clac
- Owner: hasufell
- License: gpl-3.0
- Created: 2015-02-13T16:21:26.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-14T18:34:17.000Z (about 10 years ago)
- Last Synced: 2025-01-28T18:46:02.513Z (4 months ago)
- Language: Haskell
- Homepage: https://hasufell.github.io/clac
- Size: 449 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple RPN calculator
## About
Very simple RPN calculator. Works with STDIN and arguments. Also has a gtk version.

## Build Status
[](https://travis-ci.org/hasufell/clac)
## Install
clac is installed using cabal:
```cabal install```
It works well in a sandbox too:
```cabal sandbox init && cabal install```
## Run
If your cabal binaries are in $PATH after installing, invoke clac like any
other program:```
clac-cli
```It can also be ran via cabal (inside a sandbox or not):
```cabal run clac-cli```
To run the gtk version:
```cabal run clac-gtk```
## Usage
Straightforward RPN calculator.
```
$ clac-cli 1 2 - 3 +
$ echo 1 2 - 3 + | clac-cli
$ clac-cli
1 1 +^D
```It supports multiple equations.
```clac-cli 1 1 + , 2 2 +```
For available operators, check the operator list.
```clac-cli -o```
To print the entire equation as a tree, run in verbose mode.
```clac-cli -v```
## TODO
* Using something more appropriate than Double
* Support for implicit multiple equations (currently only supports explicit)
* Better pretty printing (intermediate calculations for instance)