DonationCoder.com Forum

Main Area and Open Discussion => General Software Discussion => Topic started by: c-sanchez on December 30, 2023, 08:46 AM

Title: Notepad Based Calculators
Post by: c-sanchez on December 30, 2023, 08:46 AM
I am looking for a calculator that works as a Notepad.
Probably one of the best known is Soulver (https://soulver.app/)

I am looking for one that is as good as Numara, but lighter and faster to start up.
Here is a list of the ones I have found.
In the first answer I leave what I am trying to do.

Numara Calculator (https://github.com/bornova/numara-calculator)
System: CrossPlatform (Electron Based) & Online (https://numara.io/)
Price: Free
Source Code: Open Source
Variables Support: Yes
Size: 253mb~ Installed in Windows

Tally (https://hrbn.github.io/tally/)
System: Online (https://hrbn.github.io/tally/), (can run locally using node)
Price: Free
Source Code: Open Source
Variables Support: Yes

Notepad Calculator (https://notepadcalculator.com/)
System: Online (https://notepadcalculator.com/)
Price: Free
Source Code: Closed
Variables Support: Yes

Tauri NoteCalc (https://github.com/CrankZ/tauri-note-cal)
System: CrossPlatform (Tauri based)
Price: Free
Source Code: Open Source
Size: 5mb~ Windows exe
Variables Support: Yes

Numi (https://numi.app/)
System: Mac
Price: Paid
Source Code: Close

Calculon (https://github.com/sj14/calculon)
System: CrossPlatform (Java Based)
Price: Free
Source Code: Open Source
Variables Support: No
Size: 143mb~ (Includes Java Runtime)

OpalCalc (https://www.skytopia.com/software/opalcalc/)
System: Windows (Requires .net 3.5 or higher)
Price: Paid / Free (Limited)
Variables Support: Yes
Source Code: Closed
Size: 350kb~
Title: Re: Notepad Based Calculators
Post by: c-sanchez on December 30, 2023, 09:02 AM
Using ChatGPT I have tried to create a calculator like the one I am looking for.
With Python and PyQt6, to make it cross-platform.
With mathjs, so that it has all its functions.
With QuickJS, to have a lightweight Javascript interpreter, so you can have mathjs updated without any problem.
There is mathjs for Python, mathjspy (https://pypi.org/project/mathjspy/), however, it is not updated often

This is the source code of the program so far:

QuickMathPad
import sys
from PyQt6.QtWidgets import QApplication, QWidget, QTextEdit, QHBoxLayout
from PyQt6.QtCore import Qt
from quickjs import Context

class MyApp(QWidget):
 def __init__(self):
   super().__init__()
   self.setWindowTitle("QuickMathPad")
   self.setMinimumSize(512, 320)
   self.resize(512, 320)
   
   self.layout = QHBoxLayout()
   self.setLayout(self.layout)
   
   self.text_edit_left = QTextEdit()
   self.layout.addWidget(self.text_edit_left)
   
   self.text_edit_right = QTextEdit()
   self.layout.addWidget(self.text_edit_right)

   self.text_edit_left.textChanged.connect(self.evaluate_expression)

   self.context = Context()
   self.context.eval(open("math.js").read())

 def evaluate_expression(self):
   lines = self.text_edit_left.toPlainText().split('\n')
   results = []
   for line in lines:
     try:
       result = self.context.eval(line)
       results.append(str(result))
     except Exception as e:
       results.append(str(e))
   self.text_edit_right.setText('\n'.join(results))

app = QApplication(sys.argv)
window = MyApp()
window.show()
sys.exit(app.exec())


Things I would like to correct:
Allow comments using #
Fix bugs like using percentage '%', blank lines showing as "None".
In general, make it have the same functionality as Numara.

If someone knows Python and wants to fix these problems it would be great.
Or create your own version in some fast, portable and lightweight language?
Such as Lua, AutoHotKey, etc, Rust?
Title: Re: Notepad Based Calculators
Post by: c-sanchez on December 30, 2023, 10:13 AM
In fact I just found that there is such a Calculator written in Rust  ;D
https://erhanbaris.github.io/smartcalc-app/
Title: Re: Notepad Based Calculators
Post by: rjbull on December 30, 2023, 03:31 PM
Did you forget you started a similar thread here before - notepad calculator? (https://www.donationcoder.com/forum/index.php?topic=50092.msg439324#msg439324)

Did CalcTape not suit you?
Title: Re: Notepad Based Calculators
Post by: Target on January 01, 2024, 01:56 AM
how about QuikTape? (https://www.portablefreeware.com/index.php?q=quicktape&m=)
Title: Re: Notepad Based Calculators
Post by: rjbull on January 02, 2024, 04:28 PM
You might also like to look at EDI - TEXTEDITOR (https://www.edi-texteditor.com/en/).  Warning - I haven't tried it.  From the Features List (https://www.edi-texteditor.com/en/features/):

Edi FREE
With Edi FREE you can mail merge into multiple PDF files and send them as an email.

Edi FREE is a professional spreadsheet and a word processor program.

You may use Edi FREE without registration and without any obligations at no cost, as long as you wish, even for commercial purposes.
In case, more functionality is needed - you can upgrade to Edi PRO.

Bit du Jour are offering a discount (https://www.bitsdujour.com/software/edi-text-editor/in=search-for-software) on the Pro version.  It needs .NET, if that bothers you.  I think their main point is that the word processor and spreadsheet functions are much better integrated than Microsoft Office.
Title: Re: Notepad Based Calculators
Post by: c-sanchez on January 11, 2024, 09:12 AM
Did you forget you started a similar thread here before - notepad calculator? (https://www.donationcoder.com/forum/index.php?topic=50092.msg439324#msg439324)

Did CalcTape not suit you?
lol I had forgotten that I had created this thread before.

CalcTape does not work the way I expect from a notepad that displays the results on the side.
It's not a bad program, but it's not the kind of simple notepad that displays the results on the side if necessary.
Title: Re: Notepad Based Calculators
Post by: c-sanchez on January 11, 2024, 09:14 AM
how about QuikTape? (https://www.portablefreeware.com/index.php?q=quicktape&m=)
This is the same as with CalcTape
Title: Re: Notepad Based Calculators
Post by: c-sanchez on January 11, 2024, 09:18 AM
You might also like to look at EDI - TEXTEDITOR (https://www.edi-texteditor.com/en/).  Warning - I haven't tried it.  From the Features List (https://www.edi-texteditor.com/en/features/):

Edi FREE
With Edi FREE you can mail merge into multiple PDF files and send them as an email.

Edi FREE is a professional spreadsheet and a word processor program.

You may use Edi FREE without registration and without any obligations at no cost, as long as you wish, even for commercial purposes.
In case, more functionality is needed - you can upgrade to Edi PRO.

Bit du Jour are offering a discount (https://www.bitsdujour.com/software/edi-text-editor/in=search-for-software) on the Pro version.  It needs .NET, if that bothers you.  I think their main point is that the word processor and spreadsheet functions are much better integrated than Microsoft Office.
I think I tried that not long ago, it is a kind of alternative to Word/Excel, but if I am not mistaken it is much slower than any of the ones I have tried, such as LibreOffice, OnlyOffice, WPS Office, etc.
Title: Re: Notepad Based Calculators
Post by: Deozaan on March 02, 2024, 01:32 PM
I'm locking this thread because (1) the conversation seems to be finished, and (2) there have been a lot of spammers recently posting in this thread, asking an innocuous-looking question while quoting the first post but sneakily editing some of the quoted links to point to other sites. And since there are a lot of links in the first post it takes some time and effort to spot which ones have been tampered with.

If you feel the conversation wasn't over and would like me to unlock the thread so the discussion can continue, send me a DM and I'll be happy to oblige.