Vinzent Steinberg | 1 May 2011 01:10

Re: SymPy Bot

On Apr 30, 11:59 pm, Ondrej Certik <ond...@...> wrote:
> Well, that would not be the biggest problem. The biggest problem is
> that gist doesn't have API for uploading yet, see here:
>
> http://develop.github.com/p/gist.html

This is the oldest API (v1). The newest one has full gist support:

http://developer.github.com/v3/gists/

Vinzent

--

-- 
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy@...
To unsubscribe from this group, send email to sympy+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.

Vinzent Steinberg | 1 May 2011 01:20

Re: Assumptions

On Apr 30, 7:36 pm, Haz <christian.mu...@...> wrote:
> >I think the only problem could be that ask() is much slower for
> >trivial queries, needs to be verified. This should be not too hard to
> >fix though.
>
>   I don't think this is the case. Trivial queries (those that already have
> obvious implications) are compiled into quick reference dictionaries. In
> particular:
> -https://github.com/sympy/sympy/blob/master/sympy/assumptions/ask.py#L114

Thanks for clarifying. I made a quick unrepresentative benchmark:

In [1]: x = Symbol('x', positive=True)

In [2]: global_assumptions.add(Assume(x, Q.positive))

In [3]: %timeit x.is_positive
1000000 loops, best of 3: 418 ns per loop

In [4]: %timeit ask(x, Q.positive)
10000 loops, best of 3: 97.3 us per loop

I think this is fast enough. (Even if it is about 200 times slower.)

Vinzent

--

-- 
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy@...
To unsubscribe from this group, send email to sympy+unsubscribe <at> googlegroups.com.
(Continue reading)

Aaron S. Meurer | 1 May 2011 03:38
Picon
Gravatar

Re: Re: Assumptions

By the way, the discussion at this issue is relevant: http://code.google.com/p/sympy/issues/detail?id=1884

Aaron Meurer

On Apr 30, 2011, at 5:20 PM, Vinzent Steinberg wrote:

> On Apr 30, 7:36 pm, Haz <christian.mu...@...> wrote:
>>> I think the only problem could be that ask() is much slower for
>>> trivial queries, needs to be verified. This should be not too hard to
>>> fix though.
>> 
>>   I don't think this is the case. Trivial queries (those that already have
>> obvious implications) are compiled into quick reference dictionaries. In
>> particular:
>> -https://github.com/sympy/sympy/blob/master/sympy/assumptions/ask.py#L114
> 
> Thanks for clarifying. I made a quick unrepresentative benchmark:
> 
> In [1]: x = Symbol('x', positive=True)
> 
> In [2]: global_assumptions.add(Assume(x, Q.positive))
> 
> In [3]: %timeit x.is_positive
> 1000000 loops, best of 3: 418 ns per loop
> 
> In [4]: %timeit ask(x, Q.positive)
> 10000 loops, best of 3: 97.3 us per loop
> 
> 
> I think this is fast enough. (Even if it is about 200 times slower.)
(Continue reading)

Ondrej Certik | 1 May 2011 06:52
Picon
Gravatar

Re: Re: TableForm

On Sat, Apr 30, 2011 at 3:53 PM, Ondrej Certik <ondrej@...> wrote:
> On Sat, Apr 30, 2011 at 3:38 PM, Aaron S. Meurer <asmeurer@...> wrote:
>> On Apr 30, 2011, at 4:22 PM, Ondrej Certik wrote:
>>
>>> Hi,
>>>
>>> thanks Ronan, Vinzent, Aaron, Mateusz and Brian for participating in
>>> the discussion. First of all, I would like to assure you that there
>>> are no hard feelings on my side, and hopefully we can learn something
>>> form it, and resolve things. I would like to write my very clear
>>> opinion on some of the issues raised in this thread:
>>>
>>> 1) This feature is a core feature, that SymPy should have
>>>
>>> 2) It is ok to give -1 for reviews, as long as you give a plan for the
>>> author of the patch, how he can fix it, so that it is acceptable. It
>>> is also ok to give -1 without saying anything else (this case), but
>>> then this stops progress, because it is not clear what I can do to get
>>> this in. As such, when you do such "-1" as a reviewer, you should
>>> think twice what this is going to cause, and initiate a discussion
>>> about this.
>>>
>>> 3) Vinzent asked, why I was upset. So the reason being, that something
>>> that I personally strongly believe belongs into sympy was given -1
>>> without any constructive technical criticism. As far as I know, we
>>> have never pushed in a patch, that was clearly given -1 as this one.
>>> So as such, I felt, that this means, this can't go in. And as such I
>>> was upset, because suddenly I will not be able to achieve the goal to
>>> be able to do things that people do with Mathematica with SymPy, not
>>> because the code was not there, but because some of sympy developers
(Continue reading)

