sympy: what's wrong with this picture?

M

Mensanator

Notice anything funny about the "random" choices?

import sympy
import time
import random

f = [i for i in sympy.primerange(1000,10000)]

for i in xrange(10):
f1 = random.choice(f)
print f1,
f2 = random.choice(f)
print f2,
C = f1*f2
ff = None
ff = sympy.factorint(C)
print ff

## 7307 7243 [(7243, 1), (7307, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
## 8563 2677 [(2677, 1), (8563, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
## 8563 2677 [(2677, 1), (8563, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
## 8563 2677 [(2677, 1), (8563, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
## 8563 2677 [(2677, 1), (8563, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]

As in, "they're NOT random".

The random number generator is broken by the sympy.factorint()
function.

Random.choice() works ok if the factorint() function commented out.

## 6089 1811 None
## 6449 1759 None
## 9923 4639 None
## 4013 4889 None
## 4349 2029 None
## 6703 8677 None
## 1879 1867 None
## 5153 5279 None
## 2011 4937 None
## 7253 5507 None

This makes sympy worse than worthless, as it fucks up other modules.
 
C

Carl Banks

Notice anything funny about the "random" choices?

import sympy
import time
import random

f = [i for i in sympy.primerange(1000,10000)]

for i in xrange(10):
f1 = random.choice(f)
print f1,
f2 = random.choice(f)
print f2,
C = f1*f2
ff = None
ff = sympy.factorint(C)
print ff

## 7307 7243 [(7243, 1), (7307, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
## 8563 2677 [(2677, 1), (8563, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
## 8563 2677 [(2677, 1), (8563, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
## 8563 2677 [(2677, 1), (8563, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
## 8563 2677 [(2677, 1), (8563, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]

As in, "they're NOT random".

The random number generator is broken by the sympy.factorint()
function.

Random.choice() works ok if the factorint() function commented out.

## 6089 1811 None
## 6449 1759 None
## 9923 4639 None
## 4013 4889 None
## 4349 2029 None
## 6703 8677 None
## 1879 1867 None
## 5153 5279 None
## 2011 4937 None
## 7253 5507 None

This makes sympy worse than worthless, as it f***s up other modules.

Dude, relax.

It's just a bug--probably sympy is messing with the internals of the
random number generator. It would be a simple fix. Instead of
b****ing about it, file a bug report. Or better yet, submit a patch.


Carl Banks
 
M

Mensanator

Notice anything funny about the "random" choices?
import sympy
import time
import random
f = [i for i in sympy.primerange(1000,10000)]
for i in xrange(10):
  f1 = random.choice(f)
  print f1,
  f2 = random.choice(f)
  print f2,
  C = f1*f2
  ff = None
  ff = sympy.factorint(C)
  print ff
##  7307 7243 [(7243, 1), (7307, 1)]
##  4091 6829 [(4091, 1), (6829, 1)]
##  8563 2677 [(2677, 1), (8563, 1)]
##  4091 6829 [(4091, 1), (6829, 1)]
##  8563 2677 [(2677, 1), (8563, 1)]
##  4091 6829 [(4091, 1), (6829, 1)]
##  8563 2677 [(2677, 1), (8563, 1)]
##  4091 6829 [(4091, 1), (6829, 1)]
##  8563 2677 [(2677, 1), (8563, 1)]
##  4091 6829 [(4091, 1), (6829, 1)]
As in, "they're NOT random".
The random number generator is broken by the sympy.factorint()
function.
Random.choice() works ok if the factorint() function commented out.
##  6089 1811 None
##  6449 1759 None
##  9923 4639 None
##  4013 4889 None
##  4349 2029 None
##  6703 8677 None
##  1879 1867 None
##  5153 5279 None
##  2011 4937 None
##  7253 5507 None
This makes sympy worse than worthless, as it f***s up other modules.

Dude, relax.

It's just a bug--probably sympy is messing with the internals of the
random number generator.  It would be a simple fix.  Instead of
b****ing about it, file a bug report.  

I did.
Or better yet, submit a patch.

I would if I knew what the problem was.

I posted it here because someone recommended it.
I'm simply un-recommending it. Those who don't care
needn't pay any attention. Those who do should be
glad that faults are pointed out when found.
 
R

Robert Kern

Mensanator said:
I did.


I would if I knew what the problem was.

Did you even try to figure it out? It took me all of 5 minutes to find the mistake.
I posted it here because someone recommended it.
I'm simply un-recommending it.

