Hi Gabriel/bl0ckedusersoft, Your step-by-step derivative calculator looks neat and hopefully the experience will help you. I'm curious, why isn't the source code for the step-by-step feature released?
>From what I understand the approach you took on your project seems reasonable (safe to say, given that it worked), and I'm envious of your ability to describe transformations as concisely as you do in your DSL. I'm not certain that this same approach would work for SymPy though as there is a lot of pre-existing code to work around. This code is valuable (many thousands of mathematician-hours) but also enforces some pretty serious constraints on what we can and can not do to SymPy. As you suggest I encourage you to look around the SymPy source code, as you do this you might want to think about the following constraints: 1. We'd like step-by-step to work on lots of code - SymPy is big, far too big for you change everything. 2. We can't rewrite all of this code, nor can we expect other developers to implement step-by-step-style methods in the future. 3. We can't significantly slow down SymPy or add anything to the expression trees. Step-by-step is not a big enough feature to cause a major redesign. So you're asked to move mountains (do a huge task) while not making a sound (not changing the code at all.) We don't need someone to re-implement derivative code, we do need someone who can think about SymPy as a whole, learn how it manipulates expressions, and then inject a small amount of control code in the right places in order to optionally capture and record these manipulations as a side effect. This is a deceptively hard project. However I'm encouraged by your particular experience building rule based systems to manipulate expression trees. Best, -Matthew On Fri, Feb 28, 2014 at 4:28 PM, <[email protected]> wrote: > Hi, > > I'm an undergraduate computer science student. I'm interested in your GSOC > project idea > to add "Step-by-Step" functionality to SymPy, and I have some good past > experience relating > to implementing that exact specific feature in symbolic mathematics > software. > > Last summer I spent some time reading textbooks on symbol manipulation, > Lisp, and AI, > and wrote a program called "Step-by-Step Derivative Calculator". > Here's a screenshot: > https://sites.google.com/site/bl0ckeduserssoftware/easyderivsteps/screenshots/v12gui-linux.png > And the download is at: > https://sites.google.com/site/bl0ckeduserssoftware/easyderivsteps/ > > (Some of the source code for the program is currently available, but not > the > source code for the "step-by-step" feature). > > I would be quite interested to spend this summer adding similar > functionality to SymPy, > and will probably apply as a GSOC student in March, using my real name (my > first name is Gabriel > and my last name starts with a C) rather than this pseudonym. > > The approach I used and which I may consider attempting to use, perhaps > somewhat > modified, in SymPy can be summarized as follows: > > (1) some special code marks nodes in the expression tree that get modified > between > two operations which are marked as user-presented "steps", and specially > decorates > these so they are highlighted with a special colour in the user GUI > display; > > (2) a table of description strings is built which associates classes of > symbolic operations > to parameterized description strings which aim to explain to the user what > the operation did, > and include, through parameterization, the specific expression or variable > that was modified. > In the case of my pet project, this was done using a custom little DSL for > which I wrote a > built-in compiler. The source code for the case of the quotient rule (from > calculus) was: > > D(?x, f / g) = (g * D(x, f) - f * D(x, g) ) / (g * g) > ; Apply quotient rule on $ \\frac{d}{d{?x}} \\left[ \\frac{&f}{&g} > \\right] $ > > Note that this contains LaTeX for the final rendering, mixed with a > description string, > mixed with a symbolic rule for how the quotient rule works. > > I hope to soon spend some time familiarizing myself with the SymPy source > code. > > Please tell me if you think my idea is interesting and would be willing to > take > me as a GSOC student. > > Best, > > Bl0ckeduser > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sympy. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/32aee09f-a6a4-494e-9e09-5242f74d23a5%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAJ8oX-FFEDu_UX6qeLPqa%2B%2BVsQtOUwErD_pR3CFE0JSRBfY3SQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
