Ondrej Certik | 1 Nov 2009 03:58
Picon
Gravatar

Re: [sage-devel] of Google Groups and spam


On Fri, Oct 30, 2009 at 3:09 AM, Minh Nguyen <nguyenminh2@...> wrote:
>
> Hi folks,
>
> Just in case you're wondering why spam mails got through occasionally,
> here are some stories that present the moderator's side:
>
> http://www.webmonkey.com/blog/Google_Groups_Fail%3A_JQuery_Dumps_Google_Over_Spam__Interface_Problems
>
> http://ejohn.org/blog/google-groups-is-dead/

I can only second that --- the admin interface is terrible. Sometimes
the spam goes through even though both me and Mateusz who are
moderators of the sympy list think that we *didn't* let it through.

Once I accidentally clicked always allow instead of spam, so it went
through. Let me know if you know something better than google groups.

Ondrej

smichr | 1 Nov 2009 04:41
Picon
Gravatar

imports


Does anyone know the reason for not including certain objects in a
module's __init__? e.g. "cartes" is not loaded in utilities/
__init__.py so although "sympy.utilities.iterables.cartes" works, a
"from sympy.utilities import *" does not import "cartes".

If the "from foo import *" is frowned upon, then what is the purpose
of declaring things in __init__? Does it just make it easier to get at
things, e.g.

>>> from sympy.utilities import any # rather than
>>> from sympy.utilities.iterables import any

This is perhaps a "tutur" sort of question, but it applies directly to
sympy and I thought I'd ask here first.

/c
Ronan Lamy | 1 Nov 2009 05:22
Picon
Gravatar

Re: removing the old assumption system - help request


Le jeudi 29 octobre 2009 à 18:12 -0700, Ondrej Certik a écrit :
> On Thu, Oct 29, 2009 at 5:49 PM, Aaron S. Meurer <asmeurer@...> wrote:
> > Is this just a matter or replacing .is_real type assumptions with ask
> > (x, Q.Real), or are there bugs that need working out?
> 
> I think it's just this.

No, I think it's more complicated than that and that a significant
amount of nontrivial work is needed. For example, in a_removal (282bb5),
Or(Assume(x, 'a'), Assume(x, 'b')) raises (that's the first failure in
bin/test) because Or sorts its arguments. In master, this works thanks
to the following bit of nonsense: 
(Assume(x, 'b') - Assume(x, 'a')).is_negative == False

I don't know what is the best way to proceed but I think that attempting
to solve the problem by directly removing the old assumptions will fail.
IMHO, the only way is to refactor the core and the logic modules first.

Ronan

Ondrej Certik | 1 Nov 2009 05:50
Picon
Gravatar

Re: removing the old assumption system - help request


On Sat, Oct 31, 2009 at 9:22 PM, Ronan Lamy <ronan.lamy@...> wrote:
>
> Le jeudi 29 octobre 2009 à 18:12 -0700, Ondrej Certik a écrit :
>> On Thu, Oct 29, 2009 at 5:49 PM, Aaron S. Meurer <asmeurer@...> wrote:
>> > Is this just a matter or replacing .is_real type assumptions with ask
>> > (x, Q.Real), or are there bugs that need working out?
>>
>> I think it's just this.
>
> No, I think it's more complicated than that and that a significant
> amount of nontrivial work is needed. For example, in a_removal (282bb5),
> Or(Assume(x, 'a'), Assume(x, 'b')) raises (that's the first failure in
> bin/test) because Or sorts its arguments. In master, this works thanks
> to the following bit of nonsense:
> (Assume(x, 'b') - Assume(x, 'a')).is_negative == False
>
> I don't know what is the best way to proceed but I think that attempting
> to solve the problem by directly removing the old assumptions will fail.
> IMHO, the only way is to refactor the core and the logic modules first.

I think the only way to proceed is to take Fabian's work, and make it
usable, so that all tests pass. That's the very first step, unless we
have this starting point, we can't get nowhere. After that, we should
just remove stuff that can be removed and replace it with the new
assumptions system. If something has to be refactored, then it should
be refactored on the way.

