Symbolica 2.0: Programmable Symbols for Python and Rust (symbolica.io)

142 points by mmastrac 2 days ago

15 comments:

by mkl 17 hours ago

Past discussion (2 years ago, 119 comments): https://news.ycombinator.com/item?id=40297423

This software does symbolic maths, and it's commercially licensed. The site still seems to be lacking comparisons to other computer algebra systems.

The project is unrelated to this other Symbolica that does symbolic code execution, despite the similar sounding brief descriptions: https://news.ycombinator.com/item?id=28443587

by lcnbr 16 hours ago

There is at least one benchmark on the main page https://gist.github.com/benruijl/3c53b1b0aea88b978ae609e7369.... And although it would be nice if it was open source, it is still a much nicer setup than Mathematica, as it is source available, (+ some parts are truely open source), is much faster, can be used in rust or python (so no obscure bundled language to learn), and the license lets you use one core for free (always).

by adius 15 hours ago

As an alternative, I’m working on reimplementing Wolfram Language/ Mathematica in Rust: https://woxi.ad-si.com/ A lot of Wolfram Language code just works already!

by SPACECADET3D 42 minutes ago

I saw this project before, nice work! What is your plan when it comes to the hard core algebra parts like multivariate polynomial factorization and cylindrical algebraic decomposition? These features require quite some complex mathematical code and it is tricky to get it correct, and to get it working fast. Do you want to use other libraries for this or do you want to implement this all yourself?

If you want to use Symbolica for some of these features, feel free to reach out!

by lcnbr 15 hours ago

How does it compare performance-wise?

by adius 15 hours ago

For short scripts, it’s often faster because there’s less initialization overhead. In general, though, it largely depends on whether the functions you’re using already have optimized implementations in Woxi. That’s what I’m currently working on, so I’d appreciate any feedback on what doesn’t work for you yet!

by timschmidt 7 hours ago

I've been doing some symbolica-like things recently in the https://github.com/timschmidt/hyperreal ecosystem. Not a full CAS, just enough symbolic math to maintain precision through the calculations.

Benchmarks against Symbolica and numerica here: https://github.com/timschmidt/hyperlattice/blob/main/benchma...

by SPACECADET3D an hour ago

Nice, I will check this out in more detail later. I had a quick look at the benchmarks and it looks like you compare f64 hyperreal with numericas 128 bit implementation, which will fall back to using arb-prec GMP. There is also F64(simply wrapping around f64), and now DoubleFloat with 106 bits precision, which should be much faster. There is also the ErrorPropagatingFloat wrapper that may be of interest.

For simple numerical operations, using an entire Symbolica Atom will introduce a large amount of overhead. It should only be used if the expression contains symbols as well. But perhaps I misunderstood the point of the benchmark?

by lcnbr 15 hours ago

I’ve been a rust user of symbolica since 0.1 and it is insane how much nicer it is to use now.

Builder patterns for constructing replacement rules (and now evaluators!), macros for namespacing symbols, and now the call trait to fill in for callables in rust.

Not to mention the broad implementation of arithmetic on Atoms (the expression type of symbolica) with other std types and with symbols.

by aboardRat4 12 hours ago

Why not just Maxima, Reduce, or Cadabra2?

by SPACECADET3D 9 hours ago

Author of Symbolica here! If these packages work well for you, then just use them :) I don't have a lot of experience with using these tools, but the last time I tried the user experience isn't so great, because of lack of LSP support (no typing, autocomplete etc). It could have improved in the mean time. I believe the tools are also more oriented to polynomial algebra and no so much for manipulating general expressions.

by breezybottom 10 hours ago

Seems like a worthy successor to Sympy, although the license system might prevent it from reaching the same level of adoption.

by mkl 8 hours ago

No, being commercial prevents that. SymEngine is much more like that, and shares developers with SymPy: https://github.com/symengine/symengine, https://symengine.org/.

by echoangle 2 hours ago

As someone who has not used Sympy: Why does it need a successor?

by breezybottom 20 minutes ago

Development is pretty much dead other than some bug fixes. It's been long overdue for a major rewrite.

Data from: Hacker News, provided by Hacker News (unofficial) API