[sage-devel] Re: FLINT 1.0.17 released
On Nov 29, 4:03 pm, Bill Hart [EMAIL PROTECTED] wrote: Hi Bill, I have just released a new bug fix for FLINT, available athttp://www.flintlib.org/ This fixes the following issues: * A segfault in the division and pseudo division functions * The bound that was being used in fmpz_poly_gcd_modular was as far as I know, not proven. I have replaced it with a proven bound and cited the relevant paper. This makes little difference to the timings. * A bug in the profiling code for fmpz_poly related to the top bit of n bit random coefficients always being set has been fixed. * I identified an issue that might potentially have caused wrong results in polynomial multiplication. However I checked that in fact, it cannot be triggered in FLINT 1.0.17 code (I also ran specifically constructed tests to verify that this is in fact the case). The code will be completely rewritten for FLINT 1.1. I recommend Sage upgrade to FLINT 1.0.17 as the first bug is critical and can occur in live code (I actually hit it myself). Ok, Burcin did an updated spkg for FLINT 1.0.16, but it should be trivial for him to upgrade it to 1.0.17. It will miss the 3.2.1 merge window, but a quick 3.2.2 is right on its tail. FLINT 1.0.17 will likely be the last 1.0.x series release before FLINT 1.1 which should be available for use in Sage in the next few weeks. The interface for FLINT 1.1 should be pretty much the same as for FLINT 1.0.x, however there will be a large quantity of new functions and a large number of substantial speedups which Sage will be able to take advantage of. I intend to issue beta/release candidates in about 11 days. The todo.txt file in FLINT 1.0.17 lists the tasks which need to be completed before the release. Over the next few days I will be working on code which will appear in FLINT 2.0, specifically a matrix module F_mpz_mat over the new F_mpz integer library I have coded up for FLINT 2.0 and an F_mpz implementation of fpLLL's fast module. I am about a third of the way through implementation of F_mpz_poly for FLINT 2.0. It features a completely rewritten polynomial module over the new FLINT integer format F_mpz and David Harvey's KS2 algorithm, which gives *up to* a 30% increase in speed for polynomial multiplication for lengths between about 45 and 9000. Nice, *really* looking forward to this :) Bill. Cheers, Michael --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-devel] Re: SageAndLinux
On Nov 30, 12:38 am, William Stein [EMAIL PROTECTED] wrote: We could make a modified version of AndLinux and rebrand it say SageLinux, which would be the above but with Sage preinstalled, and maybe a slightly larger drive. For me, this sounds good and seems to be a better solution than the vmware image. One big point is accessing sage notebook files, i hope that's easier. There should also be a dedicated start button in the andLinux menu and perhaps even a regular start menu entry (if it is possible to start something inside andlinux from the outside).Then, packaging this as an MSI package would be very attractive, too. Note, I don't think you can do any of this on a 64-bit windows box. Im not so familiar with all the windows details, but isn't it possible to modify the startup conditions for programs? run as or something. Or has this no effect for 32 vs. 64? harald --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-devel] Re: SageAndLinux
On Nov 30, 1:59 am, Harald Schilly [EMAIL PROTECTED] wrote: On Nov 30, 12:38 am, William Stein [EMAIL PROTECTED] wrote: We could make a modified version of AndLinux and rebrand it say SageLinux, which would be the above but with Sage preinstalled, and maybe a slightly larger drive. For me, this sounds good and seems to be a better solution than the vmware image. One big point is accessing sage notebook files, i hope that's easier. There should also be a dedicated start button in the andLinux menu and perhaps even a regular start menu entry (if it is possible to start something inside andlinux from the outside).Then, packaging this as an MSI package would be very attractive, too. Yep, that would be nice. Note, I don't think you can do any of this on a 64-bit windows box. Im not so familiar with all the windows details, but isn't it possible to modify the startup conditions for programs? run as or something. Or has this no effect for 32 vs. 64? I think the issue here is that with a 64 bit kernel you need 100% 64 kit drivers and since coLinux provides drivers that are (were?) 32 bits only it won't work. RunAs has nothing to do with that. harald Cheers, Michael --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-devel] recommended method to extend sage classes
What is the recommended way to extend sage classes? - I want to add some functionality to the complex matrix class - specifically tests for: is_symmetric, is_hermitian, is_unitary etc... you get the idea. I have experienced and read that this is not so straightforward. I guess I could do it by delegation but that's a bit naff given the power of the python object system. -- simon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sage-devel group. To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel?hl=en -~--~~~~--~~--~--~---
[sage-devel] extending Sage concerning boolean functions
Hi, I'm a student in my final year of civil engineering and doing a thesis concerning Sage and cryptography. As a part of my thesis I would like to extend Sage and it's capabilities concerning boolean functions. Right now I'm looking into making some representations available (truth table, ANF, Walsh Transform, Trace representation ...) and the properties which can be derived from those representations (correlation immunity, linearity, ...). Conversion between the different representations should also be possible. Basicly, I'm thinking about providing different objects for the different representations (if I'm not mistaken, the BooleanPolynomial in Sage looks like ANF representation) and accompanying methods for getting the properties and providing a conversion interface. I'm still planning on how to do it exactly but I was wondering if there have been discussions about this in the past or if someone else is working on or interested in the same subject. Christophe --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-devel] Re: recommended method to extend sage classes
By extend a Sage class it seems you mean add a method to a Sage class. You want to know how to add a method to the class matrix_complex_double_dense.pyx at http://www.sagemath.org/hg/sage-main/file/8b1d19463fc4/sage/matrix/matrix_complex_double_dense.pyx ? (If you want to license it under the GPLv2+ and don't know how to submit it to Sage as a contribution, that is a separate question.) What is really confusing me is that the docstring for matrix_complex_double_dense.pyx (presumably *complex* matrices) is more or less the same as the docstring for matrix_real_double_dense.pyx at http://www.sagemath.org/hg/sage-main/file/8b1d19463fc4/sage/matrix/matrix_real_double_dense.pyx In other words, there are no examples of *complex* matrices in the docstring for matrix_complex_double_dense.pyx, which seems odd. Getting back to your question, matrix_double_dense.pyx http://www.sagemath.org/hg/sage-main/file/8b1d19463fc4/sage/matrix/matrix_double_dense.pyx does have an is_symmetric method, which maybe could be modified for the purpose you state? +++ On Sun, Nov 30, 2008 at 8:01 AM, Simon Beaumont [EMAIL PROTECTED] wrote: What is the recommended way to extend sage classes? - I want to add some functionality to the complex matrix class - specifically tests for: is_symmetric, is_hermitian, is_unitary etc... you get the idea. I have experienced and read that this is not so straightforward. I guess I could do it by delegation but that's a bit naff given the power of the python object system. -- simon --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-devel] Re: recommended method to extend sage classes
Thanks David, Yes extend by inheriting (and adding methods using the functionality of the parent) is what I meant. I think that gives me enough to get the job done... I'm sure the is_symmetric method is usable as is - I just didn't spot it. Cheers, Simon On Nov 30, 1:55 pm, David Joyner [EMAIL PROTECTED] wrote: By extend a Sage class it seems you mean add a method to a Sage class. You want to know how to add a method to the class matrix_complex_double_dense.pyx athttp://www.sagemath.org/hg/sage-main/file/8b1d19463fc4/sage/matrix/ma... ? (If you want to license it under the GPLv2+ and don't know how to submit it to Sage as a contribution, that is a separate question.) What is really confusing me is that the docstring for matrix_complex_double_dense.pyx (presumably *complex* matrices) is more or less the same as the docstring for matrix_real_double_dense.pyx athttp://www.sagemath.org/hg/sage-main/file/8b1d19463fc4/sage/matrix/ma... In other words, there are no examples of *complex* matrices in the docstring for matrix_complex_double_dense.pyx, which seems odd. Getting back to your question, matrix_double_dense.pyxhttp://www.sagemath.org/hg/sage-main/file/8b1d19463fc4/sage/matrix/ma... does have an is_symmetric method, which maybe could be modified for the purpose you state? +++ On Sun, Nov 30, 2008 at 8:01 AM, Simon Beaumont [EMAIL PROTECTED] wrote: What is the recommended way to extend sage classes? - I want to add some functionality to the complex matrix class - specifically tests for: is_symmetric, is_hermitian, is_unitary etc... you get the idea. I have experienced and read that this is not so straightforward. I guess I could do it by delegation but that's a bit naff given the power of the python object system. -- simon --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-devel] plot3d problem - stalled in maxima
I saw similar tickets, now closed, but the problem remains in version 3.2: x,y=var(x y) plot3d(x^2-y^2, (-1,1),(-1,1)) There must be something wrong in the function sage.plot.plot3d.parametric_plot3d.adapt_to_callable My crude fix was: try: try: if len(f): s = sum(f) # get common universe except TypeError: s=f instead of original code at the beginning of mentioned function: try: s = sum(f) # get common universe ... I know, this is probably not the right fix, but maybe, it can drive someone with deeper knowledge of code in the right direction. Michal --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-devel] Re: plot3d problem - stalled in maxima
Since sage: x,y = var(x y) sage: plot3d(x^2-y^2, (x,-1,1),(y,-1,1)) works fine, why not just use variables sage: f = x^2-y^2 sage: f.variables() (x, y) to find the missing variables in plot3d(x^2-y^2, (-1,1),(-1,1)) and then replace the arguments (-1,1),(-1,1) by (x,-1,1),(y,-1,1) in plot3d.parametric_plot3d? Am I missing something? On Sun, Nov 30, 2008 at 11:35 AM, mikeslov [EMAIL PROTECTED] wrote: I saw similar tickets, now closed, but the problem remains in version 3.2: x,y=var(x y) plot3d(x^2-y^2, (-1,1),(-1,1)) There must be something wrong in the function sage.plot.plot3d.parametric_plot3d.adapt_to_callable My crude fix was: try: try: if len(f): s = sum(f) # get common universe except TypeError: s=f instead of original code at the beginning of mentioned function: try: s = sum(f) # get common universe ... I know, this is probably not the right fix, but maybe, it can drive someone with deeper knowledge of code in the right direction. Michal --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-devel] name space pollution
Michael Abshoff wrote in the comments to trac ticket #4653: one issue that might be worth considering now before merging is name space pollution, i.e. there was some discussion at SD 11 that it would be better to have most of the functionality of certain packages like quadratic forms not in the global namespace. I am not sure what the situation with words is (sorry, no time to apply the patch and play :)), but it would be nice if most of the functionality would be in words.$FOO Sooner or later things will start colliding in the global namespace, so the time to fix this would be pre-merge :) I like this idea for several reasons, but it is something that needs to be discussed since there should be a consistent way to do this across all Sage packages/libraries. So let's discuss it. What is the best way to do this? (I wasn't at Sage Days 11, so I don't know what was decided.) One thing that comes to mind, from a user's perspective, is that there should be a consistent way to load all functions from a given package into the global name space. Something like: LoadPackage(words) or from words import * I prefer the latter, actually. Another related issue, perhaps this should be a different thread, is pre-defined examples of objects. I am going to use graphs to illustrate what I mean here. One can write, for example, sage: graphs.CompleteGraph(5) Complete graph: Graph on 3 vertices But there are other objects lying around in the global name space which should probably be access by such interface. And this should also be consistent across Sage. Is graphs a suitable name for this? Should it be something like GraphExamples or GraphConstructor or something else instead? One problem with the name graphs is that some sage-combinat developer is going to come along and define the combinatorial class of all graphs and name it Graphs. Then graphs and Graphs might have different behaviour unless one allows something like this: sage: Graphs(3) Graphs on 3 vertices sage: Graphs.CompleteGraph(5) Complete graph: Graph on 3 vertices Thoughts/comments? Franco -- --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-devel] Re: SageAndLinux
On Sun, Nov 30, 2008 at 2:43 AM, mabshoff [EMAIL PROTECTED] wrote: On Nov 30, 1:59 am, Harald Schilly [EMAIL PROTECTED] wrote: On Nov 30, 12:38 am, William Stein [EMAIL PROTECTED] wrote: We could make a modified version of AndLinux and rebrand it say SageLinux, which would be the above but with Sage preinstalled, and maybe a slightly larger drive. For me, this sounds good and seems to be a better solution than the vmware image. One big point is accessing sage notebook files, i hope that's easier. Yes, that could be made much easier. The $HOME/.sage directory could instead by in Program Files of My Documents, and all normal Windows files would be accessible to Sage directly. There should also be a dedicated start button in the andLinux menu and perhaps even a regular start menu entry (if it is possible to start something inside andlinux from the outside).Then, packaging this as an MSI package would be very attractive, too. Yep, that would be nice. Yes, I think it would be possible to make it a start menu entry, at least for somebody who knows about how to do that sort of thing in Windows. Note, I don't think you can do any of this on a 64-bit windows box. Im not so familiar with all the windows details, but isn't it possible to modify the startup conditions for programs? run as or something. Or has this no effect for 32 vs. 64? I think the issue here is that with a 64 bit kernel you need 100% 64 kit drivers and since coLinux provides drivers that are (were?) 32 bits only it won't work. RunAs has nothing to do with that. harald Cheers, Michael -- William Stein Associate Professor of Mathematics University of Washington http://wstein.org --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-devel] Final Sage 3.2.1.rc1 bug fixing effort today
Hello folks, over the next couple hours we hope to fix and merge all nine outstanding issues for 3.2.1 - see http://trac.sagemath.org/sage_trac/query?status=newstatus=assignedstatus=reopenedmilestone=sage-3.2.1order=priority So feel free to pop into IRC and help out if you have some time. We ended up merging some larger patches than I had planned, but all of them are low risk (famous last works) and would have bit rotted quickly. Cheers, Michael --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-devel] Re: name space pollution
On Sun, Nov 30, 2008 at 9:22 AM, Franco Saliola [EMAIL PROTECTED] wrote: Michael Abshoff wrote in the comments to trac ticket #4653: one issue that might be worth considering now before merging is name space pollution, i.e. there was some discussion at SD 11 that it would be better to have most of the functionality of certain packages like quadratic forms not in the global namespace. I am not sure what the situation with words is (sorry, no time to apply the patch and play :)), but it would be nice if most of the functionality would be in words.$FOO Sooner or later things will start colliding in the global namespace, so the time to fix this would be pre-merge :) I like this idea for several reasons, but it is something that needs to be discussed since there should be a consistent way to do this across all Sage packages/libraries. So let's discuss it. What is the best way to do this? (I wasn't at Sage Days 11, so I don't know what was decided.) One thing that comes to mind, from a user's perspective, is that there should be a consistent way to load all functions from a given package into the global name space. Something like: LoadPackage(words) or from words import * I prefer the latter, actually. Another related issue, perhaps this should be a different thread, is pre-defined examples of objects. I am going to use graphs to illustrate what I mean here. One can write, for example, sage: graphs.CompleteGraph(5) Complete graph: Graph on 3 vertices But there are other objects lying around in the global name space which should probably be access by such interface. And this should also be consistent across Sage. Is graphs a suitable name for this? Should it be something like GraphExamples or GraphConstructor or something else instead? One problem with the name graphs is that some sage-combinat developer is going to come along and define the combinatorial class of all graphs and name it Graphs. Then graphs and Graphs might have different behaviour unless one allows something like this: sage: Graphs(3) Graphs on 3 vertices sage: Graphs.CompleteGraph(5) Complete graph: Graph on 3 vertices Thoughts/comments? I really like sage: finance.[tab] I don't like explicitly forcing people to import stuff before they can use it at all. Thus I much prefer $ sage sage: finance.[tab] and I don't like $ sage ... sage: import sage.finance as finance sage: finace.[tab] I do like various domains with lots of functions to have their functionality gathered together under a namespace. That said, I'm not for some massive reorganization of the current global namespace, since that wold break a huge amount of existing code -- both in Sage and out (e.g., the examples at wiki.sagemath.org/interact). And it's not the end of the world that len(globals()) is large. It's only a problem to me when there are specific reasons it is a problem. -- William --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-devel] Re: name space pollution
SNIP I really like sage: finance.[tab] I don't like explicitly forcing people to import stuff before they can use it at all. Thus I much prefer $ sage sage: finance.[tab] and I don't like $ sage ... sage: import sage.finance as finance sage: finace.[tab] I do like various domains with lots of functions to have their functionality gathered together under a namespace. That said, I'm not for some massive reorganization of the current global namespace, since that wold break a huge amount of existing code -- both in Sage and out (e.g., the examples at wiki.sagemath.org/interact). And it's not the end of the world that len(globals()) is large. It's only a problem to me when there are specific reasons it is a problem. -- William Ok, that is pretty much what I wanted to express, i.e. having most things of a given subsystem gathered under $SUBSYSTEM.[tab]. I did not mean that one would have to import things, so my use of global namespace was not in the pythonic way. Cheers, Michael --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-devel] Expected value of probability space
I've been experimenting with probability and found that in Sage, a probability space is also a random variable by inheritance. This may be useful. Without it, creating a random variable requires two classes: a probability space and a random variable on that probability space. Unfortunately, the random variable doesn't work like I expected. For example: sage: ps = DiscreteProbabilitySpace([1,2,3],{1:1/3,2:1/3,3:1/3}) sage: ps.expectation() 0.333 (I expected 2.00) I've prepared a patch that gives me the value I'd expect, but I'd like to make sure this is the proper behavior. -- Paul --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~--~~~~--~~--~--~---