After years of procrastination, I've decided to dust off my little app, write documentation for it, and release the latest version, as it contains many useful improvements and features [0] that could be beneficial for many people.
I am the author of NoteCalc, and it warms my heart that my project is mentioned here :)
As a sidenote I would like to mention that NoteCalc is still in active (but slow) development, though I do it privately, and the next big release will be definitely this year.
As I see it it is rust and wasm. It would be nice to have some note about the architecture in the docs, maybe someone would pick it up to make a desktop app from it too.
Hi, it would not be hard at all, at the moment for me it would be like 1 day of work.
Honestly, I just don't see its benefit, you can always open it on a dedicated browser and use it as it would be a desktop app.
However, in the next release I might provide a desktop version.
Well, I prefer to use browsers as, well browsers instead of app hosts..., to many tabs, too many distractions, and not that fast )the whole browser, not a given page).
Just using an app that I can open and close anytime is much preferable to me. Currently using speedcrunch for this, but your solution looks a bit more feature full and maybe a good middle-ground between a calculator and just firing up ipython or similar.
All in all a desktop version would be much appreciated, but I understand if it's not a focus for you.
For the technical part: what do you think, what would you use in rust to turn this intu a regular gui app?
One of the primary goal of NoteCalc is to be easily accessible (e.g. it was mainly born because Soulver is MacOS only). So the browser-based client was obvious choice, and I chosed WASM for
- performance reasons
- to be able to use rust
- to avoid as much JS (and related technologies) as possible
In a previous versions, only the changed areas were re-rendered, but the code was much more complex and error-prone, and it did not bring any performance improvement, so now I just rerender everything, still excellent performance but much simpler code.
However this is different for calculations, only changed/affected lines are reparsed and recalculated.
Any advice / learnings on using canvas from wasm for this kind of GUI stuff? If I get it right, you just implemented the editor yourself, not using any sort of widget system.
People often recommend not trying to implement editors on top of canvas because of ... reasons [1] [2], but it seems your implementation ended up being pretty simple? (at least in terms of lines of code...).
Originally NoteCalc used a library for handling arbitrarily large numbers.
Unfortunately, some operations were so slow that as a quick fix, I replaced the library with a lighter one without dynamic allocations (which is 96 bit integer with 28scale).
This serves well the primary goal of NoteCalc so I did not spend more time on it yet, but I am on the same page as you, and if NoteCalc will be feature-complete, I will give an other shot to arbitrarily large calculations/precision.
One of my primary design goal was something like that: "My mother should be able to use this tool to calculate/plan her vacation expenses". (My mother is older and not a tech guru you can guess :))
So the primary focus are on simple calculations with meaningful context and immediate feedback. Nothing fancy.
Though, beside that, I think it provides some nice features. E.g. the matrix creation/editing functionality was born because I could not find a simple tool to double check my rendering calculations with.
Yeah, I guess NoteCalc will be useful to many people, it's just that I'm noticing the sad lack of utilization of LuaTex (probably because people don't know it exists and exposes the power of TeX through Lua).
The targets of NoteCalc vs. the tool I'm proposing would be somewhat different, too, because LuaTex outputs primarily to PDF, and I don't know if it can produce HTML.
An idea you might consider is to display some kind of warning symbol or message if the input contains digits or operands which are not interpreted as part of the calculation that produces the output. This would have made the semantic meaning of the syntax highlighting immediately more evident.
[0]: https://bbodi.github.io/notecalc3/changelog.html