⬆️ ⬇️

Calque - a calculator that is more convenient than the browser console

Greetings.



There is an application for iOS - Tydlig , which literally rethinks the calculator, and makes it incredibly convenient. Having used this application once, you remain its fan.



However, for everyday use on the desktop, nothing is more convenient than the browser console, in my opinion, no. In the console, you can use variables, functions, work with expressions as with text - select, copy and paste. This is convenient, and for many years the console correctly replaced me with a calculator for even the simplest operations.

')

Due to the nature of the work, it is necessary to carry out various calculations often, and with time a feeling appeared that something was missing on the console. There is not enough of the most dynamic update values, as in Tydlig.



Finding something like Tydlig gave nothing, and it was decided to write my application.



What came out of this venture:







Where does the idea come from? The idea is not mine. For the first time I saw something like this in LightTable. Then the display of intermediate results of calculations appeared in the Google Chrome developer tools.



I just took the idea, found a suitable math library ( Math.js ), and wrote a user-friendly interface.



Everything works as follows:







The whole interface is text with a transparent background, under which is a container with the results.



Each time a text is changed, all lines are recalculated using a math library, and text hints are updated, which are adjusted to the right place using line breaks and spaces.



I would be glad if the application would be useful not only for me. Thank!



Try it live: http://grimalschi.imtqy.com/calque/index.html

Link to GitHub: https://github.com/grimalschi/calque/



UPDATE : Added ability to copy results.

Source: https://habr.com/ru/post/264229/



All Articles