News for hackers. Stuff that matters.
Re:Symbolica Computer Algebra System by krackers on Thursday May 09, 2024 @03:17AM (#40306024)
I feel like this is missing some comparisons to Sympy and Mathematica. Probably it's more polished than Sympy, but if I'm going to closed-software software why would I pick this over MMA?
Re:Symbolica Computer Algebra System by SPACECADET3D on Thursday May 09, 2024 @03:39AM (#40306130)
It depends on what you want to do. It should be much faster than Sympy and it is often much faster than Mathematica, for example if you do pattern matching or are manipulating rational polynomials.

The idea of Symbolica is that you can use it as a library inside your existing projects, which is harder to do with MM since it is its own ecosystem.

Moreover, for personal projects Symbolica is free.

Re:Symbolica Computer Algebra System by jjtheblunt on Friday May 10, 2024 @01:16PM (#40321426)
Can Symbolica compute Gröbner bases over user specified coefficient rings? I don't see, in the docs, how one would specify such.
Re:Symbolica Computer Algebra System by HiggsBozo1337 on Thursday May 09, 2024 @10:25AM (#40308552)
Despite Symbolica being licensed, its source code is still available which clearly shows the author's intent. It may be important in various contexts, e.g. security or satisfying certain grant requirements in academia, or whenever custom minor modifications are necessary.
Re:Symbolica Computer Algebra System by nullhole on Thursday May 09, 2024 @11:58AM (#40309530)
What intent do you infer from the fact that it's source-available instead of being FOSS?
Re:Symbolica Computer Algebra System by kragen on Thursday May 09, 2024 @01:02PM (#40310292)
cynically, one possibility is the intent to be able to sue open-source cas authors and distributors who had access to it and then wrote substantially similar code. charitably, it's intended to allow users to resolve whatever problems they have with the system, by debugging and, if necessary, patching it
Re:Symbolica Computer Algebra System by HiggsBozo1337 on Friday May 10, 2024 @11:18AM (#40320053)
Re:Symbolica Computer Algebra System by abdullahkhalids on Thursday May 09, 2024 @12:59PM (#40310251)
The most obvious comparison is in syntax. Easier syntax means less user time spent. In Symbolica, an example from the documentation

    from symbolica import Expression
    x = Expression.var('x')
    f = Expression.fun('f')
    e = x + f(x) + 5
    e = e.replace_all(x, 6)
    print(e)
In Mathematica, the same thing is

    e = x + f[x] + 5
    e /. x -> 6

What I find striking is that, we know that Python is the most popular language because you don't have to declare your variables or your function headers, and can just start writing the logic of your computation. Then, people keep inventing these mathematics programs in Python, that need you to declare your variables before using them.
Re:Symbolica Computer Algebra System by forgotpwd16 on Thursday May 09, 2024 @02:08PM (#40311065)
Should note the `/.` is syntactic sugar (or special syntax) for `ReplaceAll[]` function. And basically anything can be written as M-expressions. For any expression this form can be retrieved with `FullForm[expr]` (may have to use `Hold[expr]`). So for your example with no special syntax:

    Set[e,Plus[5,x,f[x]]]
    ReplaceAll[e,Rule[x,6]]
Re:Symbolica Computer Algebra System by SPACECADET3D on Thursday May 09, 2024 @02:59PM (#40311717)
You can also just use

    Expression.parse('x+f(x)+5')

Of course, to refer to a specific variable of the CAS in Python, you need to bind it to a Python variable. There is no way around this.

In the end most of the time of the user is not spent on syntax, but on designing algorithms. With Mathematica, you are locked into the Mathematica ecosystem. With Symbolica / sympy and other CASs that are libraries, you can use all the familiar data structures of the language you are coding in.