Not just debugging. Most of the examples given here print the steps to
stdout, and maybe this is why the idea is perceived badly as one of
little use. It can just as well return a list or a tree of the steps,
and given how many of our code behaves in a
rewrite-rules/small-functions style such functionality can be very
useful.

On 24 February 2013 16:08, Matthew Rocklin <[email protected]> wrote:
> This can be useful, even in a library context, for debugging and
> documentation writing.
>
>
> On Sun, Feb 24, 2013 at 7:07 AM, Matthew Rocklin <[email protected]> wrote:
>>
>> I was recently impressed by the Fu trigsimp algorithm that @smichr and
>> @pernici were working on.  It was pretty easy to implement this idea there.
>> They have a lot of little functions named TR0, TR1, TR2, etc... for
>> different trigonometric transformations.  With just a small change to the
>> code we were able to get fu to print out what it was doing as it was doing
>> it.  A small example is below.  Bigger examples were pretty exciting.
>>
>> In [1]: fu(sin(50)**2 + cos(50)**2 + sin(pi/6))
>> Rule: TR5
>> In:   sin(50)**2
>> Out:  -cos(50)**2 + 1
>>
>> Rule: TR5
>> In:   sin(50)**2 + 1/2 + cos(50)**2
>> Out:  3/2
>>
>> Out[1]: 3/2
>>
>> Not all of SymPy is written this way (lots of little functions) but a
>> substantial refactor of our giant functions into a few smaller ones might
>> allow this.
>>
>>
>> On Sat, Feb 23, 2013 at 5:39 PM, Aaron Meurer <[email protected]> wrote:
>>>
>>> On Sat, Feb 23, 2013 at 5:45 PM, Ronan Lamy <[email protected]> wrote:
>>> > Le 23/02/2013 23:26, Stefan Krastanov a écrit :
>>> >
>>> >> Hi,
>>> >>
>>> >> This project was talked about a few times recently, so you can check
>>> >> the archive for details. Basically, one of the suggested approaches is
>>> >> to use the "rewrite rules and strategies" module. Feel free to suggest
>>> >> other interesting approaches.
>>> >
>>> >
>>> > I should probably have said it earlier but I think that this is a
>>> > rather bad
>>> > project idea. As written, it has very little chance of turning into an
>>> > acceptable GSoC project.
>>> >
>>> > A major problem is that it's an idea for an application, but sympy is a
>>> > library: creating applications is not a goal of the project, nor is it
>>> > something we know how to do.
>>>
>>> You're right. If you feel it can be salvaged, please change the
>>> wording.  Otherwise, feel free to remove it. I don't anticipate any
>>> high quality applications on this one as it currently stands.
>>>
>>> Aaron Meurer
>>>
>>> >
>>> >
>>> > --
>>> > 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?hl=en.
>>> > 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?hl=en.
>>> 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?hl=en.
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to