jordanl2 / modularcalculator Goto Github PK
View Code? Open in Web Editor NEWPowerful modular calculator engine, along with a graphical interface.
License: Other
Powerful modular calculator engine, along with a graphical interface.
License: Other
Take lots of good screenshots and put them into the repo, in /screenshots
Single object that encapsulates 2 or more dimensions.
Written as a series of numbers separated by commas. A separate parser must be written and Operand type created.
Numbers can't have units.
-- OR --
Use arrays for the type, and just write special functions that take arrays as inputs and treat them as coords.
Functions:
find distance between two coordinates
find mid point between two coords (or X% between them)
To more easily find a particular statement and its result in the output, number each statement in the input and the corresponding result in the output.
Should arb base numbers prefix simply be the format:
\d+[zZ]
With no mandatory 0 at the start?
To make the interface work better with Sway, when the file picker is opened in the Install/Remove Features window, the window is hidden.
It's possible this is no longer needed since the xdg-foreign protocol has been implemented in Sway:
swaywm/wlroots#2487
Test with Sway and remove if possible.
Problem is caused by the two having the same fundamental dimensions.
On SwayWM.
This doesn't affect the non-flatpak version.
Also the Open File dialog is also tiled rather than floating.
Like the split function, but separator is a regex not a static string.
Possibly call it "regexsplit".
A number followed by a constant should do implicit multiplication with higher precedence than normal operators.
Eg:
speedoflight / 2 earthgravity
should be equivalent to
speedoflight / (2 earthgravity)
Function format takes an optional second parameter, of type system.
Currently user has to guess the IDs of unit systems rather than being able to insert them from a list.
I can do the calculations using the E notation, but it would be very useful to have the results displayed in the same style
Occurs with the interface on Wayland when clicking on the main UI's splitter.
Add support for the various scientific functions in SciPy, e.g. Regularised Incomplete Beta Function:
https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.betainc.html
Currently font sizes are hardcoded and assume system default font size is 10.
Add a button in the feature options edit dialog to reset that feature's options to default.
There isn't anything in the menu apart from undo/redo which can be done through hotkeys or the context menu.
Opened files are displayed in tab name as being in /run/user/1000/doc rather than their real locations.
If it's not given, default to ''
Blocked by #16.
Window icon is broken after refactor.
Example:
a = 0
(a > 0) then 1 / a else 0
In this case, since a is not greater than 0, only the else
should be evaluated, but instead both paths are evaluated.
Eg:
a = [0, 1]
(a > 0) then 1 / a else 0
Should return: [0, 1]
Instead returns:
[0, ("Could not execute operator / with operands: '1', '[<modularcalculator.objects.items.OperandResult object at 0x7f6410130e80>, <modularcalculator.objects.items.OperandResult object at 0x7f6410130790>]' - Could not execute Operator /", [<modularcalculator.features.structure.innerexpressions.InnerExpressionItem object at 0x7f6410130970>, <modularcalculator.features.nonfunctional.space.SpaceItem object at 0x7f6410130be0>, <modularcalculator.objects.items.OperatorItem object at 0x7f6410130340>], '/')]
If a unit without number is given for first param, eg "mile", it should default to "1 mile".
Either:
Same as ^ except second param is inverted.
Eg: "16 root 2" is the same as "16^0.5"
Should be fixed in the menu and the context menu.
Would be nice to have an option to activate automatic execution each time the input changes.
If it is too resource intensive to update after every change, maybe add a bit of latency and update the output after 1 or 2 seconds of unmodified input.
eg "day_usage"
The undo/redo context menu actions for the text edit pane should link to the actual undo/redo actions.
"Haystack" params: "string", "array"
"Needle" params: "substring", "pattern", "character", index params ("start", "end", "number")
These param types should be in the same order for all functions.
"Haystack", "Needle" (HN) functions:
element(array, number)
regexcount(string, pattern)
regexget(string, pattern, [group])
regexsub(string, pattern, replacement, [group])
find(string, substring)
lstrip(string, character)
rstrip(string, character)
replace(string, substring, replacement)
strip(string, character)
substr(string, start, end)
"Needle", "Haystack" (NH) functions:
regexsplit(pattern, string)
join(substring, strings)
split(substring, string)
Split/join methods in other languages:
Python: split is HN, join is NH
Perl: Split and join are NH
Ruby: Split and join are HN
Java: Split is HN, join is NH
In total:
Split - HN in 3/4 languages studied
Join - NH in 3/4 languages studied
Split and join are inconsistent with each other in 2/4 languages studied
Ability to write a function definition, and reuse it multiple times, in the same script. More convenient than writing an external function (which involves writing and saving a separate file).
The function definition should involves storing a reference to the function in a variable. E.g.:
x = {
PARAM1 / 2
}
Executing the function uses the same syntax as executing an external function. E.g.:
# returns 2
@x(4)
The input validation for user-defined functions should allow complex unit types using any number of dimensions of any power.
Example, distance/time^2:
#INPUT number:distance^1,time^-2
Double clicking on an option in an insert dialogue should automatically use that item and insert it, without needing to click OK.
Lowest common multiple
Highest common factor
A way to:
Copy the output view - questions and their answers
Also, perhaps a way to export the same to a file
Seen in log with file dialog open:
org.kde.solid.udisks2: Failed enumerating UDisks2 objects: "org.freedesktop.DBus.Error.ServiceUnknown"
"org.freedesktop.DBus.Error.ServiceUnknown"
This is so we can pass multiple arrays to min, max etc, and have the function performed on the list of values at each position in the arrays at once. Eg:
min([0, 3, 6], [4, 2, 5])
= [0, 2, 5]
Rule defintion:
IF argument types are ONE array only
AND return type is not array
AND inputs provided are more than one array
THEN:
Switch from PyQt5 to PyQt6.
How can i reference a specific line for a calculation and how can I add or multiply the last answer
Must default to using the precision option.
Comments make it easier to read the output. Try to include them in the output.
Perhaps the engine needs to also be in its own git repo.
EDIT: Not for now, it'll make installation much harder and doesn't really bring many benefits.
At the moment, binary numbers will preserve their length, and zero-pad after an operation. This is to make bitwise operations work (eg shift).
Possibly this should be an option.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.