Aaron S. Meurer | 1 May 2011 06:59
Picon
Gravatar

Re: Re: TableForm


On Apr 30, 2011, at 10:52 PM, Ondrej Certik wrote:

> On Sat, Apr 30, 2011 at 3:53 PM, Ondrej Certik <ondrej@...> wrote:
>> On Sat, Apr 30, 2011 at 3:38 PM, Aaron S. Meurer <asmeurer@...> wrote:
>>> On Apr 30, 2011, at 4:22 PM, Ondrej Certik wrote:
>>> 
>>>> Hi,
>>>> 
>>>> thanks Ronan, Vinzent, Aaron, Mateusz and Brian for participating in
>>>> the discussion. First of all, I would like to assure you that there
>>>> are no hard feelings on my side, and hopefully we can learn something
>>>> form it, and resolve things. I would like to write my very clear
>>>> opinion on some of the issues raised in this thread:
>>>> 
>>>> 1) This feature is a core feature, that SymPy should have
>>>> 
>>>> 2) It is ok to give -1 for reviews, as long as you give a plan for the
>>>> author of the patch, how he can fix it, so that it is acceptable. It
>>>> is also ok to give -1 without saying anything else (this case), but
>>>> then this stops progress, because it is not clear what I can do to get
>>>> this in. As such, when you do such "-1" as a reviewer, you should
>>>> think twice what this is going to cause, and initiate a discussion
>>>> about this.
>>>> 
>>>> 3) Vinzent asked, why I was upset. So the reason being, that something
>>>> that I personally strongly believe belongs into sympy was given -1
>>>> without any constructive technical criticism. As far as I know, we
>>>> have never pushed in a patch, that was clearly given -1 as this one.
>>>> So as such, I felt, that this means, this can't go in. And as such I
(Continue reading)

Ondrej Certik | 1 May 2011 07:13
Picon
Gravatar

Re: Re: SymPy Bot

On Sat, Apr 30, 2011 at 4:10 PM, Vinzent Steinberg
<vinzent.steinberg@...> wrote:
> On Apr 30, 11:59 pm, Ondrej Certik <ond...@...> wrote:
>> Well, that would not be the biggest problem. The biggest problem is
>> that gist doesn't have API for uploading yet, see here:
>>
>> http://develop.github.com/p/gist.html
>
> This is the oldest API (v1). The newest one has full gist support:
>
> http://developer.github.com/v3/gists/

Wow, thanks for this! I was not aware of the v3 API at all. Well in
that case, gist is a possibility. Let's see if pastehtml goes down
again, and if it does, we can switch to gist (maybe there is even some
way to serve html, but maybe not).

Ondrej

--

-- 
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy@...
To unsubscribe from this group, send email to sympy+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.

Ondrej Certik | 1 May 2011 07:18
Picon
Gravatar

Re: Re: TableForm

On Sat, Apr 30, 2011 at 9:59 PM, Aaron S. Meurer <asmeurer@...> wrote:
>
> On Apr 30, 2011, at 10:52 PM, Ondrej Certik wrote:
>
>> On Sat, Apr 30, 2011 at 3:53 PM, Ondrej Certik <ondrej@...> wrote:
>>> On Sat, Apr 30, 2011 at 3:38 PM, Aaron S. Meurer
<asmeurer@...> wrote:
>>>> On Apr 30, 2011, at 4:22 PM, Ondrej Certik wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> thanks Ronan, Vinzent, Aaron, Mateusz and Brian for participating in
>>>>> the discussion. First of all, I would like to assure you that there
>>>>> are no hard feelings on my side, and hopefully we can learn something
>>>>> form it, and resolve things. I would like to write my very clear
>>>>> opinion on some of the issues raised in this thread:
>>>>>
>>>>> 1) This feature is a core feature, that SymPy should have
>>>>>
>>>>> 2) It is ok to give -1 for reviews, as long as you give a plan for the
>>>>> author of the patch, how he can fix it, so that it is acceptable. It
>>>>> is also ok to give -1 without saying anything else (this case), but
>>>>> then this stops progress, because it is not clear what I can do to get
>>>>> this in. As such, when you do such "-1" as a reviewer, you should
>>>>> think twice what this is going to cause, and initiate a discussion
>>>>> about this.
>>>>>
>>>>> 3) Vinzent asked, why I was upset. So the reason being, that something
>>>>> that I personally strongly believe belongs into sympy was given -1
>>>>> without any constructive technical criticism. As far as I know, we
(Continue reading)

