ewild wrote: ↑Fri Apr 24, 2026 6:51 am
Nice calculator, thank you.
The SmartMath resembles me
OpalCalc, which is my nearly daily tool, and is also inspired by tools like Soulver. So this is a great idea to have a similar tool built into the AkelPad interface!
Cheers! I'm glad you like it

I liked OpalCalc, although I wanted something that didn't require .NET, Java, Python, etc. — something as purist/native to the system as possible.
At the time, I thought about making my own calculator, but after seeing that making a plugin was a viable option, I decided to go down this route. That way, we have all the features / plugins / scripts available in AkelPad
ewild wrote: ↑Fri Apr 24, 2026 6:51 am
I've been making my own JavaScript-based MathText in-text calculator (not publicly released in its current form), and it was the only calculator for AkelPad that could do the percentage operations right, like:
80+50% = 120
80-50% = 40
80*50% = 40
80/50% = 160
As I can see, SmartMath can do it too, as intended; that's great!
This is one of those things that, even though it's really "silly", I thought was essential to have

I'm glad to hear you like it too
ewild wrote: ↑Fri Apr 24, 2026 6:51 am
Doing math without changing the original text is a great idea (my calculator can do it too, directing its output into the Log plugin panel), but your approach is better since it keeps expressions and results in-line.
However, in SmartMath, I can see no option to insert the answer into the text (at least via the copy-paste method) if I explicitly want to do so.
This would actually be something really useful; I'd thought about adding a context menu for the results section, like "Copy Results" or "Copy Operation & Results", but I wanted to get the plugin finished already, sorry ;p
But maybe assigning an operation to a variable and using that would be enough?
ewild wrote: ↑Fri Apr 24, 2026 6:51 am
One question, please.
How to create the SmartMath menu as it is seen in the screenshots on GitHub and here in the topic?
I can see no such thing in my AkelPad.
However, beyond the SmartMath entry, your menu looks like a vanilla one, while I use ContextMenu.dll and ToolBar.dll plugins, and maybe that tracks.
Since I cannot reach the SmartMath menu, I also don't have SmartMath.ini.
It would be great to have a SmartMath::Settings call to reach the settings, as most of the other plugins do.
And of course, a way to set the SmartMath menu up manually wherever a user prefers (in the main menu, submenus, context menus, batton bars...).
That's weird, when you activate SmartMath, it doesn't show up in your AkelPad top menu?
Although that's another little thing I thought about at the end—that maybe the menu should be more "global"—but thinking about how the other plugins work and all that was something I didn't want to pursue, so I ended up leaving it with the native menu. Like I said, I just wanted to get the plugin finished already
Anyway, I think DV knows all those bits I missed much better, especially for improving the integration with AkelPad and other plugins, and he's been making incredible improvements in a very short time, so maybe he'll fix all the stuff I missed
DV wrote: ↑Fri Apr 24, 2026 4:36 pm
Remember, it was you who suggested it!
Haha, definitely! I'm really glad to see a fork making everything better
DV wrote: ↑Fri Apr 24, 2026 4:36 pm
You see, I don't really remember Basic and especially don't know FreeBasic which I've never learnt.
But!
Today we have a very nice AI-driven IDE named "Cursor".
So, I've opened your sources in Cursor IDE and asked to analyze the source code and then implement the following features:
1. support array-like parameters such as `a = (1, 2, 3); a*10`;
2. support parentheses such as `1 + 2*(3 + 4)`;
3. add trigonometric functions such as `sin`, `cos`, etc.
4. add logarithmic functions such as `log`, `exp`, etc.
5. add functions `sum`, `product`, `min` and `max` that accept variable number of arguments such as `sum(1,2,3)`;
6. add user-defined functions such as `f(x, y) = x*y`;
7. in case of syntax errors, report these errors to a user.
Wow, I'm surprised how many new things you've added in such a short time; it took me much longer to polish every little bit haha
To be honest, I admit I built the plugin using Gemini via AI Studio, so I'm fine with you using Cursor either way; in the end, all that matters is that we check everything's working as it should

The hardest part for me was getting the results on the right-hand side of the editor and fixing some rendering/syncing issues with the font size. After that, everything was much easier, so I'm glad to at least leave a useful foundation
Brilliant! I'm going to enjoy trying it out later
DV wrote: ↑Fri Apr 24, 2026 4:36 pm
It is successfully compiled and seems to work.
I say "seems to work" because, as I mentioned, I don't really know FreeBasic, so there may be some flows or issues which I'm not aware of.
Even with these already amazing changes (just try them yourself!), it is still work-in-progress, because:
1) I would like to add support of input hex numbers in a form of `0x7FFF`;
2) I would like to add a function `hex` that will print the result as a hex number;
3) the error reporting needs to be carefully inspected and improved (basing on user's feedback);
4) more to go
To be honest, when I finished the plugin I was thinking something like "I like it, but this still can't quite replace the system calculator yet", for instance because of the lack of trigonometric and logarithmic functions, but with your changes that's completely different.
Support for hex numbers seems like another brilliant idea!
I'm excited to see what new features you'll be adding soon; could you include ewild's ideas as well?
DV wrote: ↑Fri Apr 24, 2026 4:36 pm
I hope you like these changes!
Absolutely!
