On 05/10/2021 13:06, Oscar Benjamin wrote:

I agree that pattern matching is a crucial part of a CAS and should really be the core of SymPy. If I was redesigning SymPy from scratch then everything would be built on top of a pattern-matching engine and almost all of the logic from the myriad Basic subclasses would just be written as pattern rules. My equivalent of SymEngine would just be a C implementation of the pattern-matching engine rather than a repeat of the object-oriented design of SymPy.

I also agree that matchpy looks like a good implementation of pattern-matching and it makes sense for it to be usable with SymPy. What the SymPEP does not address though is what benefit is gained for users by making matchpy a non-optional dependency. The examples shown look like somewhat specialised usage for which an interested user could just choose to install matchpy.
It must be a little sad to discover that too late - do you have any idea how much speed up that would have produced?

RUBI would be a good motivation but as far as I can tell RUBI does not yet work. Actually I would prefer it if RUBI was already in a separate package from SymPy - it should not have been merged until it was at least partially working. The rubi_tests folder is included for all users and includes e.g. the sympy/integrals/rubi/rubi_tests/tests/test_trinomials.py file which wastes at least 1.5MB disk space for every single SymPy user for precisely zero benefit (these tests should clearly be in a separate repo). I don't see how making matchpy a non-optional dependency would make it any easier to improve RUBI since anyone who wants to work on it can just install matchpy. In fact if RUBI was not in the main SymPy repo then it could have a hard dependency on matchpy.

I think SymPy has resisted the pressure to bloat extremely well. The last time I downloaded a version of Mathematica it was something over 3GB in size! I am all in favour of not adding stuff that isn't needed just because large 'disks' are so common. Irrelevant code also makes it harder to explore the SymPy source.

David

--
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/04e36925-a3b7-6ef0-c521-6728f645e011%40dbailey.co.uk.

Reply via email to