Symbolics.jl "A Modern Computer Algebra System for a Modern Language"

70 views
Skip to first unread message

Qian Yun

unread,
Mar 7, 2021, 12:20:00 AM3/7/21
to fricas...@googlegroups.com
I saw this post [1] reaches #1 at hackernews [2], so I take a deeper look.

Disclaimer: I didn't run the code, but I read all the docs, which
is very short, and grep through some of the source code.

First, I'm very glad that there are multiple mentions of FriCAS
in the comments. That shows there are more people know about FriCAS.
Sadly, there are not much deeper discussion about FriCAS, and seems
there is also very small interest of FriCAS from Symbolics.jl
developers.

Second, about the source code. I looked into the repos of Symbolics.jl
and SymbolicUtils.jl, which has 2500 and 3000 lines of code, and
less that 800 commits combined. I'm surprised by their bold PR claims.
(Maybe we should publicize more, but not like this.)
This is their own list of missing features (missing polynomials and
calculus!):
https://github.com/JuliaSymbolics/Symbolics.jl/issues/59

Third, I looked into the type system. There are very few types.
It's like a thin layer of types glued over sympy/maxima.
It uses rules (pattern matching) heavily, and plans to use RUBI
to solve integrals. Which I consider is similar to mathematica
and a step back from FriCAS's algorithmic/strong-type approach.

Finally, a thing has puzzled me for a very long time. It seems
that there is not a linked list type/data structure. It's unthinkable
that a language doesn't have this type, its library doesn't use
this type. Maybe Julia is hyper focused on numeric computation
and uses vector extensively, but to build a CAS without linked
list is impossible.

[1]
https://discourse.julialang.org/t/ann-symbolics-jl-a-modern-computer-algebra-system-for-a-modern-language/56251

[2] https://news.ycombinator.com/item?id=26356854

Dima Pasechnik

unread,
Mar 7, 2021, 2:28:59 AM3/7/21
to fricas...@googlegroups.com
On Sun, Mar 7, 2021 at 5:20 AM Qian Yun <oldk...@gmail.com> wrote:
>
> I saw this post [1] reaches #1 at hackernews [2], so I take a deeper look.
>
> Disclaimer: I didn't run the code, but I read all the docs, which
> is very short, and grep through some of the source code.

A much more serious Julia-based CAS effort is https://oscar.computeralgebra.de/
- although IIRC they don't do symbolic integration, and not even plan,
at least in the immediate future.
It's algbera/group theory/number theory, and that's what keeps
nowadays several developers
of GAP, Singular and Flint busy.
> --
> You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/126e5c1b-400c-ea1b-7750-36406d7ca48e%40gmail.com.

Kostas Oikonomou

unread,
Mar 8, 2021, 1:18:16 PM3/8/21
to fricas...@googlegroups.com
On Sun, 2021-03-07 at 13:19 +0800, Qian Yun wrote:

Finally, a thing has puzzled me for a very long time.  It seems
that there is not a linked list type/data structure.  It's unthinkable
that a language doesn't have this type, its library doesn't use
this type.  Maybe Julia is hyper focused on numeric computation
and uses vector extensively, but to build a CAS without linked
list is impossible.


Yes, this is very puzzling when one encounters Julia for the first time!
The answer is that what almost every other language calls "list" in Julia is called "array".
Julia's arrays can be treated/used either as indexed objects, or as lists, like Python lists.

Kostas

Neven Sajko

unread,
Mar 8, 2021, 3:40:46 PM3/8/21
to fricas...@googlegroups.com
Regarding arrays and lists in Julia: the Array type is like C arrays in that it is backed by contiguous storage in memory, and like std::vector from C++ in that it can be dynamically resized.

Linked lists, on the other hand, are implemented in some third party modules.

BTW., Julia is a quite interesting language from some perspectives: it's translated into machine code by LLVM, making tight loops very fast; but on the other hand Julia also takes some aspects from Lisp, a Julia program can transform it's own syntax tree, see here: https://docs.julialang.org/en/v1/manual/metaprogramming/

Also, Julia is unlike, e.g., Python in that Julia codebases are largely written in pure Julia. I think this speaks in its favor.

Regarding Symbolics.jl, it seems like something that will probably just contribute to fragmentation of effort, but still, Julia seems like it could be a nice language to have an excellent CAS in.

Regards,
Neven

Dima Pasechnik

unread,
Mar 8, 2021, 3:43:59 PM3/8/21
to fricas...@googlegroups.com
there is a largish project, Oscar, in development for the past 6
year, which is basically an "algebraic" CAS in
Julia, with interfaces to GAP, SIngular, Flint, etc
https://oscar.computeralgebra.de/

>
> Regards,
> Neven
>
> --
> You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/CAL%2BbK4P2quDQj1X3rCOARnvXQWK1f8h6AjpB_h7%2BGEMGPEqSkQ%40mail.gmail.com.

Neven Sajko

unread,
Mar 8, 2021, 3:45:31 PM3/8/21
to fricas...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages