Is there any way to enter math formulas without blocks?

So I've concluded after a short search and browsing of relevant posts that there seems to be no formula block that allows you to enter a math formula. I'd like to double check whether this is the correct conclusion. So if you need a formula implemented, without using numerous blocks, is there any way to do so, maybe writing yourself an extension?

I thought that writing a formula is such a common task that it must have been addressed. Besides the reactive buttons that I need to interact with a user, I also need procedural support such as conditional and calculations. Conditional using blocks is busy work but calculations using blocks is just counter-productive if not plain retarded. I made a simple quadratic solver and the majority of my time was spent blocking up the formulas. As I was reviewing the formulas, I couldn't make heads or tails of what it was, let alone check for its correctness. This is bad both for a developer checking their own work and a teacher checking their students' work, which can be both for me. Even dinosaurs like NI LabVIEW, which is entirely blocks-driven, has a formula node since the 90's where you can type in the formula.


If you don't like blocks, you could try an embedded javascript stunt:

1 Like
1 Like

Thanks for the suggestions.

So is there an official solution to this? I'm all for contributions but I don't know how well these contributed extensions are written. It sounds like I can try a few different extensions and see which one works best for my case. What if the author stops the support or changes the underlying code? Any way to see the code in the extension? Thanks.

BTW, I recognize @Taifun as the id has responded to several questions I posted. I will start with their extensions on the account of the id being very actively responding to my questions (good sign). I wonder if the MIT group is listening in on this forum since these features like formulas, displaying nearby BT devices (@Taifun has a custom extension BT classic that has it), and displaying WiFi routers (again @Taifun has one extension that official release has none). How would you teach a class with all these contributed extensions all over the place while the official release is so bare?

It sounds like you have found this:

https://puravidaapps.com/math.php

which is probably your best approach....

If an extension is doing what you want, then theoretically you do not need support...
However Google might restrict functionality in a later release of the Android operating system and probably then an extension needs adjustment...

Only for open sourced extensions

Taifun

2 Likes

If you want to be extension-free, here is the Javascript post buried in my earlier link ...
https://groups.google.com/d/msg/mitappinventortest/0oVTthDFChY/GmIBOEH_EQAJ

It has not been updated with the new Webviewer event block that signals end of evaluation, so it still uses the Clock Timer.

Thanks. So Webviewer with a math expression processing library that is no longer available? I took the pain to build a few expressions like building a house in minecraft. My quadratic equation exercise was helpful. I wish the MIT academics would make this possible as a built-in feature. Is this ai2 project currently dormant? Do they not have funding anymore?

Good points. Thanks. I prefer open-source but if not possible I may prototype with free but not open-source extensions.

That's an interesting extension. Thanks.

So I'm building up my app, spent 2 days to get this much stuff. It's an app to connect to a BT sensor node to read sensor values.

One last convenient feature I'd like to achieve before the release would be to have a way to store a few calibration values to the app so it would be recalled each time the app runs. In python or even C/C++ in some cases, I would use json.dump() to dump a dictionary to a config file. Then I would use json.load() to load the parameters back in. What would be the proper way to achieve this feature within ai2?

Thank you!

Save to a list, then to a tinydb, and call back and use / update as required

1 Like

Thanks. I found a tutorial on this:

So I made the save feature trigger when an entry loses focus and load values on screen1 init and updates the entry text. Works like a charm. It does have different save locations for the ai2 companion and an actual compiled app, FYI.

I made an updated math editor using the WebViewer that doesn't rely on a Clock.
Math.aia (56.6 KB)

It looks like this: (The top is the editor, the bottom shows the LaTeX source)

For those wanting a quick peek into the easrng solution, here are the parts, inline:

The Math.html file is too large to show inline.
It is in the .aia source, in the Media folder.

P.S. This would benefit greatly from the addition of a Latex editor front end, if any one is up to it.

Regarding your complaints about AI2 math formula representation,
I notice you cast your math blocks exclusively in external socket mode.

You can give your blocks a more formulaic appearance by switching some of them to inline mode for interior factors. That gives you a more compact representation, and helps group your terms.

The choice between inline/external is on a per block basis, in its context menu.

(added to FAQ)

Thanks for trying to help. I know about that. It just doesn't help the overall situation. Something that should have been included has never been included for this long and only contributed extensions solve problems that the official system should have done ages ago is very concerning to me.

Remember, AI2 is an educational tool maintained by a very small team at MIT, intended for people getting their first exposure to programming.


If you want to go on the AutoBahn, try a different tool.

3 Likes

@ABG ... very effective small team !!