Ondrej

(Continue reading)

Freddie Witherden | 1 Nov 2009 12:12
Gravatar

Re: [sage-devel] of Google Groups and spam


On Sunday 01 November 2009 02:58:21 Ondrej Certik wrote:
> On Fri, Oct 30, 2009 at 3:09 AM, Minh Nguyen <nguyenminh2@...> wrote:
> > Hi folks,
> >
> > Just in case you're wondering why spam mails got through occasionally,
> > here are some stories that present the moderator's side:
> >
> > http://www.webmonkey.com/blog/Google_Groups_Fail%3A_JQuery_Dumps_Google_O
> >ver_Spam__Interface_Problems
> >
> > http://ejohn.org/blog/google-groups-is-dead/
> 
> I can only second that --- the admin interface is terrible. Sometimes
> the spam goes through even though both me and Mateusz who are
> moderators of the sympy list think that we *didn't* let it through.

We've also been having trouble with the Mathtex list. Some of the spam makes 
it to moderation while rest gets straight through. I have even read stories of 
spammers faking the addresses of actual subscribers in order to by-pass 
moderation completely.

Google really do need to up their game when it comes to spam filtering.

Regards, Freddie.

Ronan Lamy | 1 Nov 2009 18:16
Picon
Gravatar

Re: removing the old assumption system - help request


Le samedi 31 octobre 2009 à 21:50 -0700, Ondrej Certik a écrit :
> On Sat, Oct 31, 2009 at 9:22 PM, Ronan Lamy <ronan.lamy@...> wrote:
> >
> > Le jeudi 29 octobre 2009 à 18:12 -0700, Ondrej Certik a écrit :
> >> On Thu, Oct 29, 2009 at 5:49 PM, Aaron S. Meurer
<asmeurer@...> wrote:
> >> > Is this just a matter or replacing .is_real type assumptions with ask
> >> > (x, Q.Real), or are there bugs that need working out?
> >>
> >> I think it's just this.
> >
> > No, I think it's more complicated than that and that a significant
> > amount of nontrivial work is needed. For example, in a_removal (282bb5),
> > Or(Assume(x, 'a'), Assume(x, 'b')) raises (that's the first failure in
> > bin/test) because Or sorts its arguments. In master, this works thanks
> > to the following bit of nonsense:
> > (Assume(x, 'b') - Assume(x, 'a')).is_negative == False
> >
> > I don't know what is the best way to proceed but I think that attempting
> > to solve the problem by directly removing the old assumptions will fail.
> > IMHO, the only way is to refactor the core and the logic modules first.
> 
> I think the only way to proceed is to take Fabian's work, and make it
> usable, so that all tests pass. That's the very first step, unless we
> have this starting point, we can't get nowhere. After that, we should
> just remove stuff that can be removed and replace it with the new
> assumptions system. If something has to be refactored, then it should
> be refactored on the way.

(Continue reading)

Ondrej Certik | 1 Nov 2009 18:27
Picon
Gravatar

Re: removing the old assumption system - help request


On Sun, Nov 1, 2009 at 9:16 AM, Ronan Lamy <ronan.lamy@...> wrote:
>
> Le samedi 31 octobre 2009 à 21:50 -0700, Ondrej Certik a écrit :
>> On Sat, Oct 31, 2009 at 9:22 PM, Ronan Lamy <ronan.lamy@...> wrote:
>> >
>> > Le jeudi 29 octobre 2009 à 18:12 -0700, Ondrej Certik a écrit :
>> >> On Thu, Oct 29, 2009 at 5:49 PM, Aaron S. Meurer
<asmeurer@...> wrote:
>> >> > Is this just a matter or replacing .is_real type assumptions with ask
>> >> > (x, Q.Real), or are there bugs that need working out?
>> >>
>> >> I think it's just this.
>> >
>> > No, I think it's more complicated than that and that a significant
>> > amount of nontrivial work is needed. For example, in a_removal (282bb5),
>> > Or(Assume(x, 'a'), Assume(x, 'b')) raises (that's the first failure in
>> > bin/test) because Or sorts its arguments. In master, this works thanks
>> > to the following bit of nonsense:
>> > (Assume(x, 'b') - Assume(x, 'a')).is_negative == False
>> >
>> > I don't know what is the best way to proceed but I think that attempting
>> > to solve the problem by directly removing the old assumptions will fail.
>> > IMHO, the only way is to refactor the core and the logic modules first.
>>
>> I think the only way to proceed is to take Fabian's work, and make it
>> usable, so that all tests pass. That's the very first step, unless we
>> have this starting point, we can't get nowhere. After that, we should
>> just remove stuff that can be removed and replace it with the new
>> assumptions system. If something has to be refactored, then it should
(Continue reading)

