mentat-collective / emmy

The Emmy Computer Algebra System.
https://emmy.mentat.org
GNU General Public License v3.0
366 stars 18 forks source link

Modularize sicmutils? #52

Open sritchie opened 3 years ago

sritchie commented 3 years ago

@littleredcomputer , curious for your thoughts here.

As I work through the cljs port sicmutils/sicmutils#40 , clear layers are emerging:

For some reason it's much more natural in other build systems like SBT to offer modules: https://github.com/twitter/algebird so maybe this is not a good idea here... but it does feel like it might be a nice move to explicitly break the library into these modules, so that someone could depend on JUST the numerical stuff, or JUST the automatic differentiation, without pulling in the rest of the dependencies for the book.

If we start adding better tools for visualization into the library, like a Quil dependency, I can see this becoming even more true.

EDIT: Here's an example, from the Clojurians slack, of how this might work: https://github.com/juxt/crux/blob/master/project.clj

littleredcomputer commented 3 years ago

This sounds promising and I would love to move to a situation where things were less entangled. I don't know what the best practices are in CLJS but I hear where you're coming from. I am working to clear some decks to dig into this. It may mean I have to retire again :)

best!

c

On Sat, Aug 8, 2020 at 5:25 AM Sam Ritchie notifications@github.com wrote:

@littleredcomputer https://github.com/littleredcomputer , curious for your thoughts here.

As I work through the cljs port sicmutils/sicmutils#40 https://github.com/littleredcomputer/sicmutils/issues/40 , clear layers are emerging:

  • the generic arithmetic system built on types available in the OS, and the generics themselves
  • extensions to the arithmetic system, like Complex and friends, that rely on dependencies.
  • compound types like Matrix, Series, etc
  • the analyzer and simplifier
  • calculus modules
  • book examples

For some reason it's much more natural in other build systems like SBT to offer modules: https://github.com/twitter/algebird so maybe this is not a good idea here... but it does feel like it might be a nice move to explicitly break the library into these modules, so that someone could depend on JUST the numerical stuff, or JUST the automatic differentiation, without pulling in the rest of the dependencies for the book.

If we start adding better tools for visualization into the library, like a Quil dependency, I can see this becoming even more true.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/littleredcomputer/sicmutils/issues/52, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB3Y7PQI4ZOXV7XFG4RZFTR7U74BANCNFSM4PYUKMBA .