It was a mistake, an easily remedied mistake, not a big unchangeable design
decision. If you want to recommend against sympy as a package, there is a larger
burden of proof that you have yet to meet.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
 
C

Carl Banks

Notice anything funny about the "random" choices?
import sympy
import time
import random
f = [i for i in sympy.primerange(1000,10000)]
for i in xrange(10):
f1 = random.choice(f)
print f1,
f2 = random.choice(f)
print f2,
C = f1*f2
ff = None
ff = sympy.factorint(C)
print ff
## 7307 7243 [(7243, 1), (7307, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
## 8563 2677 [(2677, 1), (8563, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
## 8563 2677 [(2677, 1), (8563, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
## 8563 2677 [(2677, 1), (8563, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
## 8563 2677 [(2677, 1), (8563, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
As in, "they're NOT random".
The random number generator is broken by the sympy.factorint()
function.
Random.choice() works ok if the factorint() function commented out.
## 6089 1811 None
## 6449 1759 None
## 9923 4639 None
## 4013 4889 None
## 4349 2029 None
## 6703 8677 None
## 1879 1867 None
## 5153 5279 None
## 2011 4937 None
## 7253 5507 None
This makes sympy worse than worthless, as it f***s up other modules.
Dude, relax.
It's just a bug--probably sympy is messing with the internals of the
random number generator. It would be a simple fix. Instead of
b****ing about it, file a bug report.

I did.
Or better yet, submit a patch.

I would if I knew what the problem was.

I posted it here because someone recommended it.
I'm simply un-recommending it. Those who don't care
needn't pay any attention. Those who do should be
glad that faults are pointed out when found.

1. You can point out the faults of a program without insults and
vulgarity

2. You must be terribly difficult to please if one bug is enough to
recommend against a program as "worse than worthless"

3. You must be terribly naive if you expect a freeware program with a
version number of 0.5.12 not to have bugs


Carl Banks
 
A

apatheticagnostic

I swear, this is one of the most polite-oriented groups I've ever
seen.

Not that that's a bad thing or anything, it's nice to be nice.

(This has been Captain Universal Truth, over and out)
 
M

Mensanator

Did you even try to figure it out? It took me all of 5 minutes to find the mistake.

Could I trouble you to share? Then I could continue my testing.
It was a mistake, an easily remedied mistake,

But I didn't know that (and still don't).
not a big unchangeable design decision.

I didn't know that either. For all I know, I might have to
wait for the next version, and who knows when that will be?
If you want to recommend against sympy as a package, there is a larger
burden of proof that you have yet to meet.

What kind of burden of proof must one have to recommend it in the
first place?
 
R

Robert Kern

Mensanator said:
Could I trouble you to share? Then I could continue my testing.

I posted the patch on the bug tracker:

http://code.google.com/p/sympy/issues/detail?id=729
But I didn't know that (and still don't).


I didn't know that either. For all I know, I might have to
wait for the next version, and who knows when that will be?

The point is that you didn't try to figure it out. And you assumed the worst
rather than giving anyone the benefit of the doubt. You didn't even wait to get
a response from the package maintainer about how serious the issue was before
you came here to un-recommend it.

All software has bugs.

Good software has bugs.

Finding a single bug in a package is not sufficient cause to warn people away as
if it had the plague.
What kind of burden of proof must one have to recommend it in the
first place?

Significantly less. "It was useful to me," is sufficient.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
 
M

Mensanator

Notice anything funny about the "random" choices?
import sympy
import time
import random
f = [i for i in sympy.primerange(1000,10000)]
for i in xrange(10):
  f1 = random.choice(f)
  print f1,
  f2 = random.choice(f)
  print f2,
  C = f1*f2
  ff = None
  ff = sympy.factorint(C)
  print ff
