Calculator that I Love O' so very much
Honestly? I enjoy programming in C and the high performance is always a bonus.
The lower level of C always forces me to better structure my projects. I am generally far more proud of my C code compared to my Python code.
The original idea for this project was implemented in Python. I may go back to this project in the future to prototype ideas quickly. But you can safely assume that cilo will be more reliable going forwards.
(Though your terminal must support Unicode and ANSI escape codes)
Clone the repository, go into the directory, type
make and Bob’s your uncle.
git clone https://github.com/timeopochin/cilo.git cd cilo make
Probably the same or whatever, I don’t know, I don’t use macOS.
I would recomend this tutorial with detailed instructions on how to setup your build environment.
Right now, I have only implemented the 'pretty' rendering, any interactive UI and actual evaluation of the equations are, for the time being, only (partially) working on the Python project.
After building, various (only 1 for now) executables will be in the
bin directory. These can be executed or placed in a directory contained in your
PATH to be accessible from anywhere. It’d be cool for me to add a
make install, but I’m lazy and far from fluent in Makefile standards.
prettify takes string arguments in Reverse Polish Notation (RPN) and displays a nicely formated equation.
You can set the backgroup and foregroud colours of following equations with
-bg <colour> and
You can use special functions in the RPN arguments:
hto highlight a section
Here are some examples you can try:
prettify '3 1 2 / +'
prettify -bg magenta -fg black '5 3 + 4 1 / s *' -bg blue '5 4 2 + h / 3 n 2 ^ / 1 6 * /'