[sage-devel] Re: Finitely generated Z-modules / f.g. abelian groups

2011-05-05 Thread Nils Bruin
On May 5, 3:23 am, Volker Braun wrote: > I found the FGP_Module to be the most useful implementation of finitely > generated Z-modules: Thank you! That does indeed look promising. For free modules it seems it does everything I need: Z3=ZZ^3 K=Z3.span([Z3.0+Z3.1,Z3.0-Z3.1]) KtoZ3=K.hom([Z3(b) for

[sage-devel] Re: Finitely generated Z-modules / f.g. abelian groups

2011-05-05 Thread Nils Bruin
On May 5, 10:21 am, Volker Braun wrote: > Thats a bug. Its tricky because it involves homs from a FreeModule to a > FGP_Module. If you stay within FGP_Modules then it works: Great! That has almost everything on it that I need. Intersection and sum of submodules don't seem to exist yet, though. Sh

[sage-devel] Re: Finitely generated Z-modules / f.g. abelian groups

2011-05-05 Thread Nils Bruin
Oh shoot that's a really silly implementation of intersection. One should of course just do def intersect_submodules(M,S1,S2): F1=span([b.lift() for b in S1.gens()]) F2=span([b.lift() for b in S2.gens()]) M.submodule([M(b) for b in F1.intersection(F2).gens()]) -- To post to this grou

[sage-devel] Re: Finitely generated Z-modules / f.g. abelian groups

2011-05-06 Thread Nils Bruin
On May 5, 2:37 pm, Rob Beezer wrote: > Without time to experiment and refresh my memory from many months ago > - can you not just use the intersection method that already exists, > but with a pair of submodules? Unfortunately, they do not exist on FGP_Module. They do on free modules. There F1+F2

[sage-devel] Re: Blocker ticket #11348 (Maxima relocation) needs review

2011-05-18 Thread Nils Bruin
On May 18, 4:45 pm, Francois Bissey wrote: > I am guessing it is after maxima.fas which should be located in > local/lib/ecl-11.1.1. I just looked at it more closely and it looks like it is > actually a shared object: > ldd local/lib/ecl-11.1.1/maxima.fas Unless you have definite evidence that f

[sage-devel] Re: Blocker ticket #11348 (Maxima relocation) needs review

2011-05-19 Thread Nils Bruin
On May 19, 12:12 pm, Jeroen Demeyer wrote: > Yes.  The problem seems to be that maxima cannot be *installed* on top > of a relocated ecl. Since building software is part of the normal functioning of a lisp, can we conclude from this failure that the part of sage that fixes subsystems upon relocat

[sage-devel] Re: Blocker ticket #11348 (Maxima relocation) needs review

2011-05-20 Thread Nils Bruin
On May 20, 1:20 am, Jeroen Demeyer wrote: > Apparently yes, but apart from installing packages, it seems that ecl > runs fine after relocation. This is now (minor) ticket http://trac.sagemath.org/sage_trac/ticket/11359 -- To post to this group, send an email to sage-devel@googlegroups.com To uns

[sage-devel] Re: Blocker ticket #11348 (Maxima relocation) needs review

2011-05-20 Thread Nils Bruin
On May 20, 8:37 am, Nils Bruin wrote: > This is now (minor) tickethttp://trac.sagemath.org/sage_trac/ticket/11359 And on that ticket I have made some comments identifying the problem: ECL needs to know which include and library paths to use when it calls the C-compiler when compiling code.

[sage-devel] Re: ECL relocation problem

2011-05-21 Thread Nils Bruin
I think I have found a fix for the ECL relocation problem posted on http://trac.sagemath.org/sage_trac/ticket/11359 Unfortunately, it does involve patching ECL. I don't think Juanjo will be very enthusiastic about incorporating this patch upstream, since the problem is so specific to Sage's desire

[sage-devel] ptestlong failure for 4.7.rc4

2011-05-25 Thread Nils Bruin
One strange failure: ** File "/usr/local/sage/4.7/devel/sage/sage/tests/cmdline.py", line 198: sage: err Expected: '' Got: 'ERROR: history is not a magic function\n'

[sage-devel] Re: ptestlong failure for 4.7.rc4

2011-05-26 Thread Nils Bruin
On May 26, 1:29 am, Jeroen Demeyer wrote: > > File "/usr/local/sage/4.7/devel/sage/sage/tests/cmdline.py", line 198: [...] > > Got: > >     'ERROR: history is not a magic function\n' > > Is it reproducible if you run ./sage -t devel/sage/sage/tests/cmdline.py > several times? Yes it is > Did the

[sage-devel] Re: ptestlong failure for 4.7.rc4

2011-05-27 Thread Nils Bruin
I tried a "sage -upgrade" on a pristine 4.7.rc4 install to get to 4.7 and I got hg "unresolved" and "uncommitted changes" problems left and right. Since "sage -upgrade" duly warns that it offers no guarantees, that's not really a bug, but given that I didn't do anything with that 4.7.rc4 other than

[sage-devel] Re: problem using magma in notebook with 4.7

2011-05-29 Thread Nils Bruin
Confirmed. This is now http://trac.sagemath.org/sage_trac/ticket/11401. (for Rob Beezer: #11374 only fixes a typo in a doctest. This must be another issue). No idea what the problem is, but it's an annoying one. I do use the notebook interface for magma occasionally, especially for presentations.

[sage-devel] Re: problem using magma with 4.7 not just in the notebook

2011-05-30 Thread Nils Bruin
This will probably help the person who is going to track down this bug: It's not just in the notebook and it looks like newlines in the input knock the interface out of sync (but not always!) The following example fails reliably for me: sage: magma.execute("a:=1;b:=2;") '' sage: magma.execute("pri

[sage-devel] Re: missing deprecation warnings?

2011-06-03 Thread Nils Bruin
On Jun 3, 4:47 pm, Jason Grout wrote: > I don't know that it will make much difference to look into exactly why > the M.list() method doesn't exist anymore, given that list(M) seems to > be equivalent.  However, looking into this might uncover a place where a > deprecation warning should have been

[sage-devel] Re: Sage-4.7 VirtualBox image

2011-06-04 Thread Nils Bruin
On Jun 4, 9:57 am, Volker Braun wrote: > The disadvantage is that we can't automatically open a > browser from the sage process with a magic url, so the user has to log in > manually. Someone with experience in developing windows software could probably easily produce a windows program/script tha

[sage-devel] Re: 0.0 versus 0.00000000000

2011-06-08 Thread Nils Bruin
On Jun 8, 12:23 pm, Jason Grout wrote: > But we already have the convention that zeros after the decimal indicate > precision: [...] > So there is already something special about where the decimal point is > placed. Actually, it looks to me like it's zeros after a non-zero digit that have a spec

[sage-devel] Re: Preparser idiosyncrasy

2011-06-24 Thread Nils Bruin
On Jun 24, 1:25 pm, Tom Boothby wrote: > This is exceptionally strange: > > sage: def x(a,1): > sage:     return a+1 > sage: print x(1,5) > 6 > > In my opinion, that's a bug, as is > > sage: def y(a,b=1): > sage:    return a+b > sage: 1=5 > sage: y(1) > 6 It's even stranger because on the command

[sage-devel] Re: Eigen-stuff in Sage

2011-06-24 Thread Nils Bruin
On Jun 24, 11:48 am, Rob Beezer wrote: > I am just now about to implement optionally promoting a QQ matrix to a > QQbar matrix when the eigenvalues lie outside QQ, to obtain an > alternate format for output, as described above.  I don't think there > will be any disagreement with making that avail

[sage-devel] Re: Preparser idiosyncrasy

2011-06-24 Thread Nils Bruin
On Jun 24, 5:43 pm, kcrisman wrote: > You may want to see ifhttp://trac.sagemath.org/sage_trac/ticket/7496 > affects this, or whether it at least gives an idea of what to do. > preparse_file versus preparse was an interesting distinction I wasn't > previously aware of. Thanks! implicit symbolic

[sage-devel] Re: Preparser idiosyncrasy

2011-06-24 Thread Nils Bruin
This is now http://trac.sagemath.org/sage_trac/ticket/11542 There are some ideas there on how to fix this. -- 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

[sage-devel] Re: Call for vote: lrcalc as standard or optional spkg?

2011-06-30 Thread Nils Bruin
On Jun 29, 3:49 pm, Florent Hivert wrote: >       Hi David, > > > I thought it had been agreed no package would be standard unless it > > is first optional. > > There were indeed such an agreement. However, I'd rather following the idea of > the rule rather than the letter. [...] > I don't see the

[sage-devel] Re: Free module equality, Hermite form over PIDs

2011-07-09 Thread Nils Bruin
On Jul 8, 10:05 pm, Rob Beezer wrote: > So again, there is an assumption that the echelon matrix is unique. > Is there a critical reason free modules should be ordered at all? No. Historically there was an expectation in Python that "<" defines a total ordering on objects, but with "complex" (exc

[sage-devel] Re: Constructing free module morphisms

2011-07-09 Thread Nils Bruin
On Jul 8, 10:07 pm, Rob Beezer wrote: [...] > sage: V = (QQ^3).subspace_with_basis([[1,0,0], [0,0,1]]) > sage: H = Hom(V, V) [...] > Then consider, > > sage: W = (QQ^3).subspace_with_basis([[0,1,0],[0,0,1],[1,0,0]]) > sage: K = Hom(W, W) > sage: zeta = K([[1,0,0], [0,1,0], [0,0,1]]) > > Which do y

[sage-devel] Re: Lifts

2011-07-13 Thread Nils Bruin
On Jul 13, 12:29 pm, Rob Beezer wrote: > (a) a simple renaming, as perhaps "pre_image()" > > OR > > (b) make the existing  inverse_image()  method more capable: > submodule in, submodule out  plus  element in, element out. > > At the risk of poisoning the well, I like (b), though in my textbook I

[sage-devel] Re: Simplify not maintaining precision?

2011-08-01 Thread Nils Bruin
On Aug 1, 1:42 pm, Eviatar wrote: > Oh, I just assumed the interface with Maxima would maintain precision. It could. Maxima does have a notion of multiprecision floats. They are base 2, so interfacing with MPFR should be a cinch. Especially with lib_maxima, translating MPFR to maxima multiprec an

[sage-devel] Re: Simplify not maintaining precision?

2011-08-03 Thread Nils Bruin
On Aug 1, 6:52 pm, Eviatar wrote: > This is now #11643,http://trac.sagemath.org/sage_trac/ticket/11643. A little experimenting (see ticket) shows that Maxima itself does not keep track of precision in its bigfloats. Any computation (including just adding two numbers!) will just produce a bigfloat

[sage-devel] Re: MATLAB: viable alternative...?

2011-08-17 Thread Nils Bruin
On Aug 17, 5:45 pm, Dan Drake wrote: > On Wed, 17 Aug 2011 at 10:36AM -0500, Jason Grout wrote: > > Note that "matrix" below is the *scipy* matrix command, since -pylab > > overwrote Sage's matrix command. However, matrix multiplication works > > naturally below, and the matrix-creating command

[sage-devel] Re: MATLAB: viable alternative...?

2011-08-17 Thread Nils Bruin
On Aug 17, 5:45 pm, Dan Drake wrote: > This is now #11699:http://trac.sagemath.org/sage_trac/ticket/11699 > > I agree with Rob; this probably should be in matrix(), and not in the > preparser. Are you thinking of having matrix(s) [with s a string] being equivalent to matrix([[eval(a) for a in r.

[sage-devel] Re: MATLAB: viable alternative...?

2011-08-19 Thread Nils Bruin
On Aug 19, 12:26 pm, Jason Grout wrote: > On 8/19/11 1:45 PM, Robert Bradshaw wrote: > > >      [a, b; c, d].change_ring(QQ) You'd have to take care that [1.0001, 1.0; 2.0, 3.0].change_ring(RealField(100)) doesn't lose precision on the way, which suggests that "[;]" syntax s

[sage-devel] Re: Idea for new implicit_multiplication level to handle "x (x)". Please tell me if it would easily work.

2011-08-22 Thread Nils Bruin
On Aug 21, 7:45 pm, Chris Seberino wrote: > In other words, have a regex like "\w\s\(" that replaces the > whitespace with "*" giving > "\w\*\(". > Is this feasible?  I'm trying to think if there are any hidden gotchas > I don't know about. One gotcha would be someone wanting to spell out an expr

[sage-devel] Re: Idea for new implicit_multiplication level to handle "x (x)". Please tell me if it would easily work.

2011-08-23 Thread Nils Bruin
On Aug 22, 11:04 pm, Ivan Andrus wrote: > Personally I don't use implicit multiplication, but I do wish there were a > function that changed implicit to explicit since it can be convenient to copy > a polynomial from somewhere that uses implicit multiplication and going back > to add *'s is an

[sage-devel] Re: Idea for new implicit_multiplication level to handle "x (x)". Please tell me if it would easily work.

2011-08-23 Thread Nils Bruin
On Aug 22, 11:17 pm, Chris Seberino wrote: > In order to deal with this situation, as well as the conditional > "(this) or (that)", my simple regex would need to be > changed to only trigger when a *VARIABLE* was followed by a space and > left parens. Unfortunately you don't have that information

[sage-devel] Re: Idea for new implicit_multiplication level to handle "x (x)". Please tell me if it would easily work.

2011-08-23 Thread Nils Bruin
On Aug 23, 7:55 am, Chris Seberino wrote: > So what is the next step to move forward? Open a ticket, implement a solution and attach a patch to the ticket. See the developer guide http://www.sagemath.org/doc/developer/index.html for an outline. It is probably instructive to link back to this t

[sage-devel] Re: Idea for new implicit_multiplication level to handle "x (x)". Please tell me if it would easily work.

2011-08-23 Thread Nils Bruin
On Aug 23, 7:55 am, Chris Seberino wrote: > So what is the next step to move forward? You may want to look at how implicit_mul is currently processing its input. Perhaps you can easily adapt it for your purposes. Python's library itself should be able to help you quite a bit too. There is tokeniz

[sage-devel] Trac #11401 (magma interface vs. newlines) has a fix

2011-08-31 Thread Nils Bruin
Just a ping that http://trac.sagemath.org/sage_trac/ticket/11401 now has a proper fix and explanation on it. It was already marked "needs review" with a poor, symptomatic fix. The new one solves the heart of the problem, I hope. So if someone feels up to reviewing it ... In principle it could affec

[sage-devel] Re: Finding the exact camera position in Jmol

2011-09-08 Thread Nils Bruin
On Sep 8, 6:02 pm, Sébastien Labbé wrote: > Hi, > > I have been asked this question since more than a year by some people > in Montpellier and also needed it myself to draw in tikz a 3d object > with a projection I would choose using Jmol. I have now understood how > to do it and wrote a post abou

[sage-devel] Re: Finding the exact camera position in Jmol

2011-09-09 Thread Nils Bruin
On Sep 9, 6:52 am, Jonathan wrote: > In theory this could be added to the javascript functions being > included with the update to the Jmol interface which is coming with > the switch to the new flask notebook, but I'm not sure this is the > best solution. > > The new interface will include the ab

[sage-devel] Re: Finding the exact camera position in Jmol

2011-09-10 Thread Nils Bruin
On Sep 10, 11:11 am, Jonathan wrote: > If you are doing everything through Sage, would having Jmol print the > rotation information to the web page be enough? Possibly. That would result in essentially the same work-flow as Sébastien's solution, but with less effort. If I were new to Sage I would

[sage-devel] Re: GiNaC and Python disagree on arithmetic

2011-09-12 Thread Nils Bruin
If one puts it this way: sage: 0^0 1 sage: RDF(0)^RDF(0) #this one is the most dubious 1.0 sage: SR(0^0) 1 sage: SR(0)^SR(0) RuntimeError: power::eval(): pow(0,0) is undefined I think it's pretty clear that the error should go away unless there are very convincing technical reasons. -- To post

[sage-devel] Re: GiNaC and Python disagree on arithmetic

2011-09-13 Thread Nils Bruin
On Sep 12, 2:50 pm, Maarten Derickx wrote: > sage: a=GF(7)(0) > sage: a^a > ... > ArithmeticError: 0^0 is undefined. > > sage: a=Integers(7)(0) > sage: a^a > ... > ArithmeticError: 0^0 is undefined. I think something else is going wrong here. It's not so much that the exponent is 0, it's that the

[sage-devel] Re: how do I build sage-5.0 on virtualbox?

2012-05-18 Thread Nils Bruin
On May 17, 10:00 pm, William Stein wrote: > Hi, > > I know something like this has been reported, but I can't figure out > where.   I am using Ubuntu 12.04 in Virtualbox on my Mac, and I can't > build Sage because of MPIR.  Which ticket?  What's the workaround? http://groups.google.com/group/sage

[sage-devel] Re: Error in sage-5.0 + R: sage notebook does not show R parsing errors if length(input)>=1024 characters

2012-05-20 Thread Nils Bruin
On May 20, 7:12 am, Maciek Sykulski wrote: > Hi All, > > I've compiled from source sage-5.0 on Gentoo on the following machine: > Linux 3.2.6 #3 SMP Thu Feb 16 17:40:05 CET 2012 x86_64 Intel(R) > Xeon(R) CPU X5690 @ 3.47GHz GenuineIntel GNU/Linux > > Everything seems to work fine except for this:

[sage-devel] Re: Error in sage-5.0 + R: sage notebook does not show R parsing errors if length(input)>=1024 characters

2012-05-20 Thread Nils Bruin
As it turns out, experimentation is very easy: sage: Ri=R() sage: Ri.eval(("#1"**100+"\n")**10+"]") '' sage: Ri.eval(("#1"**100+"\n")**10+"]",allow_use_file=False) '\n\n\n\n\n\n\n\n\n\nError: unexpected \']\' in "]"' sage: Ri.eval(("#1"**100+"\n")**10+"]",split_lines=True) '\n\n\n\n\n\n\n\n\n\nErr

[sage-devel] sage mirror path?

2012-05-22 Thread Nils Bruin
this directory since Fri Apr 27 04:30:01 PDT 2012) Cheers, Nils -- 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/group/

[sage-devel] Re: echelonize sometimes fails

2012-05-29 Thread Nils Bruin
On May 29, 7:29 am, Emil wrote: > On 29 May 2012 15:21, William Stein wrote: > > > Can you give an example?  E.g., a matrix and a random seed? > > Not easily... If it is really necessary I can find the matrix that it > failed on. Although most of the time it works on this matrix... That would be

[sage-devel] Re: echelonize sometimes fails

2012-05-29 Thread Nils Bruin
On May 29, 12:11 pm, Emil wrote: > Thanks! I'm trying to reproduce it, but haven't been successful so far. > > But in the meantime, it does seem slightly unsatisfactory that > something with an obvious deterministic algorithm can fail for random > reasons. And that this has been observed in a real

[sage-devel] Re: trac's "report upstream" options

2012-05-31 Thread Nils Bruin
On May 31, 1:42 am, John Cremona wrote: > On trac there are various options in a drop-down menu under "Report > upstream", but no option for "Reported upstream, no response yet" > which I wanted to use for #13065.  It's not appropriate to tag it as > "little or no feedback" 5 seconds after sending

[sage-devel] Re: Sage (tm)

2012-05-31 Thread Nils Bruin
On May 31, 10:12 am, Jason Grout wrote: > +1 from me if it's very clear (in writing) that you can buy back the > trademark for the registration cost whenever you want. And perhaps you'd want that price recorded as soon as they're done doing the registration. Otherwise you might get a nasty surpri

[sage-devel] Is left_kernel_matrix missing intentionally?

2012-05-31 Thread Nils Bruin
I noticed that matrices do have a left_kernel method but not a left_kernel_matrix. Is that intentional? It seems that a right_kernel_matrix is the lowest overhead way of getting at a kernel of a matrix. Note that the row space of right_kernel_matrix is the kernel of interest, which is slightly unn

[sage-devel] Re: Scientific notation and integers

2012-06-01 Thread Nils Bruin
One reason to not interpret scientific notation as integers is to avoid unintended huge memory consumption. Most of the time, scientific notation is meant to denote floats: sage: 1e323228496 1.00e323228496 and if this is intended, interpreting the thing as an integer leads to nasty su

[sage-devel] Re: Linear Algebra thematic tutorial

2012-06-03 Thread Nils Bruin
On Jun 3, 10:03 am, John H Palmieri wrote: > As far as I understand it, there are two approaches to linear algebra in > Sage: the one you describe, and then "CombinatorialFreeModule". The latter > is good for working with the vector space spanned by symbols 'u', 'v', and > 'w', for example, or th

[sage-devel] Re: Linear Algebra thematic tutorial

2012-06-03 Thread Nils Bruin
On Jun 3, 10:03 am, John H Palmieri wrote: > I wish that these two approaches were more unified, or at least there were > good ways to convert between the two. There are CombinatorialFreeModule_with_category.element_class.to_vector and CombinatorialFreeModule.from_vector. You could build coercion

[sage-devel] Re: Linear Algebra thematic tutorial

2012-06-04 Thread Nils Bruin
On Jun 3, 12:58 pm, John H Palmieri wrote: > By the way, you can also define infinite-dimensional vector spaces this way. Ah, that probably explains why non-trivial linear algebra functionality is missing on this class. I don't think you can reasonably expect to do that on infinite dimensional ve

[sage-devel] Re: FreeModule basis coercion

2012-06-05 Thread Nils Bruin
On Jun 5, 5:31 am, Jan Pöschko wrote: > Maybe my conception of a free module is different then: In the sense > ofhttp://en.wikipedia.org/wiki/Free_module, I want an R-module M with > basis E ⊆ M, where R = ZZ and E is a set of vectors in RR^n. R is what I > refer to as "coefficient ring" (or "scal

[sage-devel] Re: Is left_kernel_matrix missing intentionally?

2012-06-05 Thread Nils Bruin
On Jun 5, 8:57 am, William Stein wrote: > REMARK:  Pari doesn't: > > ? matker([1,1;1,1]) > %3 = > [-1] > [1] > > That's a basis as columns. Interesting! On the other hand, from what I can tell from the Pari documentation, their matrices are stored by columns. So if sage mainly works with matrices

[sage-devel] Changing password on notebook server?

2012-06-06 Thread Nils Bruin
Can this be confirmed? - Log into a sage notebook - Change password Expected result: - happy computing with a new password Observed outcome "404 Not Found: The resource / cannot be found." Workaround -Quit browser -Start browser and reconnect -New password provides access. -- To pos

[sage-devel] Sage server port forwarding

2012-06-06 Thread Nils Bruin
As remarked on: http://wiki.sagemath.org/SageServer it's essentially impossible to safely run sage to natively listen on port 80 or port 443, because these are privileged ports and sage currently doesn't have convenient mechanisms to relinquish privileges after opening the port. The solution on

[sage-devel] Re: sage-5.0 serious bug: segfaults in basic linear algebra?

2012-06-07 Thread Nils Bruin
On Jun 7, 4:19 pm, William Stein wrote: > Hi Sage-Devel, > > I'm randomly running into segfaults when multiplying matrices over the > integers, in the course of doing basic modular symbols calculations. > For example, sometimes (but not always), this crashes: > > sage: M = ModularSymbols(389,sign=

[sage-devel] Re: Changing password on notebook server?

2012-06-07 Thread Nils Bruin
On Jun 7, 6:41 pm, Maarten Derickx wrote: > When I do it in sage5.0 using google chrome I get redirected to the login > page. What version of sage and which browser do you use? Firefox & Sage 5.0. There's something funny with that setup anyway -- sometimes, the logout button doesn't work, which i

[sage-devel] Re: Changing password on notebook server?

2012-06-07 Thread Nils Bruin
On Jun 7, 7:46 pm, Jason Grout wrote: > On 6/7/12 9:36 PM, Nils Bruin wrote: > > > Firefox&  Sage 5.0. > > Sage 5.0 with the included notebook? Or the new flask notebook (like > what is running on *.sagenb.org)? I'm not that adventurous. Stock Sage 5.0. -- To pos

[sage-devel] Re: Is left_kernel_matrix missing intentionally?

2012-06-07 Thread Nils Bruin
On Jun 7, 10:29 pm, Rob Beezer wrote: > I would be in favor of a right kernel matrix having its vectors as > columns.  It looks like this would save some transposes on the exit from > the actual routines doing the computations. That would be the *ONLY* reason. In general it seems that Sage vector

[sage-devel] Re: Trac is slow and now it's affecting patchbot

2012-06-13 Thread Nils Bruin
On Jun 13, 11:35 am, William Stein wrote: > For "fun", I just did > >    /etc/init.d/apache2 restart >    /etc/init.d/postgresql restart > > which might impact something... Has anyone checked trac's logs to see *why* trac is slow? With fully automated things like patchbots, it wouldn't surprise m

[sage-devel] Re: Proposed solution to Maxima precision problem

2012-06-14 Thread Nils Bruin
On Jun 13, 7:32 pm, rjf wrote: > If you want a Sage number X of n (binary) bits precision to be converted to > a Maxima bigfloat of n bits, > then you can do this. > First in Sage compute Xrat  which is an exact rational that is equal to X. > It could be computed > by something like  (some integer

[sage-devel] Re: Proposed solution to Maxima precision problem

2012-06-15 Thread Nils Bruin
On Jun 15, 2:04 am, Robert Bradshaw wrote: > Perhaps we could set ffprec to be the min of the input precisions > (plus a default, plus anything still in scope?) before doing any > operations. We don't really have a concept of scope, though. For the calculus use of maxima it might be doable, thoug

[sage-devel] Re: Bad interaction between differents types of integers in sage?

2012-06-24 Thread Nils Bruin
On Jun 24, 2:10 am, Volker Braun wrote: > On Sunday, June 24, 2012 9:45:34 AM UTC+1, Simon King wrote: > > > Shouldn't we rather duck typing? > > Ideally, yes. So an even better solution would be > > try: >      X = range(1,X+1) > except TypeError: >     pass Isn't that the wrong way around? The

[sage-devel] Re: "hg blame" with Sage versions?

2012-07-20 Thread Nils Bruin
On Thursday, July 19, 2012 12:10:35 PM UTC-7, Dan Drake wrote: > > Just a thought: it would be nice if we could somehow get "hg blame" to > annotate the file using Sage versions. Knowing that the line was changed > in changeset 17129 is useful, but what I *really* wanted to know was the > first

[sage-devel] Re: "hg blame" with Sage versions?

2012-07-20 Thread Nils Bruin
On Thursday, July 19, 2012 12:10:35 PM UTC-7, Dan Drake wrote: > Does this exist? Does it exist for git? > > I couldn't resist. It exists now. See attached (remove .txt extension). Usage: blamer -- -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from

[sage-devel] Re: "hg blame" with Sage versions?

2012-07-21 Thread Nils Bruin
My apologies. "latesttag" prints the latest tag that is an *ancestor* of the given revision, so it's the last release that *didn't* have that change. Of course, with mercurial having to deal with branching, that's the only direction in which relations are well-defined. For sage development, we want

[sage-devel] Re: "hg blame" with Sage versions?

2012-07-21 Thread Nils Bruin
On Jul 21, 12:39 pm, David Roe wrote: > Indeed, the following gives the same error: > roed$ hg log -r 'limit(descendants(14047) and tag(),1)' --template {tags} > hg: parse error at 24: unexpected token: end Odd ... that very line works fine for me, but not with mercurial 1.6.4 (shipped with sage

[sage-devel] Re: An example in Stein's "Three lectures..."

2012-07-25 Thread Nils Bruin
On Jul 25, 12:10 am, David Loeffler wrote: > The hard question is to compute a defining > polynomial for the splitting field of f, identify all the roots of f > as elements of that field, and determine each element of the Galois > group in terms of how it acts on a single generator of the splittin

[sage-devel] Interact slider with values vmin=0 vmax=2, stepsize=1 seems to have problems

2012-07-27 Thread Nils Bruin
work as expected as far as I've tested. If this a problem in firefox's javascript? Does it occur on other browsers? Does someone know a workaround? Cheers, Nils -- -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email

[sage-devel] Re: Interact slider with values vmin=0 vmax=2, stepsize=1 seems to have problems

2012-07-27 Thread Nils Bruin
OK, I figured it out myself. It is indeed a problem in how sliders are defined. See devel/sagenb/sagenb/notebook/interact.py line 3078 if num_steps <= 2: vals = [self.__vmin, self.__vmax] else: vals = srange(self.__vmin, self.__vmax, self.__

[sage-devel] Re: Interact slider with values vmin=0 vmax=2, stepsize=1 seems to have problems

2012-07-28 Thread Nils Bruin
On Jul 27, 8:45 pm, Jason Grout wrote: > To format a "patch", log into github, go to the > file:https://github.com/sagemath/sagenb/blob/master/sagenb/notebook/intera... > > Click on "edit in the upper right of the file listing > > Make the change in the browser editor, then click "Submit pull req

[sage-devel] Re: Documenting Factory Functions (RE trac #13282)

2012-07-30 Thread Nils Bruin
On Jul 30, 9:02 am, samgonshaw wrote: > Say I wrote a suite of functions and made them available through a factory > class such as: > > {{{ > class MyFunctions(): >     def FunctionA(self,*args,**kwargs): >         ... >     def Functionb(self,*args,**kwargs): >         ... >     def FunctionC(sel

[sage-devel] Re: Documenting Factory Functions (RE trac #13282)

2012-07-30 Thread Nils Bruin
On Jul 30, 12:06 pm, Rob Beezer wrote: > Then the thing to do would be to write > > my_functions = No, I would think that the module should appear exactly in the spot where you want the names imported. "import my_functions" would be the appropriate thing to do, unless there is some architectural

[sage-devel] Alternative to DATA on a notebook with separate worker accounts?

2012-08-02 Thread Nils Bruin
I noticed that on more "public" notebooks, where the sage worker processes run under a different UID than the notebook server, there is a problem that "DATA" is generally not writable by the worker. That means that, for instance for profiling, the command cProfile.run(cmd, DATA + "profdata") will

[sage-devel] Re: Alternative to DATA on a notebook with separate worker accounts?

2012-08-02 Thread Nils Bruin
On Aug 2, 7:43 pm, William Stein wrote: > If the data is ephemeral, you could use the tempfile module. Thanks! excellent suggestion. For future reference: If you do: import tempfile F=tempfile.NamedTemporaryFile() then you have a usable (existing) filename F.name Beware that once the referenc

[sage-devel] Re: Alternative to DATA on a notebook with separate worker accounts?

2012-08-02 Thread Nils Bruin
On Aug 2, 4:58 pm, I wrote: > cProfile.run(cmd, DATA + "profdata") For future reference, my next command was going to be s=pstats.Stats(DATA +"profdata") in which case one can avoid using the temporary file altogether by doing import cProfile,pstats s=pstats.Stats(cProfile.Profile().run(cmd))

[sage-devel] Re: feature suggestion: decorator to convert python function to symbolic function

2012-08-05 Thread Nils Bruin
On Aug 5, 10:28 am, Timo Kluck wrote: > Sorry, I didn't realize that. Here's the code. > > --- > def symbolic_function(variables, *args, **kwds): >     def result(f): >         def evalf_func(self,x,parent=None): >             if parent == None: >                 return f(x) >             else: >

[sage-devel] Notebook for code development

2012-08-09 Thread Nils Bruin
Short version: Given that there is already an editor widget with the sage notebook, perhaps it's easy to make a "open in a dedicated editor widget that remains open" option? Motivation: While the notebook works excellently for smaller experiments, its use gets painful for testing and editing a c

[sage-devel] Re: Notebook for code development

2012-08-09 Thread Nils Bruin
On Aug 9, 10:56 am, Volker Braun wrote: > First of all, if you want to edit a html textarea in your favourite editor > then you can do that already with browser extensions. Interesting ... How would that trigger saving of the code, though? Do you propose an extension that communicates with an edi

[sage-devel] Re: Notebook for code development

2012-08-09 Thread Nils Bruin
On Aug 9, 11:27 am, Andrea Lazzarotto wrote: > Are you referring to 10 years old students? OK, the main problem is I don't know what browser extension would do the trick with which editor, so I wouldn't know how difficult it would be to get working for myself, let alone how difficult it would be

[sage-devel] Re: Notebook for code development

2012-08-09 Thread Nils Bruin
On Aug 9, 11:19 am, Nils Bruin wrote: > Absolutely. My inquiry is much more modest, though: Can we have, next > to the "save" and "cancel" button above the editor, also a "tear-off" > or "open in separate editor window" option? Even more modes

[sage-devel] Re: Notebook for code development

2012-08-09 Thread Nils Bruin
On Aug 9, 12:43 pm, I wrote: > Even more modestly, a "save and keep editing" button. ... which is exactly what the save and cancel buttons seem to do on the flask sagenb on sagenb.org. Sigh ... time to upgrade, I guess. Only gripes remaining: * Let the editor frame be tall enough to display all l

[sage-devel] Re: Notebook for code development

2012-08-09 Thread Nils Bruin
On Aug 9, 10:56 am, Volker Braun wrote: > First of all, if you want to edit a html textarea in your favourite editor > then you can do that already with browser extensions. Yes, you can! "It's all text" for firefox seems to do a pretty good job. It keeps watching the file it uses to give the text

[sage-devel] Memory leak for matrix operations over QQ

2012-08-13 Thread Nils Bruin
If you run the following code, you'll see your memory usage steadily go up: alg='default' n,m=10,22 B=20 while True: _=matrix(QQ,n,m,[randint(-B,B)/randint(1,B) for i in range(n*m)]).echelon_form(alg) The same happens with alg='padic' and alg='multimodular' (I think the latter amounts to the

[sage-devel] Re: Memory leak for matrix operations over QQ

2012-08-13 Thread Nils Bruin
It looks there is quite some work on this: http://trac.sagemath.org/sage_trac/ticket/12215 http://trac.sagemath.org/sage_trac/ticket/11521 http://trac.sagemath.org/sage_trac/ticket/715 http://trac.sagemath.org/sage_trac/ticket/12313 Let me know if there is something I can help with to move this a

[sage-devel] Re: Memory leak for matrix operations over QQ

2012-08-14 Thread Nils Bruin
epeated rebasing. Cheers, Nils -- -- 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/group/sage-devel URL: http://www.sagemath.org

[sage-devel] Re: Memory leak for matrix operations over QQ

2012-08-14 Thread Nils Bruin
On Aug 14, 2:07 am, Simon King wrote: > #12215, #11521 and #12313 need review, #715 has a positive review but > depends on #11521. Do these patches solve the memory leak you observed? No they don't! I'm surprised. There is apparently yet something else that keeps these objects alive. I've tried

[sage-devel] Re: Memory leak for matrix operations over QQ

2012-08-14 Thread Nils Bruin
Continuing ... I think the patches made some difference. Previously, I saw a bunch of MatrixSpaces on the heap and they seem to have disappeared. However, there are a whole bunch of IntegerModRings still around. A very conspicuous structure is an ordinary dictionary that has IntegerModRings as keys

[sage-devel] Re: Memory leak for matrix operations over QQ

2012-08-14 Thread Nils Bruin
Interesting data point: The echelonization isn't important. It's the creation of a non-square matrix space that seems to cement the integermodring in memory. This has the same effect as before (you can get the object L[0] as above) import gc, collections import sage.matrix.matrix_space as matrix_s

[sage-devel] Re: Memory leak for matrix operations over QQ

2012-08-15 Thread Nils Bruin
> #The mysterious object is now L[0] and the next line shows that it > doesn't really have a reference (the only one being the list L which > we have just created) I think I have identified this mysterious object. I think it's sage/rings/ring.pyx:1926 cdef dict _is_Field_cache = {} as introduce

[sage-devel] Re: Memory leak for matrix operations over QQ

2012-08-15 Thread Nils Bruin
On Aug 15, 5:48 am, Simon King wrote: > Anyway, I'd be glad if someone could review #715, #11521, #12313 and > #13370... I'm trying! In the process, I think I might have found a useful debugtool. In sage.structure.coerce_dict, I have added: cpdef refcache(): """ for debug reasons only! A

[sage-devel] Tuning rational echelon form

2012-08-27 Thread Nils Bruin
The following might be of interest On sage 5.3b2: sage: timeit('matrix(QQ,10,10,srange(100)).echelonize()') 125 loops, best of 3: 2.19 ms per loop sage: timeit('matrix(QQ,10,10,srange(100)).echelonize("classical")') 625 loops, best of 3: 206 µs per loop sage: timeit('matrix(QQ, 10,10,srange(100))

[sage-devel] Re: Tuning rational echelon form

2012-08-27 Thread Nils Bruin
On Aug 27, 2:29 pm, Volker Braun wrote: > Before even starting to benchmark echelon forms one would have to fix > > http://trac.sagemath.org/sage_trac/ticket/12359 > That's for HNF, though. Getting row echelon form over QQ is easier (or at least doesn't require HNF) and I think all implementations

[sage-devel] Re: Tuning rational echelon form

2012-08-27 Thread Nils Bruin
On Aug 27, 6:23 pm, Volker Braun wrote: > I don't believe that. The recursion limit is exceeded with the sample > matrix from the ticket for both M.echelonize() and M.hermite_form(). So > likely thats the same bug. Try MQ=M.change_ring(QQ) MQ.echelon_form() They're different algorithms computin

[sage-devel] Re: creating a local patch

2012-08-30 Thread Nils Bruin
On Aug 30, 9:54 am, Simon King wrote: >    Do "hg qimport /path/to/my.patch" >  * The previous command was importing the patch, but not *applying* it. >    Hence, do "hg qpush" >  * Rebuild your new Sage version ("../../sage -br" or so) I found the abbreviation hg qimport -P ... to combine the

[sage-devel] Re: Need developer account on OSX 10.4 PPC (or remove from supported platforms)

2012-09-04 Thread Nils Bruin
On Sep 4, 12:00 pm, William Stein wrote: > Remark:  I was about to suggest a VPN too. As a first approximation you could just use ssh remote port forwarding. If your mac is happy to accept ssh connections on localhost then you can forward, say, sage.math.washington.edu:1 to your mac's lcoalho

[sage-devel] Re: Can we teach the doctesting framework to check EINTR and retry?

2012-09-06 Thread Nils Bruin
On Sep 6, 9:00 am, Simon King wrote: > sage: oddprime_factors.precompute(range(1,100), 4) > [Errno 4] Interrupted system call [...] > Since precompute() launches a parallel computation, I could imagine that > the interrupted system call is related with that. But I am no expert. OK, you're ending

<    1   2   3   4   5   6   7   8   9   10   >