##  7307 7243 [(7243, 1), (7307, 1)]
##  4091 6829 [(4091, 1), (6829, 1)]
##  8563 2677 [(2677, 1), (8563, 1)]
##  4091 6829 [(4091, 1), (6829, 1)]
##  8563 2677 [(2677, 1), (8563, 1)]
##  4091 6829 [(4091, 1), (6829, 1)]
##  8563 2677 [(2677, 1), (8563, 1)]
##  4091 6829 [(4091, 1), (6829, 1)]
##  8563 2677 [(2677, 1), (8563, 1)]
##  4091 6829 [(4091, 1), (6829, 1)]
As in, "they're NOT random".
The random number generator is broken by the sympy.factorint()
function.
Random.choice() works ok if the factorint() function commented out.
##  6089 1811 None
##  6449 1759 None
##  9923 4639 None
##  4013 4889 None
##  4349 2029 None
##  6703 8677 None
##  1879 1867 None
##  5153 5279 None
##  2011 4937 None
##  7253 5507 None
This makes sympy worse than worthless, as it f***s up other modules.
Dude, relax.
It's just a bug--probably sympy is messing with the internals of the
random number generator.  It would be a simple fix.  Instead of
b****ing about it, file a bug report.
I would if I knew what the problem was.
I posted it here because someone recommended it.
I'm simply un-recommending it. Those who don't care
needn't pay any attention. Those who do should be
glad that faults are pointed out when found.

1. You can point out the faults of a program without insults and
vulgarity

Did I insult someone?

And "****" in the context I used it means "messes with".
Now you know that the writer of that superbowl commercial
for almonds wanted to say "Robert Goulet fucks with your stuff".
But, due to censorship, changed it to "messes with".
2. You must be terribly difficult to please if one bug is enough to
recommend against a program as "worse than worthless"

