ecode
ecode copied to clipboard
Built-in Scientific Calculator
This is really useful. Please don't close this issue too soon. I don't want you to implement the features of CASIO calculators. I want something far more simple. I don't need the physical calculator-like UI with multiple buttons. I only need something like a text box that allow me to input my mathematical expression and press Enter to evaluate it. Something like: sin(pi/4) + sqrt(2)cos(pi/3) + 2ln(2) + e^(-2).
Such a job is too simple that I don't want to leave the editor. I know there is terminal tab and I can fire up Python. But Python is overkill IMO. What I'm currently do when I need to evaluate some random mathematical expressions like this is to use Google. Yes, Google can evaluate mathematical expressions.
I know there is terminal tab and I can fire up Python. But Python is overkill IMO.
Maybe don't use python and use calc (which is actually much better and specialized). I agree that it would be "cool" to have an math expression evaluator, but it's not particularly prioritary and it will not be obvious for the user where and how to use it. The best place is probably in the locate bar, it could use the = to start evaluating a math expression (this is what QtCretor does, but in their case they do a JavaScript eval).
TinyExpr could be used, which is a very small and simple math expression evaluator.
Which calc? The calc on #575? It's a POSIX crap. Can't even compile and run on Windows without cygwin-1.dll/msys-2.0.dll!
The best place is probably in the locate bar, it could use the
=to start evaluating a math expression
What do you think about making it a plugin and have it on a popup window like the AI Assistant?
Of course the prompt will start with =.
It's a POSIX crap
What do you think about making it a plugin and have it on a popup window like the AI Assistant?
That would be too much work, we were talking about a quick math expression and now we are talking about a math expression plugin (which is much more work), that is far removed from what I would be willing to implement myself. I don't think it's a bad idea per-se, something like SpeedCrunch but in an editor tab would be cool, but not particularly relevant compared to other pending features in ecode and eepp.
Making it a plugin is to allow turn it on or off on the fly. I don't ask for any new functionalities. It's only a popup window with a text box. I can't get it why this would be too much work compared to hacking the locate bar.
"Get off my lawn" is an American expression for telling someone to leave, often used by an older person, and has become a popular phrase in media like the movie Gran Torino.
OK. At first I didn't understand. But the Google AI helped me.
I can't get it why this would be too much work compared to hacking the locate bar.
Locate bar is very very easily to extend. Plugins are quite a lot of work, source is there so you can give it a look.
OK. At first I didn't understand. But the Google AI helped me.
I was just joking, insulting POSIX is almost blasfeme for me.
I'm still open to add it in the locate bar, so I'll re open and I might add it later.
Making it a plugin is to allow turn it on or off on the fly.
I believe it's possible to toggle the feature on or off even when using the locate bar. A checkbox in Settings can handle this.
I was wrong for calling it POSIX crap. But that program needs GNU Readline. Deploying it to a system without Cygwin or MSYS2 is going to suck. I doubt you can just copy the DLLs from Cygwin/MSYS2 and expect it to work.