Ondrej Certik | 1 May 2011 07:24
Picon
Gravatar

Re: The logic module

Hi Saptarshi,

On Sat, Apr 30, 2011 at 2:05 PM, Saptarshi Mandal
<sapta.iitkgp@...> wrote:
> is a bit empty.
> I implemented an IfThenElse connective and negational normal form.
> https://github.com/sympy/sympy/pull/277

I tested the sympy-bot on your issue --- and it found some test
failures. See my comments in there.

> The next step is BDDs and BDTs.
> Unless I get an enthusiastic response for this, i'll start work on my
> soc project.

Excellent, sounds good!

Ondrej

--

-- 
You received this message because you are subscribed to the Google Groups "sympy" group.
To post to this group, send email to sympy@...
To unsubscribe from this group, send email to sympy+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.

Ondrej Certik | 1 May 2011 08:47
Picon
Gravatar

Re: Re: Assumptions

On Sat, Apr 30, 2011 at 10:36 AM, Haz <christian.muise@...> wrote:
> So a few things to respond to...
> Tom:
>>Can you describe what went wrong with these branches? In particular,
>>why can the following naive strategy not work:
>>
>>1. Make the new system at least as good as the old one. That is
>>whenever I can write foo.is_bar I can write ask(foo, Q.bar) and I will
>>get at least as good an answer. In particular Symbol('x',
>>positive=True) should register automatically in the global assumptions
>>that x > 0 (if I understand correctly how the new system works...).
>>2. Replace all queries foo.is_bar by ask(foo, Q.bar).
>>3. Remove all implementations of the is_bar properties.
>>4. Remove all remaining remnants of the old system.
>   This is what was largely tried with a branch last summer:
> - https://github.com/haz/sympy/tree/disconnect-assumptions-2
>   There was push-back from the community since removing the Symbol('x',
> positive=True) syntax was largely frowned upon.

I am still very much convinced, that this disconnect-assumptions-2 is
the simplest and easiest way to get rid of the old assumptions, so
that we can start speeding up the core, and start using some other
system for them.

I would be interested in the community vote on this idea. I vote +1. I
am aware that Ronan voted -1 last year. What do others think?

Ondrej

--

-- 
(Continue reading)

Tom Bachmann | 1 May 2011 10:42

Re: Assumptions

FWIW, I think vinzent's approach (local assumptions automatically
injected into the context of the symbol creation) is the best way to
go.

On 1 Mai, 07:47, Ondrej Certik <ond...@...> wrote:
> On Sat, Apr 30, 2011 at 10:36 AM, Haz <christian.mu...@...> wrote:
> > So a few things to respond to...
> > Tom:
> >>Can you describe what went wrong with these branches? In particular,
> >>why can the following naive strategy not work:
>
> >>1. Make the new system at least as good as the old one. That is
> >>whenever I can write foo.is_bar I can write ask(foo, Q.bar) and I will
> >>get at least as good an answer. In particular Symbol('x',
> >>positive=True) should register automatically in the global assumptions
> >>that x > 0 (if I understand correctly how the new system works...).
> >>2. Replace all queries foo.is_bar by ask(foo, Q.bar).
> >>3. Remove all implementations of the is_bar properties.
> >>4. Remove all remaining remnants of the old system.
> >   This is what was largely tried with a branch last summer:
> > - https://github.com/haz/sympy/tree/disconnect-assumptions-2
> >   There was push-back from the community since removing the Symbol('x',
> > positive=True) syntax was largely frowned upon.
>
> I am still very much convinced, that this disconnect-assumptions-2 is
> the simplest and easiest way to get rid of the old assumptions, so
> that we can start speeding up the core, and start using some other
> system for them.
>
> I would be interested in the community vote on this idea. I vote +1. I
(Continue reading)


Gmane