smichr | 2 Nov 2009 08:15
Picon
Gravatar

Re: removing the old assumption system - help request


I just tried to fix the first test in core that fails:

(a*b*c+c*b*a+b*a*c)*p-s.Rational(15)*a*b*c should equal Rational(0)

when a and c are generic symbols and b is positive and p is Rational
(5). So I tried...

>>> import sympy as s
>>> from sympy.assumptions import Assume
>>> p=s.Rational(5)
>>> s.var('a c')
(a, c)
>>> b=s.Symbol('b');Assume(b, 'positive')
Assume(b, 'positive', True)
>>> e=(a*b*c+c*b*a+b*a*c)*p-s.Rational(15)*a*b*c
>>> e
0*a**1*b**1*c**1
>>> e.evalf()
0*a**1*b**1*c**1
>>> _ == s.Rational(0)
False

I'm stuck not knowing why this thing isn't going to 0.

/c
Ondrej Certik | 2 Nov 2009 09:01
Picon
Gravatar

Re: removing the old assumption system - help request


On Sun, Nov 1, 2009 at 11:15 PM, smichr <smichr@...> wrote:
>
> I just tried to fix the first test in core that fails:
>
> (a*b*c+c*b*a+b*a*c)*p-s.Rational(15)*a*b*c should equal Rational(0)
>
> when a and c are generic symbols and b is positive and p is Rational
> (5). So I tried...
>
>>>> import sympy as s
>>>> from sympy.assumptions import Assume
>>>> p=s.Rational(5)
>>>> s.var('a c')
> (a, c)
>>>> b=s.Symbol('b');Assume(b, 'positive')
> Assume(b, 'positive', True)
>>>> e=(a*b*c+c*b*a+b*a*c)*p-s.Rational(15)*a*b*c
>>>> e
> 0*a**1*b**1*c**1
>>>> e.evalf()
> 0*a**1*b**1*c**1
>>>> _ == s.Rational(0)
> False
>
> I'm stuck not knowing why this thing isn't going to 0.

It seems like some evaluation bug. Try to debug it how the expression
is constructed. Also, for clarity, I would discourage to use global
assumptions in tests. Just use refine() for simplifying (with taking
(Continue reading)

Vinzent Steinberg | 2 Nov 2009 15:00

Re: removing the old assumption system - help request


On Nov 2, 9:15 am, smichr <smi...@...> wrote:
> I just tried to fix the first test in core that fails:
>
> (a*b*c+c*b*a+b*a*c)*p-s.Rational(15)*a*b*c should equal Rational(0)
>
> when a and c are generic symbols and b is positive and p is Rational
> (5). So I tried...
>
> >>> import sympy as s
> >>> from sympy.assumptions import Assume
> >>> p=s.Rational(5)
> >>> s.var('a c')
> (a, c)
> >>> b=s.Symbol('b');Assume(b, 'positive')

This does not work, you just generate an assumption object. Use rather
global_assumptions.add(Assume(b, Q.positive)).

However you have to call global_assumptions.clear() after each test,
else you'll get a mess (this is what you get currently when just
mapping Symbol(..., **assump) to global_assumptions.add). We should
really implement local assumptions using with statements.

Vinzent

Gmane