Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lindig/tcalc
Minimal desktop calculator that can parse hour:min:sec values
https://github.com/lindig/tcalc
ocaml
Last synced: 4 days ago
JSON representation
Minimal desktop calculator that can parse hour:min:sec values
- Host: GitHub
- URL: https://github.com/lindig/tcalc
- Owner: lindig
- License: unlicense
- Created: 2021-10-16T19:00:04.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-14T09:03:34.000Z (3 months ago)
- Last Synced: 2024-08-14T19:23:29.542Z (3 months ago)
- Topics: ocaml
- Language: OCaml
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
![Build](https://github.com/lindig/tcalc/workflows/CI/badge.svg)
# TCalc
This is a minimal desktop calculator (taken from the Lex/Yacc section of
the [OCaml] manual) that can parse `3:04.5` as a time and covert it into
184.5 seconds. I'm using it for simple time calculations.```
$ tcalc
3:04.5
184.50 (00:03:04.50)
11:52.2 / 2670 * 500
133.37 (00:02:13.37)
$
```
* Operators: + - * / ^
* Command line editing and history
* Variables (x = 21 * 2)To help with debugging the parser, the parsed expression is emitted in
prefix syntax.# Installation via Opam
[Opam] is the [OCaml] package manager that installs packages by
compiling them from source code.```
$ opam install tcalc
```# Installation from Sources
This is an [OCaml] project, it assumes you have available on a Unix
system:* OCaml
* Dune
* Make```
make
make install
```# Contribute
If you find this useful, please contribute back by raising pull
requests for improvements you made.[OCaml]: https://www.ocaml.org/
[Opam]: http://opam.ocaml.org