grzegorzmazur / yacas

Computer calculations made easy
http://www.yacas.org
GNU Lesser General Public License v2.1
126 stars 24 forks source link

What would you have done differently? #329

Open JeffreySarnoff opened 3 years ago

JeffreySarnoff commented 3 years ago

Were you starting the yacas project tomorrow, with the benefit of all you have found out from having actually done the work, how would the project differ? What design modifications would you undertake? What approaches would be different?

We are discussing Julia's next decisions with respect to our development of symbolic algebra and how best to direct and when to plan to undertake which aspects of: our symbolic mathematics structure -- your voices would be welcome in the discussion.

<you can answer here, if you prefer>

jtrakk commented 3 years ago

In addition to "what would you have done differently" it's probably also worth knowing what you're glad about doing the way you did -- in other words, what you wouldn't do differently.

grzegorzmazur commented 3 years ago

Hi,

Let me start from a simple explanation - I've joined the project when it was already very advanced, and it wasn't me who actually did majority of work. Nevertheless, having done some work on yacas, and having used yacas in my other projects, I came to some conclusions.

First of all, the language is quite fragile, and could use redesign. There are a couple of issues, but I would consider the scope of symbols to be the worst offender, especially when macros are involved. Also, the pattern matching machinery is not flexible enough.

Another big issue stems from the fact that in the beginning yacas grown very quickly. Thanks to this there is a lot of interesting functionality. But it came at a significant cost - yacas badly lacks good implementation of core mathematical concepts. As a result the more specialized functionality either has some workarounds for the missing bits, or is not general enough. By the core mathematical concepts I mean things like sets, assumptions and basic algebraic structures.

To conclude - if I were starting yet another computer algebra system now, I'd put much more effort into designing the language (including better pattern matching) and into providing reasonable set of core mathematical concepts before implementing the applicative functionality. And again, with the applicative functionality I'd go slower, making sure to provide at least the right interface before building anything on top.

This is just from the top off my head. I hope that you'll find this useful. Let me know if you want to know any more details.

Cheers, Grzesiek

grzegorzmazur commented 3 years ago

@jtrakk I like the idea of a small, self-contained, flexible CAS. Also, I like the fact that the relatively small core system allowed to implement a lot of nice functionality. In general I just like it a lot :)

JeffreySarnoff commented 3 years ago

@grzegorzmazur thank you -- I have reposted your notes in Julia's [discussion forum].

Please explain what the scope[s] of symbols should be, ideally. What pattern matching aptitude and abilities would have made the work considerably easier?

grzegorzmazur commented 3 years ago

I'll try to elaborate on weekend - these are not so straightforward issues, and I need some more time to describe them.

JeffreySarnoff commented 3 years ago

There has been a good deal of warmth and receptivity to your perspective. That you choose to take time to better respond, is so helpful. Thank you from Julia.

JeffreySarnoff commented 3 years ago

Do you have any thoughts on whether or not it is useful/important/unhelpful to seek common abstractions or work from unified representational "templates" in representing Complex numbers and representing Dual numbers, Quaternions?