[sage-devel] Re: How to write a Cython wrapper for a C++ function that has a function pointer argument

2011-12-12 Thread kstueve
Thanks Volker. Now I have the following code. I need to take the Python function callback which takes one argument and create a void (*callback) (uint32_t) function pointer to pass to self.thisptr.generatePrimes. How do I do this? Right now I get the error "Cannot convert Python object to 'void

[sage-devel] How to write a Cython wrapper for a C++ function that has a function pointer argument

2011-12-12 Thread kstueve
While writing a Cython wrapper for primesieve (http://code.google.com/ p/primesieve/) I have been unable to wrap the generatePrimes function because of the function pointer argument. I get "Cannot convert 'void' to Python object" on the last line below. Please help me. I have been reading the Cyt

[sage-devel] problem with plot_step_function

2011-07-21 Thread kstueve
When I call plot_step_function(v=[(1, 279238341033925), (10001, 279238341033925), (10002, 279238341033925), (10003, 279238341033925), (10004, 279238341033925), (10005, 279238341033925), (10006, 279238341033925)

[sage-devel] web services and pi(x) tables

2011-06-24 Thread kstueve
. I tried putting Python code in my Sage directory at http://sage.math.washington.edu/home/kstueve/code/test.py but it seems the Sage accounts aren't set up to run Python scripts. I am asking for a Sage admin to set up an account on the Sage server where I can put pi(x) tables and a Python scri

[sage-devel] Re: paralizing algorithms

2010-11-20 Thread kstueve
(with tables) http://www.primefan.ru/stuff/primes/table.html Writeup for my Summer 2009 project under William Stein http://wstein.org/projects/stueve.pdf A bibliography of resources I made during my Summer 2009 project http://sage.math.washington.edu/home/kstueve/prime_pi_bibliography.html Th

[sage-devel] Re: help me please

2010-09-07 Thread kstueve
"How to contribute to Sage" http://sagemath.org/development.html As I understand it, all additions to Sage are made through the trac server at http://trac.sagemath.org/sage_trac/. You need to obtain a trac account. You do not contribute to Sage by providing new code-you provide a patch through t

[sage-devel] Re: Notebook Cells

2010-04-23 Thread kstueve
t sure how to get the equivalent of the html link tag to work in the notebook. I was able to get JSX graph to work in its own web page (http:// sage.math.washington.edu/home/kstueve/temp/blah.html), but got "ReferenceError: JXG is not defined" in the notebook. On Apr 22, 8:56 pm, k

[sage-devel] Notebook Cells

2010-04-22 Thread kstueve
Can someone give me an explanation of how to embed objects in cells. For example, how does plot work? If I want to make a function that embeds an image in a notebook cell, how would I do this? What I want is to make Python code that communicates with a Java GUI in a notebook cell. If you click t

[sage-devel] Re: Complex Coercion Error or User Error?

2010-03-17 Thread kstueve
Does anyone have information on the maximum size of an array of doubles in C? I seem to be getting abnormal results using elements past the first 1e6. What is the standard way to deal with very large (millions to billions of elements) arrays of data in C? Kevin Stueve -- To post to this group,

[sage-devel] Re: Complex Coercion Error or User Error?

2010-03-04 Thread kstueve
I believe the speed of c is worthwhile here. And I am not skilled in Cython. On Mar 4, 12:12 am, Robert Bradshaw wrote: > On Mar 3, 2010, at 10:50 AM, kstueve wrote: > > > I've been working more on TOS's Li based pi(x) approximation code. > > I've been trying to

[sage-devel] Re: Complex Coercion Error or User Error?

2010-03-03 Thread kstueve
The coercion question in the first post in this thread is still open. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/gro

[sage-devel] Re: Complex Coercion Error or User Error?

2010-03-03 Thread kstueve
Problem solved. The list of zeros was mis-formatted (by myself). Thanks Leif! Here is the Pythonized version, for reference. I made the table of zeros incorrectly. I used the code: print "float zz[]={" for i in range(1,6000):#len(zz)): s=str(zz[i])+"," i+=1 s+=str(zz[i])+"," i

[sage-devel] Re: Complex Coercion Error or User Error?

2010-03-03 Thread kstueve
aking some sort of simple error in moving data around. I have already asked one of my peers in my number theory class, and we are both stuck. Sage: import subprocess def fastli(x,y): thesubprocess=subprocess.Popen(args=["/home/kstueve/Desktop/ riemannpi/li",str(x),str(y)],stdou

[sage-devel] Complex Coercion Error or User Error?

2010-02-05 Thread kstueve
I am using the following function from Tomas Oliveira e Silva (converted by myself into Python). See http://trac.sagemath.org/sage_trac/ticket/8135 from math import log # # computation of li(x^{1/2+I t})+li(x^{1/2-I t}) # # li(x^\rho) = x^\rho/u*(1+1/u+2!/u^2+3!/u^3+...), # with \rho=1/2+it and

[sage-devel] U.S. Scientists Given Access to Cloud Computing (NY Times)

2010-02-05 Thread kstueve
U.S. Scientists Given Access to Cloud Computing New York Times, Feb. 4, 2010 The National Science Foundation and the Microsoft Corporation have agreed to offer American scientific researchers free access to the company's new cloud computing service. Ed Lazowska, a University of Washington compu

[sage-devel] Thomas R. Nicely's previously unpublished prime tables now available

2010-01-05 Thread kstueve
Thomas R. Nicely's previously unpublished tables of prime counts and prime reciprocal sums are now available at http://sage.math.washington.edu/home/kstueve/T_R_NICELY/ These are the same data that Thomas R. Nicely has published at http://www.trnicely.net/#PIX but with more data p

[sage-devel] Graphical/Visual Input Mode

2009-12-27 Thread kstueve
Is it currently possible to make a notebook in a graphical mode where you can see fractions, matrices, etc as you type? For example: You click on a "fraction" button You see a horizontal line with two little boxes to click above and below the line You click the top box and type the numerator. You c

[sage-devel] Re: Computing the Twin Prime Counting Function and a Twin Prime Class

2009-12-06 Thread kstueve
It might be interesting to compare the difference between prime_pi and its logarithmic integral approximation and the difference between twin_prime_pi and its logarithmic integral approximation. How well correlated are they? -- To post to this group, send an email to sage-devel@googlegroups.com

[sage-devel] Computing the Twin Prime Counting Function and a Twin Prime Class

2009-12-06 Thread kstueve
I just opened trac ticket #7613 (new task). If anyone is looking for a project to do over winter break (or knows anyone who would enjoy this project), they should read this. This is a great opportunity to make a significant contribution to Sage and the mathematics community in general. I would d

[sage-devel] Re: Graphical Physics Program Suggestions

2009-11-28 Thread kstueve
I have another question. I need a parser for the d attribute of the path element of svg (scalable vector graphics). I want my physics program to be able import shapes drawn with an svg designer such as inkscape. Pyparsing seems to meet my needs. This is a third party python library. If I use P

[sage-devel] Re: Graphical Physics Program Suggestions

2009-11-27 Thread kstueve
a applet a series of "snapshots" of positions that are interpolated (likely better than linearly) by the Java applet to create believable animation. Kevin Stueve On Nov 15, 3:42 pm, kstueve wrote: > I need my program to have a graphical interface when run either > locally or on a

[sage-devel] Re: Denial of Service attack on Sage servers

2009-11-27 Thread kstueve
On Nov 25, 12:34 pm, "Dr. David Kirkby" wrote: > It would appear to me that it would be very easy for a "script kiddie" to > write > a a program which created huge numbers of accounts on a Sage server, perform > some CPU intensive computation on them, and bring the system to a near > standstill

[sage-devel] Re: How popular is Mathematica compared to Sage? 1.71:1 is one guess.

2009-11-19 Thread kstueve
Innovation: The dizzying ambition of Wolfram Alpha New Scientist Tech, Nov. 17, 2009 Stephen Wolfram wants Wolfram Alpha to generate knowledge of its own. Alpha has been exposed to more utterances than a typical child would hear in learning a new language, allowing it to get smarter at understa

[sage-devel] Re: Graphical Physics Program Suggestions

2009-11-17 Thread kstueve
changing (and being calculated), such as the position or velocity of a body. http://ptolemy.berkeley.edu/java/ptplot5.7/ptolemy/plot/doc/index.htm Kevin Stueve On Nov 15, 10:03 pm, Pat LeSmithe wrote: > On 11/15/2009 09:51 PM, kstueve wrote: > > > GeoGebra and Jmol are written in Jav

[sage-devel] Re: Debugging personal code

2009-11-15 Thread kstueve
An alternative to adding/removing/commenting out/uncommenting print statements through your code may be to use decorators. A decorator is a a function that is passed your function whenever it is called. A decorator can do whatever you want. Some of the possibilities are caching values of the fu

[sage-devel] Re: Graphical Physics Program Suggestions

2009-11-15 Thread kstueve
Pat, thanks for the links and suggestions. They were helpful. GeoGebra and Jmol are written in Java. Jmol and GeoGebra can use JavaScript to simplify embedding in a web-page. Is this what you mean by JS-"able"? On Nov 15, 8:45 pm, Pat LeSmithe wrote: > On 11/15/2009 06:08 PM,

[sage-devel] Re: Graphical Physics Program Suggestions

2009-11-15 Thread kstueve
e: > On 11/15/2009 03:42 PM, kstueve wrote: > > > I would appreciate it if anyone has any links to JavaScript libraries > > (or general suggestions on making a JavaScript GUI front-end that > > communicates with a Python program) that might be helpful. > > There are so

[sage-devel] Re: Graphical Physics Program Suggestions

2009-11-15 Thread kstueve
I am aiming for (with quantitative output too). Kevin Stueve On Nov 13, 5:09 pm, kstueve wrote: > To sage-dev > Can someone please explain to me what traits are in the context of > tvisual?  The wiki page for it (http://www.enthought.com/traitsfrom > the pagehttps://svn.enthought.c

[sage-devel] Re: Graphical Physics Program Suggestions

2009-11-13 Thread kstueve
On Nov 13, 7:44 pm, William Stein wrote: > On Fri, Nov 13, 2009 at 5:09 PM, kstueve wrote: > > > To sage-dev > > Can someone please explain to me what traits are in the context of > > tvisual?  The wiki page for it (http://www.enthought.com/traitsfrom > > the

[sage-devel] Re: Graphical Physics Program Suggestions

2009-11-13 Thread kstueve
To sage-dev Can someone please explain to me what traits are in the context of tvisual? The wiki page for it (http://www.enthought.com/traits from the page https://svn.enthought.com/enthought/wiki/TVTKIntroduction) is a dead link. A google search of either vpython.org or svn.enthought.com produce

[sage-devel] Re: Graphical Physics Program Suggestions

2009-11-13 Thread kstueve
ns in 6-10 > variables.  If I were you, I'd look through Hibbeler's texts for > "typical" problems that it should be easy to input and solve.  In > fact, you can borrow my copy some time, if you like. > > > > On Tue, Sep 22, 2009 at 11:14 AM, kstueve wrote: > >

[sage-devel] Re: Graphical Physics Program Suggestions

2009-11-03 Thread kstueve
n y component of linear velocity of point B = mu * change in x component of linear velocity of point B Are these equations correct?" I then replied to my own thread with "After reading more of the site, I realize that equation 1 must refer to the converging and diverging velocities of points

[sage-devel] Re: Graphical Physics Program Suggestions

2009-10-23 Thread kstueve
Have any of you heard of Erik Neumann? He published some excellent Java physics demos at http://www.myphysicslab.com/ He is in Seatle, and has attended UW. I have been looking into vector graphics with javascript. It appears that circles, lines, and other curves are made out of lots of div ele

[sage-devel] Re: trac ticket 7013 is ready for review prime_pi and nth_prime (my first Sage contribution)

2009-09-27 Thread kstueve
I added a zip file with the code to my sagemath directory and a note to the trac server. Thanks for your comments Georg and Robert Bradshaw! I think I'll need some help making the build scripts for every possible operating system and platform. Thanks for being patient with this being my first S

[sage-devel] Re: trac ticket 7013 is ready for review prime_pi and nth_prime (my first Sage contribution)

2009-09-26 Thread kstueve
Would any of you be interested in refereeing ticket 7013? It needs review. On Sep 25, 6:26 pm, kstueve wrote: > Uses a hybrid table lookup and sieving algorithm.  Also provides the > option of using PARI's sieving algorithm, Andrew Ohana's optimized > Legendre algorithm,

[sage-devel] Re: prime_range problem

2009-09-25 Thread kstueve
I opened ticket #7017. Kevin Stueve On Sep 25, 7:05 pm, Minh Nguyen wrote: > Hi, > > On Sat, Sep 26, 2009 at 11:28 AM, kstueve wrote: > > > > > from sage.rings.fast_arith import prime_range > > print prime_range(10^16,10^16+100) > > Those two lines gave me

[sage-devel] prime_range problem

2009-09-25 Thread kstueve
I am having trouble with the following lines. Should I make a new trac ticket for this or am I just doing something wrong? I am on a MacBook pro. from sage.rings.fast_arith import prime_range print prime_range(10^16,10^16+100) Traceback (most recent call last): File "", line 1, in File "/Us

[sage-devel] trac ticket 7013 is ready for review prime_pi and nth_prime (my first Sage contribution)

2009-09-25 Thread kstueve
Uses a hybrid table lookup and sieving algorithm. Also provides the option of using PARI's sieving algorithm, Andrew Ohana's optimized Legendre algorithm, or Victor Miller's Lagarias Miller Odlyzko (LMO) combinatorial algorithm. Be sure to use the -m32 option when compiling the c code, and if ne

[sage-devel] Graphical Physics Program Suggestions

2009-09-22 Thread kstueve
As my work on prime_pi and nth_prime is drawing to a close, William Stein and I have discussed the possibility of me making a graphical physics program to be included in Sage, the free open source math program. An example of the desired functionality is to either with a few lines of code from wit

[sage-devel] Re: grant proposal season

2009-08-26 Thread kstueve
Some things I would love to see in Sage: 1) Real-time sound manipulation e.g. hearing a sound change as you manipulate a frequency distribution 2) Functionality similar to ODE architect e.g. drawing an animated spring system and analyzing its DEs and graphs 3) Design by contract and proofs of c

[sage-devel] Re: Circuits

2009-07-28 Thread kstueve
On Jul 27, 3:11 am, David Kirkby wrote: > 2009/7/27 Peter Jeremy : > > > > > On 2009-Jul-26 11:07:49 -0700, William Stein wrote: > >>Hi Sage-Devel (in particular, people who know about electrical circuits), > > > I'm not an EE but electronics is a hobby of mine. > > >>I just happen to be meeti

[sage-devel] Re: Circuits

2009-07-26 Thread kstueve
Hello, http://www.circuitengine.com is my site. It uses Gaussian elimination and a fifth order adaptive step-size Runga-Kutta solver to simulate electric circuits that are drawn by the user. I created a login for the sage development team to use. Please feel free to experiment with my program.