I find the calculator for Numi[1] and Soulver[2] to be very useful for day to day tasks but not worth having in a separate apps. It’d be possible to add a block type that implements a limited subset of Numi and make it very convenient to use inside Logseq
I’m happy to implement this myself, I made a prototype parser using Instaparse this morning and it already supports the features I need (basic arithmetic and variable assignment)
Design wise we could embed it in a code block like this:
so great !
is a variable remembered inside the same code block or is it page wide ?
It would be awesome if we could store a result as a global persistent variable or somehow pass it to a property::
In the current implementation I’m working on, the calc’s environment (mapping between variable names and computed values) is local to calc’s editor component. After I put that one up, we can discuss exposing the environment to the rest of the page. Scoping rules are not as straightforward in a context that is best model by graphs (and not by trees!)