While we're on the subject of English, the word "worthless"
means "has no value". So, a program that doesn't work would
generally be "worthless". One that not only doesn't work but
creates side effects that cause other programs to not work
(which don't have bugs) would be "worse than worthless".

I'm not hard to please at all. I'm planning a later report
where I test sympy's factoring with that of the MIRACL library's
factor.exe program. It too, has a serious bug (and I'm not
a good enough C programmer to know how to fix it) but I have
a Python based workaround even though the MIRACL library
has no Python interface. But any mention I ever make of this
program will mention this bug in case anyone wants to use it.
3. You must be terribly naive if you expect a freeware program with a
version number of 0.5.12 not to have bugs

No, but I guess I'm naive thinking that when someone posts a link to
such a program that he's recommending going and trying it out. That
is why they're making it available, isn't it? For people to try out
so they can get free testing? Aren't I doing my part? Should I just
uninstall it and forget it?
 
C

Carl Banks

Notice anything funny about the "random" choices?
import sympy
import time
import random
f = [i for i in sympy.primerange(1000,10000)]
for i in xrange(10):
f1 = random.choice(f)
print f1,
f2 = random.choice(f)
print f2,
C = f1*f2
ff = None
ff = sympy.factorint(C)
print ff
## 7307 7243 [(7243, 1), (7307, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
## 8563 2677 [(2677, 1), (8563, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
## 8563 2677 [(2677, 1), (8563, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
## 8563 2677 [(2677, 1), (8563, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
## 8563 2677 [(2677, 1), (8563, 1)]
## 4091 6829 [(4091, 1), (6829, 1)]
As in, "they're NOT random".
The random number generator is broken by the sympy.factorint()
function.
Random.choice() works ok if the factorint() function commented out.
## 6089 1811 None
## 6449 1759 None
## 9923 4639 None
## 4013 4889 None
## 4349 2029 None
## 6703 8677 None
## 1879 1867 None
## 5153 5279 None
## 2011 4937 None
## 7253 5507 None
This makes sympy worse than worthless, as it f***s up other modules.
Dude, relax.
It's just a bug--probably sympy is messing with the internals of the
random number generator. It would be a simple fix. Instead of
b****ing about it, file a bug report.
I did.
Or better yet, submit a patch.
I would if I knew what the problem was.
I posted it here because someone recommended it.
I'm simply un-recommending it. Those who don't care
needn't pay any attention. Those who do should be
glad that faults are pointed out when found.
1. You can point out the faults of a program without insults and
vulgarity

Did I insult someone?

Yes, the intelligence of most people here, if you think anyone's going
to buy your rationalization of your spiteful behavior.

Four posts is more than enough of you.
*PLONK*


Carl Banks
 
R

Robert Kern

Mensanator said:
No, but I guess I'm naive thinking that when someone posts a link to
such a program that he's recommending going and trying it out. That
is why they're making it available, isn't it? For people to try out
so they can get free testing? Aren't I doing my part? Should I just
uninstall it and forget it?

Finding the issue and reporting it to the sympy bug tracker is commendable.

Coming here and "un-recommending" sympy before the issue was resolved is not.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
 
M

Mensanator

I posted the patch on the bug tracker:

   http://code.google.com/p/sympy/issues/detail?id=729

Thanks, I think I actually figured out how to use it.
The point is that you didn't try to figure it out.

Give me a break, I'm not a developer, just an end user.
And you assumed the worst

Wasn't my assumption correct? That it really was messing
outside it's domain?
rather than giving anyone the benefit of the doubt.

As in "maybe it only fails for me"? Was I crying that the
sky was falling?
You didn't even wait to get a response from the package
maintainer

I have no experience with those web sites. I think this is
the first time I was able to successfully report a bug and
have no clue what the turnaround time is.
about how serious the issue was

The symptom was serious although the fix was simple.
before you came here to un-recommend it.

As an end user, I get most of my information here.
Since I saw the link to sympy here on this newsgroup,
I thought it would be irresponsible to file a bug report
without simultaneously mentioning it here.
All software has bugs.

Good software has bugs.

Are bugs off-topic here?
Finding a single bug in a package is not sufficient cause to warn people away as
if it had the plague.

It DID have the plague. It affected anything else that tried
to use random numbers.
Significantly less. "It was useful to me," is sufficient.

Really? That's sufficient? Ok, but how is my pointing out a verifyable
problem that affects the entire system not a sufficient burden of
proof against recommending the package? Or should I just have worded
it differently?

Aren't I at least going to get credit for having found it?
 
M

Mensanator

Finding the issue and reporting it to the sympy bug tracker is commendable..

Coming here and "un-recommending" sympy before the issue was resolved is not.

Bad choice of words I guess. I'll try to keep that in mind.
 
E

Erik Max Francis

Mensanator said:
While we're on the subject of English, the word "worthless"
means "has no value". So, a program that doesn't work would
generally be "worthless". One that not only doesn't work but
creates side effects that cause other programs to not work
(which don't have bugs) would be "worse than worthless".

All programs have bugs, which means that in some circumstances, they
won't work. Therefore, by your reasoning, all programs are worse than
useless.
I'm not hard to please at all.

No, of course not, since logically you must think all software is useless.
 
M

Mensanator

All programs have bugs, which means that in some circumstances, they
won't work.  

And in such circumstances, would be worthless.
Therefore, by your reasoning, all programs are worse than
useless.

That doesn't follow from my reasoning.

Suppose you downloaded a new calculator program that
couldn't add properly. That would be useless to you, right?

But suppose the program contained a virus that erased
your hard drive. That would be "worse than useless", wouldn't it?
No, of course not, since logically you must think all software is useless.

Somehow, I expected better logic from people who call themselves
programmers.
 
E

Erik Max Francis

Mensanator said:
Somehow, I expected better logic from people who call themselves
programmers.

So you agree with me. Lack of prefection = uselessness. Thanks for
being honest, whether your realized you defeated your own disclaimer or not.
 
L

Lie

And in such circumstances, would be worthless.


That doesn't follow from my reasoning.

Suppose you downloaded a new calculator program that
couldn't add properly. That would be useless to you, right?

But suppose the program contained a virus that erased
your hard drive. That would be "worse than useless", wouldn't it?





Somehow, I expected better logic from people who call themselves
programmers.

Mensanator, for alls sake, you've done right by pointing out the bug
instead of muttering silently in your room, but there is a thing
called tolerance that you really should learn, it's about tolerating
and understanding the possibility that other people are humans too and
humans create mistakes, lots of them in fact and that includes you (if
you're humans). Along with tolerance should come a better choice of
wordings, instead of saying "it sucks because it does something
unexpected and unwanted" and telling everyone not to use it, you could
just say "it does something unexpected and unwanted" and say that you
wanted it fixed. It's not that you've done anything wrong, but it's
about your attitude.
 
C

castironpi

Mensanator, for alls sake, you've done right by pointing out the bug
instead of muttering silently in your room, but there is a thing
called tolerance that you really should learn, it's about tolerating
and understanding the possibility that other people are humans too and
humans create mistakes, lots of them in fact and that includes you (if
you're humans). Along with tolerance should come a better choice of
wordings, instead of saying "it sucks because it does something
unexpected and unwanted" and telling everyone not to use it, you could
just say "it does something unexpected and unwanted" and say that you
wanted it fixed. It's not that you've done anything wrong, but it's
about your attitude.- Hide quoted text -

- Show quoted text -

All of your statements were true.
You expressed your emotions, your observations, and desire.
You corrected statements incorrect that others made earlier.
Others gave you orders, their observations of your character, and
expressed their emotions.
Now keep your noses in the keyboard and simmer down. I won't stand
for this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,265
Latest member
TodLarocca

Latest Threads

Top