@Szabolcs calling python from Mathematica is almost done but I'm afraid I might not have time to fully debug until next week. There were two more classes I had to move over (Reader.java and StdLink.java) which implement a listener thread, essentially. I wasn't sure how best to handle the called evaluations, so I'm trying a thing that passes python symbolic structures and has it intelligently build an exec string (where the data is first bound as variables in the passed local env).
It seems promising to me as it means we can basically just write Mathematica code and have it be almost automatically translated into python syntax. I also am including a more basic EvalString method which will be less data efficient but potentially more user friendly.
Basically, the word "expression" is misleading but it's used nevertheless. Usually, expressions are things that have a structure you can access. This is not (should not be) true for atoms. Atoms can have an internal structure like graphs or images, but they are opaque to the user.
If you want to make a distinction for yourself, then you should regard things like String, Integer, Real, Symbol as true atomic, while graphs are only made atomic to improve performance.
And if you want to see an upset Steven Wolfram, just watch the latest Twitch stream 136 (as soon as it is available) about annotations. He discovers in the middle how you are supposed to mutate graphs. It's hilarious and it seems he wasn't aware of this :)
@vasili111 sure, that is expected. But since atoms are a growing part of top level features one could expect to be able to learn how to create them etc.
@vasili111 @halirutan Graph has always been atomic. It's Image that used to be compound but is now atomic.
@vasili111 Also, "atomic" in practice only means that not all the standard behaviours of compound expression are present. Some may still work. The internal implementation may still use at least some compound expressions.
Also, all but the most fundamental atomic types have compound representations.
E.g. MathLink/WSTP only supports transferring a few atomic types such as symbols, strings and numbers. All the rest are handled by first converting to a compound representation. This applies to Graph, Image, Dataset, SparseArray, etc.
Has anyone implemented a general method to animate 3D graphics and still be able to rotate it while the animation is running? (I want to do this with a MeshRegion and change its MeshCoordinates only)
@Szabolcs My belief was that in the old GraphUtilities everything was still a real expression. But I see now that it didn't have a real Graph, it only acted on the list of graph rules.
@Szabolcs once I get a bit more debug work in I'll do that. I'm figuring I'll work it from two ends: a setup.py for the python side and a PacletInfo.m for Mathematica (I already have the latter). Either side can be the main process in this setup.
@Szabolcs finally got proper Mathematica <-> python code working. It takes a few seconds to move a 100x100x100 array which means I should check my code to make sure I'm doing things optimally, but at the very least it works.
PyEvaluate is HoldFirst so we need to do some code injection. The TimeConstraint prevents the kernel from seizing up if the link dies (I tried to get all python exceptions to return as a PythonTraceback object but it seems to only work ~50% of the time and I can't figure out why).
Basic setup instructions are coming once I know exactly what's required to get it working
I have a long string list:
string = {"E:\\job\\a\\000251.png", "E:\\job\\a\\000252.png",
"E:\\job\\a\\000253.png", "E:\\job\\a\\000254.png",
"E:\\job\\a\\000255.png", "E:\\job\\a\\000256.png"}
Now I want to plus 2 into the file base name when the file base name is even digital. I mean I wa...