Re: [sage-devel] test Flask-based notebook

2011-02-08 Thread didier deshommes
On Mon, Feb 7, 2011 at 3:27 PM, Jason Grout  wrote:
> It would also be very interesting to see if this code is more scalable than
> the current notebook.  For example, I wonder if running this flask-based

This is somewhat off-topic, but has anyone considered celery for
executing computation-heavy tasks?
http://ask.github.com/celery/getting-started/introduction.html . The
idea is to send "jobs/tasks" to a remote server that does the grunt
work and retrieve the result later ( possibly from a db) when it is
available. One obvious use case is when you don't want a web page to
"hang" even if you're doing something cpu/db-heavy on the server (e.g.
deleting/updating millions of entries in a database). Scaling this
straightforward: just add another machine itself running celery too.

didier

-- 
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


Re: [sage-devel] test Flask-based notebook

2011-02-07 Thread didier deshommes
On Mon, Feb 7, 2011 at 3:27 PM, Jason Grout  wrote:
> It would also be very interesting to see if this code is more scalable than
> the current notebook.  For example, I wonder if running this flask-based
> notebook on top of, say, nginx using uwsgi, would scale better?  It would
> also be interesting to see if changing our polling strategy to long-polling
> would help (I don't think we long-poll currently, do we? See
> http://en.wikipedia.org/wiki/Push_technology for a definition of
> long-polling).

Keep in mind that if you are using long-polling techniques you cannot
use servers that adhere to the  WSGI standard, since it's not part of
it. uwsgi has some experimental support for asynchronous operations
but you must know what you're doing:
http://projects.unbit.it/uwsgi/wiki/AsyncSupport .

didier

>
> Of course, back up your worksheets before doing this, or start the notebook
> with a different notebook directory.
>
> Thanks,
>
> Jason
>
> --
> 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
>

-- 
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: include a simplejson spkg?

2009-06-02 Thread didier deshommes

On Tue, Jun 2, 2009 at 1:40 AM, Dan Drake  wrote:
> The patches at #5564 need a json encoder, and there's a ticket to
> include simplejson at #1510. I'd like to get this spkg in, but there are
> some comments on that ticket about pickling. I don't know enough of the
> details, so I thought I would ask if:
>
>  * we need to patch the simplejson source to support serialization of
>    Sage objects, or if
>  * we can use simplejson without alteration.

I think you have to define dump(), and save() method for custom
classes. There is a way to do it here (from the py2.6 docs):
http://docs.python.org/library/json.html

You basically have to subclass JSONEncoder/Decoder.

didier

>
> As it stands, this spkg is holding up some the patches at #5564 which
> improve UTF-8 handling in the notebook, so it would be very helpful to
> have it included as a standard spkg. Note that Python 2.6 includes a
> JSON module by default, so we might have to deal with these issues
> sooner or later anyway.
>
> Dan
>
> --
> ---  Dan Drake 
> -  KAIST Department of Mathematical Sciences
> ---  http://mathsci.kaist.ac.kr/~drake
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkokuzoACgkQr4V8SljC5LqZZgCeKBRPIiw2YdqVgWkld1zblLb6
> sLMAn2YNyQOy9rQ/FU2YRHQoMiF8tK67
> =CjvG
> -END PGP SIGNATURE-
>
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Cardinality of a set...

2009-02-25 Thread didier deshommes

+1 for s.card() but I would suggest also making s.cardinality() an
alias for it.

didier

On Wed, Feb 25, 2009 at 5:43 PM, Florent Hivert
 wrote:
>
>      Dear All,
>
> We working in combinat have a problem of naming convention which is likely to
> concern everyone in sage. As you can guess, in combinatorics we like to count
> sets an iterate through them. So we designed some objects called for now
> CombinatorialClass which represent a finite or countable set sorted in a
> particular order (eg the permutations of 4 in the lexicographic order). Such a
> set can be counted and iterated through.
>
> My question is the following: we are looking for a good name for the method
> which returns the number of element of a set S.
>
> Note that we will widely implement this method for sets which can be of any
> combinatorial use, including for example the sets of natural numbers N, the
> finite rings and fields Z/pZ, any finite groups. So we want the name to be
> consistent through all sage.
>
> Until now we use len(S) but this is bad because in python specification
> __len__ must returns a python int, whereas we want to have an arbitrary large
> integer and even +infinity:
>
>   object.__len__(self)
>      Called to implement the built-in function len(). Should return the
>      length of the object, an integer >= 0.
>
> We were going to use s.count() until someone pointed out than there is a
> collision with a standard python methods for list.
>
>   s.count(x)
>      return number of i‘s for which s[i] == x
>
> Other suggestion are:
>  - s.length() : this is more ore less coherent with data structures but
> seems to me to be too far from the mathematical thinking;
>  - s.cardinality() : we don't like it because this is too long. Remember that
> we will type it every two lines;
>  - s.card() is currently my favorite...
>
> Sorry for asking a question and giving at the same time my opinion. But I'd
> like this decision to be taken as soon as possible: there are a bunch of patch
> waiting only this answer...
>
> If you also have any suggestion for CombinatorialClass which was good in MuPAD
> when (object oriented) class where called domains but which is now too much
> confusing... Thanks for your help and comments.
>
> Cheers,
>
> Florent
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Windows Sage Project

2009-02-23 Thread didier deshommes

The link to the  windows binary seems light (64MB); which parts of
sage are included in it?

didier

On Mon, Feb 23, 2009 at 12:00 AM, William Stein  wrote:
>
> Hi Sage Devels, etc.
>
> I am getting very impatient about how slowly work on the Microsoft
> Windows Sage Project has been moving.  Thus I've started a new project
> to really move this forward and actually get something done.  I just
> put a day's work into it:
>
>  http://windows.sagemath.org/
>
> The goal is to make a first full stable useful release by May 22, 2009
> at Sage Days 15.
>
> If you are interested in helping, see the web page, download the
> newest zip file and start hacking.  If you have something useful to
> say, respond to this email and join the sage-windows mailing list.
>
> You will need Microsoft Visual Studio 2008, but they have a free
> 90-day trial here, and May 22, 2009 is about 90 days away:
>
>http://msdn.microsoft.com/en-us/vstudio/default.aspx
>
> I've done all my work on this so far using Windows XP installed into a
> VMware virtual machine on my OS X box.
>
> FAQ:
>
>  1. Is the "Windows Sage" project a bit different from the usual Sage?
>
>  Yes.   It is not a requirement that this be a direct port with
> identical functionality to OS X / Linux / Solaris Sage.  The
> requirement is that it be useful and provide a valuable service to the
> community.   Pulling this off may require some refactoring of the Sage
> library (especially the notebook and interfaces).
>
>  2. Will GPL3 be allowed in "Unix  Sage" but stripped out of "Windows Sage"?
>
> GPL3 components will *also* be allowed in Windows Sage.  The only
> requirement is that there will be a supported *version* of Sage that
> includes no (L)GPL3 components.
>
>  -- William
>
> --
> 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 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: The Spies Sage Development Prize

2008-10-10 Thread didier deshommes

On Fri, Oct 10, 2008 at 4:57 AM, William Stein <[EMAIL PROTECTED]> wrote:
> The first annual Spies Sage Development Prize is awarded to Michael Abshoff 
> for
> his superb work improving the overall quality of the sage development process,
> making numerous high quality Sage releases, leading the way in drastically
> reducing memory leaks in Sage, and porting Sage to run on Windows, Solaris
> and 64-bit OS X.
>
> Please join me in congratulating Michael Abshoff!  ([EMAIL PROTECTED])

This is well-deserved: Michael never seems to run out of steam:
merging patches, testing new builds, mercilessly hunting mem leaks and
being all-around helpful in irc. Congratulation!

didier

--~--~-~--~~~---~--~~
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: Proposal for Inclusion into Sage: Sphinx, Docutils, Pygments, and Jinja

2008-09-30 Thread didier deshommes

On Mon, Sep 29, 2008 at 7:16 PM, Mike Hansen <[EMAIL PROTECTED]> wrote:
> VOTE:
>  [ ] Yes, include these in Sage
>  [ ] No, do not (please explain)
>  [ ] Hmm, I have questions (please ask).

+1, and a question. As far as I know, pygments doesn't have
syntax-highlighting for pyrex files. If you wrote your own, it would
be nice if you could contribute back to the pygments project :)

see http://dev.pocoo.org/projects/pygments/ticket/359

didier

--~--~-~--~~~---~--~~
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: Proposal for inclusion of GINAC/pynac-0.1 in Sage.

2008-08-25 Thread didier deshommes

On Mon, Aug 25, 2008 at 4:59 AM, William Stein <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I propose that pynac be included in Sage.
>
> VOTE:
>  [ ] Yes, include Pynac in Sage
>  [ ] No, do not (please explain)
>  [ ] Hmm, I have questions (please ask).

I have a question: what will happen to gfurnish's work? Is it going to
be completely abandoned?

didier

--~--~-~--~~~---~--~~
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: xmaxima is built if you have tcl/tk!

2008-06-24 Thread didier deshommes

On Tue, Jun 24, 2008 at 8:32 AM, Michael Abshoff
<[EMAIL PROTECTED]> wrote:
> I am not sure if there is any harm if Maxima builds it. When woulds building
> xmaxima cause a problem?

I'm sure it doesn't; the issue is that sage builds something behind
your back, so you won't find it if you're not looking for it. Also,
the behavior is not consistent since this seems to depend the user's
machine (ie tk vs non-tk).

didier

--~--~-~--~~~---~--~~
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: lite.sagemath.org

2008-06-09 Thread didier deshommes

Why are sage developers missing from
http://lite.sagemath.org/development-ack.html ? Oh I see.. they're on
the dev map. Could there be an explicit link to this page from
http://lite.sagemath.org/development-ack.html ?

On Mon, Jun 9, 2008 at 12:25 PM, William Stein <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> So we're going to switch lite.sagemath.org to be the official
> sage website soon.  Could you take a quick glance at it
> and see if there is anything that is *horribly totally wrong*
> in your humble opinion.  If not, we'll be good to go.
> I'm not trying to solicit little nitpicks with this email, but
> trying to avoid major blunders.
>
>  --William
>
> --
> 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] Re: hg clone and symlinks...

2008-06-05 Thread didier deshommes

On Thu, Jun 5, 2008 at 2:36 PM, Glenn H Tarbox, PhD <[EMAIL PROTECTED]> wrote:
> So, I propose there's a misunderstanding of Hg and clone vs. branch.  I
> claim that branching is a trivial operation, switching between branches
> is fast, and that the entire point of DVCS is lost with the clone
> operation.

Yes, branching is trivial but I still prefer cloning. I've worked with
both methods of development (branch or clone) and I prefer cloning
because:
- I don't need to think which branch I'm working on at any given moment.
- I don't have worry about merging my changes back into main at some
point in time. I suspect this is more psychological than anything.

But then again, I found branching to be useful for moderate-to-massive
rewrites and the work I've done on sage has mainly been bug fixes
(which are mostly small-ish rewrites).

>
> P.S.  Below is a broader discussion of the issue...
>
> WARNING: its entirely up to you whether you wanna get into this... and
> DVCS wars easily exceed politics and religion in the emotions and
> vitriol generated.
>
> The DVCS battle is currently between hg, bzr and git with hg giving up
> ground to bzr... and git being git
>
>  opinion warning >>>
>
> IMHO, git is technically superior than the others but because Linus is
> such a "git" will likely not become mainstream... I personally believe
> there is a very intentional barrier to keep git users at the level of
> kernel hackers where folks pine for the day when you needed to be a hard
> core hacker to even dabble in linux... a cabal where only the anointed
> need apply.
>
> a shame, but such is life.

I think you are wrong about git not becoming mainstream. Git is being
made more and more popular and hip because of http://github.com . It's
a really impressive web app. This is the "killer app" for git, just as
the Launchpad is the "killer app" for bzr.  This is the kind of app
that Hg is missing and it's glaring.

On Thu, Jun 5, 2008 at 3:12 PM, William Stein <[EMAIL PROTECTED]> wrote:
> I was hoping you could write a little more about the sense in which you
> see that hg is giving up ground to bzr.  Are project switching from hg
> to bzr? Is this just a feature comparison?

My impression is that more new projects are being started in bzr
because of its nice integration with Launchpad.net.

didier

--~--~-~--~~~---~--~~
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: QEPCADB and Saclib released with BSD license

2008-05-22 Thread didier deshommes

On Thu, May 22, 2008 at 2:45 PM, Jason Grout
<[EMAIL PROTECTED]> wrote:
>  I've had someone send me a Mac OSX on x86 port, but I need access to
>  such a machine to try it out and make it part of the saclib distro.  I
>  have access to solaris-on-x86 boxes, so I may get that port going
>  eventually.  One known issue with qepcad on some linux distros that I
>  still haven't addressed is that on some systems that use GNU make as
>  their "make", there is no program called "gmake" on the system, and
>  Qepcad uses "gmake" explicitly.  I'll take care of that at some future

The make vs gmake distinction is only visible in non-Linux OSes, It
think. In Linux gmake is very often make, but things are different in
*BSD, Solaris, etc.

didier

--~--~-~--~~~---~--~~
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: Change the default base_ring for matrices from ZZ to QQ

2008-05-15 Thread didier deshommes

On Thu, May 15, 2008 at 10:48 AM, Jason Grout
<[EMAIL PROTECTED]> wrote:
>  More concisely, this proposal could be worded:
>
>  What do people think of making matrix() return a matrix over a field by
>  default, unless a ring is explicitly specified.  The default field would
>  either be the fraction field of the ring containing the specified
>  elements, or would be QQ if no elements are specified.  This logic would
>  *only* be applied if a ring is not specified.  The documentation of
>  matrix() would also be changed accordingly.

Just to make sure I get it:
matrix(1,1,[1]) and matrix(1,2,[Mod(23,4),23])  will be over QQ

To me it looks like the *only* change from the current beahavior will
be that the matrices above  will be over QQ, instead of over ZZ or a
generic ring. What other cases am I missing?

didier

--~--~-~--~~~---~--~~
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: time for cloning

2008-05-07 Thread didier deshommes

On Wed, May 7, 2008 at 2:27 PM, Nick Alexander <[EMAIL PROTECTED]> wrote:
>  > I just installed a fresh copy of Sage on my Mac and ran 'sage -clone
>  > blah', and it took almost 15 minutes to complete. Running 'sage -clone
>  > temp' a second time took just over one minute.  Neither of these, and
>  > especially not the first one, is "about 30 seconds".
>
>  Cloning a repository is limited by your disk's throughput and
>  latency.  Your second run is working with a primed disk cache -- this
>  says a lot about your disk's random access :)

Are you using a binary  install, or did you build from source? If
you're using a binary install of sage, cloning for the first time
rebuilds the entire sage library on top of cloning it. The subsequent
ones are much faster though.

didier
>
>
>  > This is on a 2.4 GHz Mac Book Pro.
>
>  I have a similar machine and cloning is reasonably snappy.  I had an
>  older Powerbook and the disk was ridiculously slow.
>
>  You might find mercurial queues lets you work with fewer clones.
>
>  Nick
>
>
>
>  >
>

--~--~-~--~~~---~--~~
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: Computing large Bernoulli numbers

2008-05-02 Thread didier deshommes

Here is some more information about the machine used to compute this:

-- Forwarded message --
From: Oleksandr Pavlyk <[EMAIL PROTECTED]>
Date: Fri, May 2, 2008 at 4:29 PM
Subject: Re: Today We Broke the Bernoulli Record: From the Analytical
Engine to Mathematica
To: didier deshommes <[EMAIL PROTECTED]>


Hi Didier,

 I used Linux, with 64 bit AMD processor:

 AMD Opteron(tm) Processor 250
 cpu MHz : 1000.000
 cache size  : 1024 KB

 and 8GB of memory, but as I say in the blog, I did
 not use that much.

 The calculations were done using development build of
 Mathematica, but calculations will go through in any
 flavor of Mathematica version  6 as well, to the best of
 my knowledge.  Just run

 Timing[ result = BernoulliB[10^7]; ]

 It will take about twice longer on 32-bit processors,
 thus about 2 weeks.

 Please do not hesitate to ask further questions.

 Sincerely,
 Oleksandr Pavlyk



 On Fri, May 2, 2008 at 2:12 PM, didier deshommes <[EMAIL PROTECTED]> wrote:
 > Hi Dr. Pavlyk,
 >  My question is in referrence to your blog post:
 >  
 > http://blog.wolfram.com/2008/04/29/today-we-broke-the-bernoulli-record-from-the-analytical-engine-to-mathematica/
 >
 >  - Do you have the specs of the machine you ran this off? CPU, memory, etc.
 >  - I assume this function is in the development version of mathematica?
 >
 >  Thanks for your informative post!
 >
 >  didier
 >



On Fri, May 2, 2008 at 3:43 PM, didier deshommes <[EMAIL PROTECTED]> wrote:
> On Fri, May 2, 2008 at 3:40 PM, William Stein <[EMAIL PROTECTED]> wrote:
>  >
>  >  On Fri, May 2, 2008 at 11:34 AM, Fredrik Johansson
>  >  <[EMAIL PROTECTED]> wrote:
>  >  >
>  >
>  > >  Oleksandr Pavlyk reports on the Wolfram Blog that he has computed the
>  >  >  10 millionth Bernoulli number using Mathematica:
>  >  >  
> http://blog.wolfram.com/2008/04/29/today-we-broke-the-bernoulli-record-from-the-analytical-engine-to-mathematica/
>  >  >
>  >  >  How does sage's Bernoulli number implementation compare? I'd like to
>  >  >  see bernoulli(10^7) in sage beating Mathematica's time. And then
>  >  >  computing the 20 millionth Bernoulli number...
>  >
>  >  I couldn't find any information about the hardware that guy used.
>  >  64-bit?  32-bit?
>  >  1.8Ghz or 3Ghz?   Could somebody write and ask?
>
>  I  did earlier, and I hope he will answer.
>
>  didier
>
>
>
>  >
>  >  Also, when I tried
>  >
>  > bernoulli(10^7+2)
>  >
>  >  directly in Sage there were a couple of issues that arose, since that 
> command
>  >  is much more designed for smaller input.   I fixed those small issues.
>  >  I guess we'll see in a week ..
>  >
>  >  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: Computing large Bernoulli numbers

2008-05-02 Thread didier deshommes

On Fri, May 2, 2008 at 3:40 PM, William Stein <[EMAIL PROTECTED]> wrote:
>
>  On Fri, May 2, 2008 at 11:34 AM, Fredrik Johansson
>  <[EMAIL PROTECTED]> wrote:
>  >
>
> >  Oleksandr Pavlyk reports on the Wolfram Blog that he has computed the
>  >  10 millionth Bernoulli number using Mathematica:
>  >  
> http://blog.wolfram.com/2008/04/29/today-we-broke-the-bernoulli-record-from-the-analytical-engine-to-mathematica/
>  >
>  >  How does sage's Bernoulli number implementation compare? I'd like to
>  >  see bernoulli(10^7) in sage beating Mathematica's time. And then
>  >  computing the 20 millionth Bernoulli number...
>
>  I couldn't find any information about the hardware that guy used.
>  64-bit?  32-bit?
>  1.8Ghz or 3Ghz?   Could somebody write and ask?

I  did earlier, and I hope he will answer.

didier

>
>  Also, when I tried
>
> bernoulli(10^7+2)
>
>  directly in Sage there were a couple of issues that arose, since that command
>  is much more designed for smaller input.   I fixed those small issues.
>  I guess we'll see in a week ..
>
>  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: sage -n?

2008-04-15 Thread didier deshommes

On Tue, Apr 15, 2008 at 1:11 PM, Kiran Kedlaya <[EMAIL PROTECTED]> wrote:
>
>  Currently the command-line option to start sage directly in (secure)
>  notebook mode is -notebook. What do people think of adding a shorter
>  alternative, such as sage -n? If people are wary about assigning
>  single-letter options, then sage -nb is another possibility.

I would prefer sage -nb

didier

>
>  Kiran
>
>  >
>

--~--~-~--~~~---~--~~
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: trouble with linear algebra over CC and CDF

2008-04-15 Thread didier deshommes
On Fri, Apr 11, 2008 at 8:00 PM, Alex Ghitza <[EMAIL PROTECTED]> wrote:
>
>  -BEGIN PGP SIGNED MESSAGE-
>  Hash: SHA1
>
>  Hi,
>
>  There are some inconsistencies in linear algebra over fields like CDF.
>  Some trouble was already reported in #2256.  The following is another issue:
>
>  sage: M = matrix(CDF, 2, 2, [(-1 - 2*I, 5 - 6*I), (-2 - 4*I, 10 - 12*I)])
>  sage: M.is_invertible()
>  True
>  sage: M.determinant()
>  5.3290705182e-15 + 1.7763568394e-15*I
>  sage: M.inverse()
>  [ 1.01330991616e+15 - 2.58956978574e+15*I -5.06654958079e+14 +
>  1.29478489287e+15*I]
>  [ 5.62949953421e+14 + 5.62949953421e+14*I -2.81474976711e+14 -
>  2.81474976711e+14*I]
>
>  So because of roundoff errors, Sage thinks that we have an invertible
>  matrix.  But the code for echelon_form knows that it's not invertible:
>
>  sage: M.echelon_form()
>  [1.0 1.4
>  + 3.2*I]
>  [-2.22044604925e-16 - 4.4408920985e-16*I
>  ~   0]
>  sage: M.rank()
>  1
>
>  This behavior is inconsistent.  Either there is enough precision to
>  decide that the matrix is invertible, or there isn't.  Doing this in two
>  different ways should not yield two mutually exclusive answers.
>
>  Similar problems occur over CC.
>
>  I hope it's clear by now that I have no idea how CDF and friends
>  actually work, so I don't know what would be a good solution or even
>  whether such a solution should exist.  My initial guess would be that
>  finding the determinant requires more computations so there is more
>  precision loss than in computing the echelon form; in that case, maybe
>  over such fields we should not base is_invertible() and inverse() on
>  determinant() but rather on echelon_form().

This is now #2932: http://trac.sagemath.org/sage_trac/ticket/2932:

Just looking at the value of M.rank() should be enough, I think. Also,
M.rank() seems much faster than computing the determinant:
{{{
sage: M = matrix(CDF, 2, 2, [(-1 - 2*I, 5 - 6*I), (-2 - 4*I, 10 - 12*I)])
sage: %timeit M.rank()
100 loops, best of 3: 676 ns per loop
sage: %timeit M.det()
10 loops, best of 3: 2.81 µs per loop
}}}

Timings are comparable over ZZ,QQ,RR.

didier

>
>  Note also that this problem does not seem to occur over RR or RDF.
>
>  Best,
>  Alex
>
>
>  - --
>  Alexandru Ghitza
>  Assistant Professor
>  Department of Mathematics
>  Colby College
>  Waterville, ME 04901
>  http://bayes.colby.edu/~ghitza/
>  -BEGIN PGP SIGNATURE-
>  Version: GnuPG v2.0.7 (GNU/Linux)
>  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
>  iD8DBQFH//uydZTaNFFPILgRArYKAJ4r9QOJNYSSCgVzSutUW7gEfcv3uQCfd3aj
>  nYV2EFH6znwShoGL7q2BjRY=
>  =74HR
>  -END PGP SIGNATURE-
>
>  >
>

--~--~-~--~~~---~--~~
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: should bool(x > 0) be False or an exception?

2008-04-09 Thread didier deshommes

On Wed, Apr 9, 2008 at 10:18 PM, Carl Witty <[EMAIL PROTECTED]> wrote:
>
>  I'd like to reopen discussion of #2781, "bool() for SymbolicEquation
>  should raise an error when it doesn't know the answer".  Jason created
>  a prototype patch to implement this, but gave up on it and closed the
>  ticket when he was convinced that "this is not pythonic".
>
>  I like the "raise an exception" behavior, because it would eliminate
>  questions asking why form1 and form2 below are different (from this
>  sage-support thread 
> http://groups.google.com/group/sage-support/browse_thread/thread/79d0d6d94cfe9526#).
>  (I have seen this exact problem at least twice on sage-support.)  What
>  do you think?

-1
I like bool(x>0) to be False by default if the answer is not known.
mhansen raised this great point that we rely so much on things like :
if (condition on x):
  do something

that it would be cumbersome to surround this statement with a try,catch block.

I'm only opposing this because it is unpythonic but I don't see any
reason not to define methods that have the same functionality for
SymbolicEquation but *can* raise an exception when appropriate.

didier

--~--~-~--~~~---~--~~
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: mercurial --> plain text --> mercurial

2008-03-28 Thread didier deshommes
Thanks Martin,
I think the issue is that we want a version of our repository that has no
binary data in it for transparency. The virus part is just a  possible
scenario that has been blown out of proportion because of the way I asked
the question, since I didn't understand it well enough myself :)

didier

Forwarded conversation
Subject: [EMAIL PROTECTED] Posting error: sage-devel


From: *Martin Geisler* <[EMAIL PROTECTED]>
Date: Fri, Mar 28, 2008 at 5:47 AM
To: [EMAIL PROTECTED]


Hi,

I tried to post the following message to the SAGE group to participate
in the discussion about Mercurial. But I apparently have to register
first -- could you instead forward it?

> "William Stein" <[EMAIL PROTECTED]> writes:
>
> > Carl Witty said:
> >> Second, are you worried about people checking in viruses, or
> >> people concealing a virus in the .hg directory without it being
> >> checked in?
> >
> > Both. Yes, I'm worried about people checking viruses. Yes, I'm
> > also worried about people concealing a virus in the .hg directory
> > without it being checked in.
>
> No matter what files I put in the .hg directory in my clone, they
> wont be copied to other clones via 'hg push' and 'hg pull'. So I
> don't see why you are afraid that I might put a virus there.
>
> The only way I could inject a virus into somebone elses Mercurial
> repository (without having direct write access to it) is to commit
> it and convince the other party to 'hg pull' from me.
>
> I think that checking that people do not commit stupid things (build
> products, virusses, etc) is more of a social problem. And still: if
> they do commit something bad, then (assuming you are using an OS
> that wont randomly execute files on your harddisk...) you can safely
> pull the changes since you can always strip them away again if you
> want.

--
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.
--
From: *Martin Geisler* <[EMAIL PROTECTED]>
Date: Fri, Mar 28, 2008 at 8:14 AM
To: [EMAIL PROTECTED]



The following message is a courtesy copy of an article that has been
posted to gmane.comp.version-control.mercurial.general as well.

didier deshommes <[EMAIL PROTECTED]> writes:

> Hi everyone,
> Sage (http://www.sagemath.org/) uses hg for its source control and
> recently a question has come up about the possibility of doing the
> following:
>
>  (1) export everything in the .hg repo to something (perhaps a ton of
> stuff) in plain text format,
>  (2) delete .hg/ directory
>  (3) do something that recovers the .hg/ directory from the output of (1).

>From reading the messages in this thread I gather that you want the
plain text format to be able to inspect the files and make sure that
they have not been changed by a virus?

It is not necessary to have the repository contents in plain text to
do that -- all you need is to sign a trusted revision number with a
GnuPG key. You can then later verify the integrity of the repository.

The gpg Mercurial extension makes this (already easy step) even
easier: http://www.selenic.com/mercurial/wiki/index.cgi/GpgExtension

The point is that the revision number (the hexadecimal string printed
using, say, 'hg id') depends on *everything* in the repository. So it
is impossible for a virus to change any meta-data without also
disturbing the hash value.

You can therefore easily trust a repository given to you by a
stranger, as long as you verify the integrity (with 'hg verify') and
check that the revision of the repository is trusted.

If the tip-most revision is unknown to you, then you can always strip
the unknown revisions away using 'hg strip' and then start from a last
known good revision.

And please note that this property is not unique to Mercurial: all the
other modern revision control systems use the same technique to make
it easy to verify the integrity of a repository.

--~--~-~--~~~---~--~~
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] Fwd: mercurial --> plain text --> mercurial

2008-03-27 Thread didier deshommes

>From the scripts below I was able to dump a text version of the SAGE
repo and recover it to make another hg repo out of it. This requires:
 - mercurial 1.0
 - a change in the layout of the sage repo. It's not too hard: hg
clone --pull $SAGE_REPO will create an exact copy of the repository in
the new format.

Here's what I did:
$ pwd  # old repo
old-hg/
$ find .hg/store/ -name "*.i" | xargs dumprevlog > repo.dump

$ cd ~/new-hg # new repo
$ hg init
$ undumprevlog < ~/old-repo/repo.dump
[stuff happens...]

$ hg tip
dfdeshom  sage:~/new-hg$ hg tip
changeset:   8962:211b127eab5d
tag: tip
user:William Stein  gmail.com>
date:Mon Mar 17 16:03:46 2008 -0700
files:   sage/rings/polynomial/multi_polynomial_element.py sage/version.py
description:
2.10.4

And doing hg co will re-populate this directory. And it looks like
these scripts will be incorporated in the new version of hg (in
/contribs/ I guess). Thanks to Matt for his quick response!

didier

-- Forwarded message --
From: Matt Mackall <[EMAIL PROTECTED]>
Date: Thu, Mar 27, 2008 at 1:49 PM
Subject: Re: mercurial --> plain text --> mercurial
To: didier deshommes <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]


Alright, here's a pair of scripts that will do end-to-end:

 diff -r bc142ee1522c contrib/dumprevlog
 --- /dev/null   Thu Jan 01 00:00:00 1970 +
 +++ b/contrib/dumprevlogThu Mar 27 12:40:17 2008 -0500
 @@ -0,0 +1,21 @@
 +#!/usr/bin/env python
 +# Dump revlogs as raw data stream
 +# $ find .hg/store/ -name "*.i" | xargs dumprevlog > repo.dump
 +
 +import sys

+from mercurial import revlog, node
 +
 +for f in sys.argv[1:]:
 +r = revlog.revlog(open, f)
 +print "file:", f
 +for i in xrange(r.count()):
 +n = r.node(i)
 +p = r.parents(n)
 +d = r.revision(n)

+print "node:", node.hex(n)
 +print "linkrev:", r.linkrev(n)
 +print "parents:", node.hex(p[0]), node.hex(p[1])
 +print "length:", len(d)
 +print "-start-"
 +print d
 +print "-end-"
 diff -r bc142ee1522c contrib/undumprevlog
 --- /dev/null   Thu Jan 01 00:00:00 1970 +
 +++ b/contrib/undumprevlog  Thu Mar 27 12:40:17 2008 -0500
 @@ -0,0 +1,34 @@
 +#!/usr/bin/env python
 +# Undump a dump from dumprevlog
 +# $ hg init
 +# $ undumprevlog < repo.dump
 +
 +import sys
 +from mercurial import revlog, node, util, transaction
 +
 +opener = util.opener('.', False)
 +tr = transaction.transaction(sys.stderr.write, opener, "undump.journal")
 +while 1:
 +l = sys.stdin.readline()
 +if not l:
 +break
 +if l.startswith("file:"):
 +f = l[6:-1]
 +r = revlog.revlog(opener, f)
 +print f
 +elif l.startswith("node:"):
 +n = node.bin(l[6:-1])
 +elif l.startswith("linkrev:"):
 +lr = int(l[9:-1])
 +elif l.startswith("parents:"):
 +p = l[9:-1].split()
 +p1 = node.bin(p[0])
 +p2 = node.bin(p[1])
 +elif l.startswith("length:"):
 +length = int(l[8:-1])
 +sys.stdin.readline() # start marker
 +d = sys.stdin.read(length)
 +sys.stdin.readline() # end marker
 +r.addrevision(d, tr, lr, p1, p2)
 +
 +tr.close()

 Tested on the Mercurial repo.

 ps: making this work on systems that have braindead notions about text
 vs binary files is an exercise left to the reader



 --
 Mathematics is the supreme nostalgia of our time.

--~--~-~--~~~---~--~~
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] Fwd: mercurial --> plain text --> mercurial

2008-03-27 Thread didier deshommes

FYI, this is a proposed solution...


-- Forwarded message --
From: Matt Mackall <[EMAIL PROTECTED]>
Date: Thu, Mar 27, 2008 at 12:09 PM
Subject: Re: mercurial --> plain text --> mercurial
To: didier deshommes <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]



 On Thu, 2008-03-27 at 14:24 +, didier deshommes wrote:
 > Hi everyone,
 > Sage (http://www.sagemath.org/) uses hg for its source control and recently a
 > question has come up about the possibility of doing the following:
 >
 >  (1) export everything in the .hg repo to something (perhaps a ton of
 > stuff) in plain text format,
 >  (2) delete .hg/ directory
 >  (3) do something that recovers the .hg/ directory from the output of (1).

 This will work for the export side:

 #!/usr/bin/env python
 import sys
 from mercurial import revlog, node

 for f in sys.argv[1:]:
r = revlog.revlog(open, f)
print "file:", f
for i in xrange(r.count()):
n = r.node(i)
p = r.parents(i)
d = r.revision(n)
print "node:", node.hex(n)
print "linkrev:", r.linkrev(n)
print "parents:", node.hex(p[0]), node.hex(p[1])
print "length:", len(d)
print "-start-"
print d
print "-end-"

 Then you can do something like:

 find .hg/store -name "*.i" | xargs ./dumprevlog > repo.dump

 This will make a nice flat, uncompressed file with everything you need
 to reconstruct a repo. But it'll be huge. The mercurial repo goes from
 11MB to 435MB. Other projects will get -much- bigger; I've seen large
 revlogs with compression ratios of > 1000:1.

 I'm too busy to write the import side of this today, but it'll be about
 as long. And you shouldn't actually need that piece if you only need to
 scan the dump.

 --
 Mathematics is the supreme nostalgia of our time.

--~--~-~--~~~---~--~~
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: mercurial --> plain text --> mercurial

2008-03-27 Thread didier deshommes

On Wed, Mar 26, 2008 at 3:21 PM, Mike Hansen <[EMAIL PROTECTED]> wrote:
>
>  It seems like the mercurial mailing list would be the best place to go for 
> this.

Done: http://selenic.com/pipermail/mercurial/2008-March/018133.html

didier

>
>  Using queues has made me quite a bit more productive, and I'd like to
>  avoid switching to a version control system without them.  Also, the
>  git documentation leaves something to be desired compared to the
>  Mercurial book.
>
>  --Mike
>
>
>
>  On Wed, Mar 26, 2008 at 12:12 PM, William Stein <[EMAIL PROTECTED]> wrote:
>  >
>  >  On Wed, Mar 26, 2008 at 1:18 PM, root <[EMAIL PROTECTED]> wrote:
>  >  >
>  >  >  William,
>  >  >
>  >  >  git can do this. Since git uses a hash it will always regenerate the
>  >  >  same hash from the same file.
>  >  >
>  >  >  In fact, git uses hashes all the way down the tree so you can just
>  >  >  look at the hash code of the root of the tree to see if anything
>  >  >  changes. Equal hash codes, even across the net, imply exact copies
>  >  >  of the source tree.
>  >  >
>  >  >  Axiom uses arch, cvs, svn, and git. I have used several other systems
>  >  >  in the past. Now all of the primary work is in git and is export-only
>  >  >  to the other systems (git can work with them transparently). git has
>  >  >  fundamentally changed the way I work and the way Axiom is maintained,
>  >  >  all for the better.
>  >  >
>  >  >  I know it is a challenge to change source code systems but the gain
>  >  >  is well worth the pain in this case. The fact that git works with
>  >  >  legacy humans is a huge plus in minimizing the pain.
>  >
>  >  We are indeed considering changing to git.  The
>  >repo --> plain text --> original repo
>  >  problem is a show stopper -- i.e., if Mercurial absolutely can't
>  >  do that, then we have no choice but to dump mercurial for git.
>  >  I hope Mercurial can do that though, since we've spent a lot
>  >  of time getting going with Mercurial, and it works fairly well.
>  >
>  >   -- 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: Glib algorithms #2436 vote

2008-03-26 Thread didier deshommes

On Wed, Mar 26, 2008 at 1:52 PM, mabshoff
<[EMAIL PROTECTED]> wrote:
>
>
>
>  On Mar 26, 6:43 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
>  > On Wed, Mar 26, 2008 at 10:09 AM, mabshoff
>  >
>
> > <[EMAIL PROTECTED]> wrote:
>  >
>  > >  On Mar 26, 6:02 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
>  > >  > Is any of the code gpl v3+ only?
>  >
>  > >  No.
>  >
>  > That's good.
>  >
>  >
>  >
>  > >  > How difficult will it be to update our version whenever upstream
>  > >  > changes?  Do only you know how to do this?
>  >
>  > >  Not particularly hard.
>  >
>  > You didn't answer my second question.
>
>  Gary did it and I didn't pay much attention to it. I assume it will be
>  documented. I don't consider such a thing "hard" once it has been
>  documented.
>
>
>  > >  > Why put this in c_lib instead of a separate spkg called glib-min?
>  > >  > Couldn't such a package be useful outside of sage?
>  >
>  > >  It is easiest if we put it into libcsage.
>  >
>  > That's not a good enough answer.   Until now almost all code in libcsage 
> and
>  > the main sage library has been new code we've written -- except a few
>  > exceptions,
>  > where we greatly regretted them greatly and moved the code out later.
>  > So from experience I'm very opposed to this code being in c_lib.
>  >
>  > I vote -1 to this code going into sage unless:
>  >(1) it is put in a separate spkg, and
>
>  We can certainly do that.
>
>
>  >(2) the process of extracting glib-min from the official glib
>  > tarball is automated.
>
>  That is unlikely to happen since it requires manual interaction. It
>  will break in the next release in six months and writing automated
>  tools will take longer than actually doing the work in the first
>  place.

How frequent are the glib releases? If they're not that frequent, this
should less than an issue as long as Gary documents what he's done
somewhere :)

didier
>
>  >   -- William
>
>  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: another matrix() corner case for sparse matrices

2008-03-26 Thread didier deshommes

On Wed, Mar 26, 2008 at 2:01 PM, Jason Grout
<[EMAIL PROTECTED]> wrote:
>
>  Ryan Hinton brought up a good point at #2651:
>
>  Currently, matrix(3,{(1,1): 2}) gives the 3x2 sparse matrix
>
>  [0 0]
>  [0 2]
>  [0 0]
>
>
>  However, for other cases, if we specify just the number of rows, the
>  returned matrix is square (except when we are giving all the entries of
>  the matrix and there aren't enough entries).  So:
>
>  Should the above command return the following instead?
>
>  [0 0 0]
>  [0 2 0]
>  [0 0 0]

Yes, I think the matrix should be square way since that is the
behavior for dense matrices.

didier

--~--~-~--~~~---~--~~
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: trac is down.....

2008-03-03 Thread didier deshommes

Down again!
{{{
Python Traceback

Traceback (most recent call last):
  File "/var/lib/python-support/python2.4/trac/web/main.py", line 387,
in dispatch_request
dispatcher.dispatch(req)
  File "/var/lib/python-support/python2.4/trac/web/main.py", line 237,
in dispatch
resp = chosen_handler.process_request(req)
  File "/var/lib/python-support/python2.4/trac/ticket/web_ui.py", line
279, in process_request
self._do_save(req, db, ticket)
  File "/var/lib/python-support/python2.4/trac/ticket/web_ui.py", line
546, in _do_save
cnum=internal_cnum):
  File "/var/lib/python-support/python2.4/trac/ticket/model.py", line
240, in save_changes
(self[name], self.id))
  File "/var/lib/python-support/python2.4/trac/db/util.py", line 50, in execute
return self.cursor.execute(sql_escape_percent(sql), args)
  File "/var/lib/python-support/python2.4/trac/db/sqlite_backend.py",
line 56, in execute
args or [])
  File "/var/lib/python-support/python2.4/trac/db/sqlite_backend.py",
line 48, in _rollback_on_error
return function(self, *args, **kwargs)
OperationalError: database or disk is full
}}}

On Mon, Mar 3, 2008 at 9:15 AM, William Stein <[EMAIL PROTECTED]> wrote:
>
>  Trac is back.  (I restarted it.)
>
>  William
>
>
>  On Mon, Mar 3, 2008 at 8:10 AM, David Harvey <[EMAIL PROTECTED]> wrote:
>  >
>  > Proxy Error
>  >
>  > The proxy server received an invalid response from an upstream server.
>  > The proxy server could not handle the request GET /sage_trac/.
>  >
>  > Reason: Error reading from remote server
>  >
>  > ?
>  >
>  > david
>  >
>  >
>  >  >
>  >
>
>
>
>  --
>  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] Re: sage-edu, standard API, etc.

2008-02-25 Thread didier deshommes

On Sat, Feb 23, 2008 at 1:24 PM, William Stein <[EMAIL PROTECTED]> wrote:
>  I'm actually pretty curious about how pexpect and XMLRPC both
>  done locally compare speedwise.  I've done some simple benchmarks
>  below.  The short answer is that pexpect is between several hundred
>  to several thousand times faster than XMLRPC, depending on the
>  platform.

More benchmarks:
pyxmlrpc (http://sourceforge.net/projects/py-xmlrpc/) is a c
implementation that is roughly 2 times faster  than xmlrpclib on small
inputs. Here are some numbers on linux running sage 2.10.1:

pyxmlrpc:
sage: %timeit ("c.execute('add', [2r, 3r])")
100 loops, best of 3: 65.8 ns per loop
sage: timeit c.execute('add', [2r, 3r])
1000 loops, best of 3: 1.46 ms per loop


xmlrpclib:
sage: %timeit ("s.add([2r,3r])")
100 loops, best of 3: 158 ns per loop
sage: timeit s.add([2r,3r])
100 loops, best of 3: 1.94 ms per loop


overall:
sage: time for _ in range(10^3): gp.eval('2+3')
CPU times: user 0.34 s, sys: 0.10 s, total: 0.45 s
Wall time: 0.82

sage: time for _ in range(10^3): c.execute('add', [2r, 3r])
CPU times: user 0.08 s, sys: 0.02 s, total: 0.10 s
Wall time: 1.66

sage: time for _ in range(10^3): s.add([2r,3r])
CPU times: user 0.99 s, sys: 0.38 s, total: 1.37 s
Wall time: 2.51

Note: The pyxmlrpc is currently unmaintained (last realease was in
2004) and needs to be patched against 2.5 (there's a fix at the bottom
of 
http://sourceforge.net/tracker/index.php?func=detail&aid=1734819&group_id=23992&atid=380301).

didier

--~--~-~--~~~---~--~~
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: sage-edu, standard API, etc.

2008-02-23 Thread didier deshommes

On Fri, Feb 22, 2008 at 5:57 PM, alex clemesha <[EMAIL PROTECTED]> wrote:
> In Knoboo we *decouple* the idea of a kernel, it could be another
> Python (Sage) process, with communication through Pexpect
>
> ... but it also couple be another Python (Sage) process running a very
> minimal XML-RPC server, and all communication occurs through
>  *** HTTP instead of Pexpect ***.

I personally am not too familiar with web development, so it's always
great to hear from someone who has (which is exactly why this
discussion was started). Regarding XML-RPC vs Pexpect:
 - how slow is one compared to the other?  I expect xml-rpc to be
slower, but not so slow to render it unusable.
- I understand xml-rpc working for inter-communication, ie SAGE ->
outside world, but I don't see how it would work for
intra-communication, SAGE -> maxima. Maxima would have to be already
running in the background, right? If that is the case, then every sage
session would have to spawn singular, maxima, maple, etc sessions at
start-up. I don't like that. Is there something I'm not getting here?

didier

--~--~-~--~~~---~--~~
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: Adding JSON capabilities to SAGE

2008-01-22 Thread didier deshommes

> On Tue, 22 Jan 2008, Nick Alexander wrote:
> >>> I would like to establish some (roughly) like this: If a
> >>> computation cannot be
> >>> expressed from the command line (in pure Python) then it cannot be
> >>> a standard
> >>> part of Sage. E.g. if you cannot compute $sin(x)$ for some $x$
> >>> from the
> >>> command line but you can do it by clicking some Java buttons, then
> >>> this
> >>> functionality would not be considered a part of (standard) Sage.
> >>>
> >>> Would that make sense?
> >>> Martin

There is something I don't get: it seems like JSON is going to be used
by clients to simply send or receive data from SAGE. What the client
does with the result of the computation is its problem. Why do we have
to worry about testing this at all?

> The interface itself might be tricky -- however, the communication protocol 
> isn't hard to test, whatever computations go on behind the scenes aren't hard 
> to test, and Java has some *great* unit-testing capabilities, so that side 
> isn't hard to test either.  In short, there is very little that we wouldn't 
> be able to test in an automated way.
>

And what is there to test? That the data is well-formed?

didier

--~--~-~--~~~---~--~~
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: MPolynomialRing.__str__

2008-01-20 Thread didier deshommes

On Jan 20, 2008 11:20 AM, Martin Albrecht <[EMAIL PROTECTED]> wrote:
>
> Hi there,
>
> I've submitted the patch
>
>http://trac.sagemath.org/sage_trac/ticket/1816
>
> to trac and Nick refereed it. The patch implements that if a multivariate
> polynomial ring is 'print'ed the output is quite verbose and structured. This
> behavior was in repr_long() before.
>
> EXAMPLE:
>
> {{{
> sage: P. =
> PolynomialRing(QQ,order=TermOrder('degrevlex',1)+TermOrder('lex',2))
> sage: print P
> Multivariate Polynomial Ring
>   Base Ring : Rational Field
>Size : 3 Variables
>Block  0 : Ordering : degrevlex
>   Names: x
>Block  1 : Ordering : lex
>   Names: y, z
> }}}

Will
sage: P

give the same verbose output? If so, I would give this a -0: I don't
like it but it won't bother me as much.

didier
>
> Nick writes: "That's *not* okay -- way too much by default" but I disagree.
> The motivation for adding more (structured) information to the long
> representation came from the similar behavior of symbolic expressions:
>
> EXAMPLE:
>
> {{{
> sage: f = x/var('y')
> sage: f
> x/y
> sage: str(f)
> '
> x\r\n   -\r\n
> y'
> sage: print f
>x
>-
>y
> }}}
>
> Thus I figured it would be okay to have long representations returned by
> __str__.
>
> The question now is, how others think about it.
>
> Cheers,
> Martin
>
> --
> name: Martin Albrecht
> _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
> _www: http://www.informatik.uni-bremen.de/~malb
> _jab: [EMAIL PROTECTED]
>
>
> >
>

--~--~-~--~~~---~--~~
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: Block matrices?

2008-01-10 Thread didier deshommes

On Jan 9, 2008 3:23 AM, Robert Bradshaw <[EMAIL PROTECTED]> wrote:
>
> http://sagetrac.org/sage_trac/ticket/1732

2 questions about the patch:
* Why is this function named block_sum? What are we summing?
* Why are we limited to 4 arguments? Ideally, I would love to pass a
list to this function and have it concatenate each matrix in the list
(horizontally in the following case):
A.block_matrix([A_1, A_2, ..., A_n])

You could pass the functions an argument, indicating the number of
rows (or columns) you want so that you can do things like
A =  [ A1 A2]
[ A3 A4]

like this:
A=block_matrix([A1,A2,A3,A4],num_cols=2*3,num_rows=None). Here each A
is 3x3 and we are concatenating 2 of them in each row.

On a more general note, block_sum as of 2.9.3 is really constructing a
block diagonal matrix, isn't it? Why not call it block_diagonal? Of
course, for now, it's only using one argument, why not pass it a list
of matrices?

Thoughts?

didier

>
>
> On Jan 8, 2008, at 4:27 AM, vgermrk wrote:
>
> >
> > Is there a way to construct block matrices in SAGE?
> > Not just the "block_sum", "augment" and "stack" functions.
> >
> > As an example, let A, B, C, D be matrices and i want to construct a
> > matrix like E=[[A,B],[C,D]]
> >
> > Such a feature would be very nice.
> >
> > -vgermrk-
> >
>
> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Wiris -- something like the Sage notebook sort of

2008-01-08 Thread didier deshommes

On Jan 8, 2008 11:51 PM, William Stein <[EMAIL PROTECTED]> wrote:
 > Just a quick question:  Isn't Flash a closed-source commercial product, hence
> completely unsuitable for use as a core technology in Sage?  (In contrast,
> Java is (supposed to be?) GPL'd now. )
>
>  -- William

Yes it is closed (btw, I don't think Tom was advocating the use of
Flash in Sage, just pointing out the fact that it is near-perfect for
web developement in his view).  I just want  to point out the obvious
about Javascript: it's a bona fide platform for web development that
is "installed" by default on most modern browsers. You actually have
to install Java (now that it's GPL-compatible) and you don't gain much
in the short run for web dev. If you want to get serious about web
development why not ship PHP, which was specifically written for the
web?

So it's -1 from me on Java *for web dev*. I would not discount Java
for other things: a combination of Java platform + scripting language
(like python, php, perl) could open up exciting possibilities for Sage
.

didier

>
>
> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: new SPKG.txt format and spkg tracking in the wiki

2007-12-31 Thread didier deshommes
2007/12/31, mabshoff <[EMAIL PROTECTED]>:
 > == Dependencies ==
>
>  * gmp
>  * pari
>  * NTL
>

I feel like this is too much information required for an spkg. I think
that only the name, upstream contact and maintainers fields should be
required to distribute one. The changelog could be inferred from the
hg changelog, the distribution field does not seem to be of any value
to me as a user.

> * How do we keep SPKG.txt and the wiki page in sync? In an ideal world
> we would just copy over the updated SPKG.txt into the wiki and be done
> with it. But people will edit the wiki page, i.e. to add contact info
> or correct issues. One way would be for the maintainers to subscribe
> to the pages of the spkgs they handle and sync it manually. Since the
> wiki preserves all edits and offers an interface to diff this should
> be relatively easy.

That's a great solution.

didier

>
> > > == Distribution ==
> >
> > > === Padus ===
> > >  * Contact: Ismail D�nmez
> > >  * EMail: [EMAIL PROTECTED]
> > >  * Website: N/A
> >
> > > == Changelog ==
> >
> > > === eclib-20071231 (John Cremona) ===
> >
> > >  * renamed to eclib
> > >  * allows elliptic curves as input with rational (as opposed to just
> > > integer) coefficients.
> >
> > > === cremona-20071219.p1 (Michael Abshoff) ===
> >
> > >  * patch to fix "Internal error: can't free this _ntl_gbigint" (John
> > > Cremona)
> >
> > > === cremona-20071219.p0 (John Cremona) ===
> >
> > >  * fix main Makefile mismerge (Michael Abshoff)
> > >  * add missing export to g0n/Makefile (John Cremona)
> > >  * fix permission issue (Michael Abshoff)
> >
> > > === cremona-20071219 (John Cremona) ===
> >
> > >  * update to latest source
> > >  * fix mwrank error on non-minimal curves (#1233)
> >
> > > === cremona-20071124.p4 (Michael Abshoff) ===
> >
> > >  * apply John Cremoan's second patch for #1403
> > >  * delete $SAGE_LOCAL/include/mwrank (#1410)
> > >  * strip the mwrank binaries and link dynamically (#1410)
> > >  * delete $SAGE_LOCAL/lib/libmwrank.[so|dylib] (#1410)
> >
> > > === cremona-20071124.p3 (Michael Abshoff) ===
> >
> > >  * apply John Cremoan's patch for #1403
> > >  * fix #1256, i.e. remove the now obsolete mwrank.spkg
> >
> > > === previous versions ===
> >
> > >  * lost to history
> > > [end example]
> >
> > > I pasted the verbatim text file intohttp://wiki.sagemath.org/spkg/eclib
> >
> > > Is there anything missing? Should anything be removed?
> >
> > > But now there are a couple issues we need to resolve:
> >
> > > * How do we keep SPKG.txt and the wiki page in sync? In an ideal world
> > > we would just copy over the updated SPKG.txt into the wiki and be done
> > > with it. But people will edit the wiki page, i.e. to add contact info
> > > or correct issues. One way would be for the maintainers to subscribe
> > > to the pages of the spkgs they handle and sync it manually. Since the
> > > wiki preserves all edits and offers an interface to diff this should
> > > be relatively easy.
> >
> > > * We currently have two couple pages in the wiki that list spkgs:
> >
> > >  http://wiki.sagemath.org/standard_packages_available_for_SAGE
> > >  http://wiki.sagemath.org/Sage_Spkg_Tracking
> >
> > > I think both should be merged into one page while preserving the info
> > > from both pages. "standard_packages_available_for_SAGE" is slightly
> > > older than "Sage_Spkg_Tracking", but I llike the format of
> > > "Sage_Spkg_Tracking" better. It also has all current components
> > > listed.
> >
> > > * We would potentially have two wiki pages for each spkg. Take for
> > > example Givaro. We have a page at
> >
> > >  http://wiki.sagemath.org/Givaro
> >
> > > That page lists some examples and compares the performance of GF(2^8)
> > > to Magma. That information shouldn't be in SPKG.txt and the example
> > > section could potentially be expanded.
> >
> > > The not yet existing page at
> >
> > >  http://wiki.sagemath.org/spkg/Givaro
> >
> > > on the other hand would then contain a much more technical changelog.
> >
> > > I think that we also should merge both pages for each spkg into some
> > > part of the manual. It is possible to export wiki pages to latex which
> > > in turn then can be stuck into some part like the developer's manual.
> > > We should do that via some script so that prior to a release somebody
> > > can execute that script. If there is the need to do something manual
> > > it won't happen.
> >
> > > Thought? Ideas?
> >
> > > Cheers,
> >
> > > Michael
> >
> > --
> > John Cremona
> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Fwd: blog and rss

2007-12-09 Thread didier deshommes
 and on the side bar of that page there is a link to
> > > >> a bunch more planets ... basically there's a lot of gravity to
> > > >> this idea ;)
> > > >>
> > > >> Alex
> > > >>
> > > >>
> > > >>>
> > > >>>
> > > >>> On Dec 8, 2007 7:05 PM, William Stein <[EMAIL PROTECTED]> wrote:
> > > >>>>
> > > >>>> On Dec 8, 2007 7:03 PM, Bobby Moretti <[EMAIL PROTECTED]> wrote:
> > > >>>>>
> > > >>>>> At the very least, I think it would be a good idea to use a
> > > >>>>> content
> > > >>>>> management system for the website.
> > > >>>>
> > > >>>> That's a really good idea.  Mike Hansen has been getting really
> > > >>>> into Django lately, so maybe he can help with that.  Using Django
> > > >>>> would probably make a lot of sense.
> > > >>>>
> > > >>>>> The front page could be blog-like, containing mostly news,
> > > >>>>> updates,
> > > >>>>> info, and releases.
> > > >>>>
> > > >>>> Yep.
> > > >>>>
> > > >>>>> Then if someone has a personal blog entry that says something
> > > >>>>> interesting about Sage, we can just link to it from the front
> > > >>>>> page as
> > > >>>>> a news story. This way everything would be archived, etc.
> > > >>>>
> > > >>>> I like this idea.
> > > >>>>
> > > >>>> William
> > > >>>>
> > > >>>>
> > > >>>>>
> > > >>>>> On Dec 8, 2007 6:59 PM, didier deshommes <[EMAIL PROTECTED]>
> > > >>>>> wrote:
> > > >>>>>>
> > > >>>>>> 2007/12/8, William Stein <[EMAIL PROTECTED]>:
> > > >>>>>>>
> > > >>>>>>> Hi,
> > > >>>>>>>
> > > >>>>>>> My brother suggests that a "Sage blog" be somehow created (see
> > > >>> below).  It's
> > > >>>>>>> a good idea.  Any ideas about what this might entail?   Weekly
> > > >>> developer
> > > >>>>>>> summaries?  A "cool trick"?  Little articles?  Etc.   I have
> > > >>>>>>> never
> > > >>> blogged
> > > >>>>>>
> > > >>>>>> +1
> > > >>>>>> This could also be good to announce new versions, improvements,
> > > >>> papers
> > > >>>>>> written in Sage, etc. Developers blogging about Sage could be
> > > >>>>>> fun:
> > > >>> it
> > > >>>>>> would expose how some other parts of the Sage code works (this
> > > >>>>>> would
> > > >>>>>> also help Bus Days). For example, when I wrote QDRF, I blogged
> > > >>>>>> about
> > > >>>>>> what one would need to do in order to implement (floating-point)
> > > >>>>>> fields in Sage since I had learned a great deal about this
> > > >>>>>> part of
> > > >>> the
> > > >>>>>> code.
> > > >>>>>>
> > > >>>>>> Of course, the thing with blogging is time :) . If you're
> > > >>>>>> blogging,
> > > >>>>>> you're not writing code and sometimes you just can't afford
> > > >>>>>> that ;).
> > > >>>>>>
> > > >>>>>> didier
> > > >>>>>>
> > > >>>>>>
> > > >>>>>>> at all, but I know some of you (e.g., Martin Albrecht and Ondrej
> > > >>> Certik)
> > > >>>>>>> are old pros at blogging.  Thoughts?
> > > >>>>>>>
> > > >>>>>>>
> > > >>>>>>> -- Forwarded message --
> > > >>>>>>> From: Dennis Stein <[EMAIL PROTECTED]>
> > > >>>>>>> Date: Dec 8, 2007 1:28 PM
> > > >>>>>>> Subject: blog and rss
> > > >>>>>>> To: William Stein <[EMAIL PROTECTED]>
> > > >>>>>>>
> > > >>>>>>>
> > > >>>>>>> William,
> > > >>>>>>>
> > > >>>>>>> Non-developer users of Sage might enjoy learning more about what
> > > >>> is
> > > >>>>>>> going on in the Sage world.  A blog would be a great way to do
> > > >>> this.
> > > >>>>>>> You could post things like the AMS event, published articles,
> > > >>>>>>> news
> > > >>> of
> > > >>>>>>> major changes in the software, upcoming cool new features,
> > > >>> something
> > > >>>>>>> funny that is Sage related, a profile of someone who has
> > > >>> significantly
> > > >>>>>>> contributed to the software, a user profile, and so on.  People
> > > >>> could
> > > >>>>>>> subscribe to it via email or RSS.  You could use a free blog
> > > >>> service
> > > >>>>>>> (webpress or blogspot or whatever) and use Google's free
> > > >>> Feebburner
> > > >>>>>>> for the email subscription service for people to subscribe.
> > > >>>>>>>
> > > >>>>>>> http://www.mathworks.com/company/rss/index.html
> > > >>>>>>>
> > > >>>>>>> Google has a blog that they post to about once every three weeks
> > > >>> or so.
> > > >>>>>>>
> > > >>>>>>> Obviously making the software the best it can be is a bigger
> > > >>> priority,
> > > >>>>>>> but a blog could be useful at some point for keeping in touch
> > > >>>>>>> with
> > > >>>>>>> people (reporters, users, fans).
> > > >>>>>>>
> > > >>>>>>> --Dennis
> > > >>>>>>>
> > > >>>>>>>
> > > >>>>>>>
> > > >>>>>>> --
> > > >>>>>>> William Stein
> > > >>>>>>> Associate Professor of Mathematics
> > > >>>>>>> University of Washington
> > > >>>>>>> http://wstein.org
> > > >>>>>>>
> > > >>>>>>>>
> > > >>>>>>>
> > > >>>>>>
> > > >>>>>>>
> > > >>>>>>
> > > >>>>>
> > > >>>>>
> > > >>>>>
> > > >>>>> --
> > > >>>>> Bobby Moretti
> > > >>>>> [EMAIL PROTECTED]
> > > >>>>>
> > > >>>>>
> > > >>>>>>
> > > >>>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>> --
> > > >>>> William Stein
> > > >>>> Associate Professor of Mathematics
> > > >>>> University of Washington
> > > >>>> http://wstein.org
> > > >>>>
> > > >>>>
> > > >>>>>
> > > >>>>
> > > >>>
> > > >>>>
> > > >>>
> > > >>
> > > >>>
> > > >>
> > > >
> > > >
> > >
> > > >
> > >
> >
> > >
> >
>
>
>
> --
> Bobby Moretti
> [EMAIL PROTECTED]
>
> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Fwd: blog and rss

2007-12-08 Thread didier deshommes

2007/12/8, William Stein <[EMAIL PROTECTED]>:
>
> Hi,
>
> My brother suggests that a "Sage blog" be somehow created (see below).  It's
> a good idea.  Any ideas about what this might entail?   Weekly developer
> summaries?  A "cool trick"?  Little articles?  Etc.   I have never blogged

+1
This could also be good to announce new versions, improvements, papers
written in Sage, etc. Developers blogging about Sage could be fun: it
would expose how some other parts of the Sage code works (this would
also help Bus Days). For example, when I wrote QDRF, I blogged about
what one would need to do in order to implement (floating-point)
fields in Sage since I had learned a great deal about this part of the
code.

Of course, the thing with blogging is time :) . If you're blogging,
you're not writing code and sometimes you just can't afford that ;).

didier

> at all, but I know some of you (e.g., Martin Albrecht and Ondrej Certik)
> are old pros at blogging.  Thoughts?
>
>
> -- Forwarded message --
> From: Dennis Stein <[EMAIL PROTECTED]>
> Date: Dec 8, 2007 1:28 PM
> Subject: blog and rss
> To: William Stein <[EMAIL PROTECTED]>
>
>
> William,
>
> Non-developer users of Sage might enjoy learning more about what is
> going on in the Sage world.  A blog would be a great way to do this.
> You could post things like the AMS event, published articles, news of
> major changes in the software, upcoming cool new features, something
> funny that is Sage related, a profile of someone who has significantly
> contributed to the software, a user profile, and so on.  People could
> subscribe to it via email or RSS.  You could use a free blog service
> (webpress or blogspot or whatever) and use Google's free Feebburner
> for the email subscription service for people to subscribe.
>
> http://www.mathworks.com/company/rss/index.html
>
> Google has a blog that they post to about once every three weeks or so.
>
> Obviously making the software the best it can be is a bigger priority,
> but a blog could be useful at some point for keeping in touch with
> people (reporters, users, fans).
>
> --Dennis
>
>
>
> --
> 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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: plotQt.c with Qt 4.3.2 + GUI for pari/gp

2007-11-12 Thread didier deshommes

On 11/12/07, William Stein <[EMAIL PROTECTED]> wrote:
> I'm excited that there is so much enthusiasm and energy for open source
> projects / guis, etc., related to mathematical software right now.   I wonder
> if you've solved any problems I don't know how to solve (and conversely)
> related to such things?

I also stumbled accross Reinteract, which is similar to the Sage
notebook, only it's running on a GUI (Gtk in this case):
 http://blog.fishsoup.net/2007/11/10/reinteract-better-interactive-python/

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: random polynomial generation

2007-11-09 Thread didier deshommes

On 11/7/07, Martin Albrecht <[EMAIL PROTECTED]> wrote:
>
> Hi everybody,
>
> I've attached a 'random_monomial.py' to
>
>http://trac.sagemath.org/sage_trac/ticket/980
>
> which implements Steffen's and my proposal.

Hey guys,
I've attached a patch for this at
http://trac.sagemath.org/sage_trac/ticket/980 . Let me know if it
works for you.

didier

>
> Thoughts?
> Martin
>
> --
> name: Martin Albrecht
> _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
> _www: http://www.informatik.uni-bremen.de/~malb
> _jab: [EMAIL PROTECTED]
>
>
> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: libPng.dylib

2007-11-02 Thread didier deshommes

On 11/2/07, William Stein <[EMAIL PROTECTED]> wrote:
> How did the meeting go?  (There aren't any slides posted on that site, just a 
> list
> of titles.)  Did Sage get mentioned at all otherwise, or did it basically seem
> irrelevant from the point of view of the CDI people, etc.?

SAGE got mentioned a lot and I was a little surprised by this given
that I did not hear much about it this summer at SNC/PASCO 2007
(http://www.orcca.on.ca/conferences/snc2007/site/programsncpasco/sncprogram.html).
I don't know about ISSAC, though  as I did not attend and would love
to hear other people's experiences if they attended.  Someone (I don't
remember who) said that it might be a blessing in disguise that you
couldn't make it since so many people are already mentioning it ;) .
My impression is that SAGE is relevant especially if it gets used by
more applied mathematicians, etc.

AXIOM also got mentioned, especially by Emil Volcheck and he seems to
think that open-source projects like AXIOM and SAGE have a place in
getting funding by the government, whether it's though CDI or not.

(Hi Fernando!)

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Issue during upgrade

2007-11-01 Thread didier deshommes

On 10/28/07, Bobby Moretti <[EMAIL PROTECTED]> wrote:
>
> Sorry, accidentally hit send before I wrote anything :).
>
> When upgrading to 2.8.9, the upgrade halts with the output
>
> /bin/sed: can't read /home/bob/sage-2.8.7/local/lib/libgmp.la: No such
> file or directory

Having the same problem here. In this case, ~/custom/sage-2.8.8.1/
doesn't even exist, but ~/custom/sage does :
/bin/sed: can't read
/home/dfdeshom/custom/sage-2.8.8.1/local/lib/libgmp.la: No such file
or directory
libtool: link: `/home/dfdeshom/custom/sage-2.8.8.1/local/lib/libgmp.la'
is not a valid libtool archive

I don't remember having this problem before.
didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Feature Request/Talk Feedback

2007-11-01 Thread didier deshommes

On 11/1/07, Martin Albrecht <[EMAIL PROTECTED]> wrote:
> Usually, if we choose an implementation for a particular functionality, we try
> to make sure to always pick the best implementation available. However, this
> choice only applies to those systems we ship (singular, gap, pari ...) and
> not to the systems installed on a user's computer.
>
> As for many computations e.g. Magma is the fastest one person in the audience
> suggested to use Magma by default for those computations if it is available
> on a user's computer.

> I turned this down, because this would violate the principle that everything
> should be laid open for checking,should be free and self contained.

I agree and I'm also wondering how many lines of codes that would add
(because you have to check each time you call a method if magma is
installed, right?).

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: rich comparison

2007-10-26 Thread didier deshommes

2007/10/26, Robert Miller <[EMAIL PROTECTED]>:
> I have some questions about Python comparison. Suppose I have a Python
> class representing objects under some ordering, and I want to
> implement <=, <, >=, >, ==, != comparisons on those objects. I
> remember hearing somewhere that the __cmp__ method was deprecated, but
> now that I am thinking about it I can't find anything confirming that.
> Is there any reason to implement the functions __eq__, __neq__,
> __gt__, __ge__, __lt__, __le__, instead of just one __cmp__? Including
> forward compatibility, being more Python-ic or anything else?

I don't think __cmp__ is deprecated. From the docs
(http://docs.python.org/ref/customization.html), it looks like __le__,
__lt__, etc are called in preference to __cmp__ if they are defined.
Otherwise, __cmp__() is called. I think one main reason for using
these is to define more fine-grained relationships (partial ordering):
"""
There are no implied relationships among the comparison operators. The
truth of x==y does not imply that x!=y is false. Accordingly, when
defining __eq__(), one should also define __ne__() so that the
operators will behave as expected.
"""

So, just use __cmp__  and if you want to overload != for example, just
write your own __ne__

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: random polynomial generation

2007-10-26 Thread didier deshommes

2007/10/26, Steffen <[EMAIL PROTECTED]>:
> 1) Polynomial with max number of monomial. We dont need to worry about
> that case, since here all the monomial are chosen, that means actually
> there is nothing to choose. So this will be efficient anyway.
> 2) A user wants an exact < totalmax number of monomials. In this case
> its difficult to reach real randomness in an efficient way. Martins
> and my proposal in this case was to except collisions during the
> implementation, that is choose a random monomial and throw it away if
> already chosen. This is not most efficient, the expectation
> calculation period has 2 * the optimal time as upper bound.
> 3) A user wants a real random polynom with a certain number of
> monomials, but there is no need to fix a maximum number of monomials.
> An efficient implementation here would be:
> #m = maxNumberOfMonomials = "calculate it"
> #d = desiredNumberOfMonomials = "choose it"
> Iterate over the list of all monomials, with probability #d/#m choose
> this monomial.
> This would be faster than 2) and would return a polynomial with an
> expectation value of monomials of #d

Could you give an example for each of these cases? I'm having trouble
distinguishing the difference between 2) and 3)

Mike, your code had a subtle bug, where
random_monomials(n,degree,terms) failed each time for degree =1 (but
was fine for degree=0).

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: random polynomial generation

2007-10-25 Thread didier deshommes

2007/10/25, Mike Hansen <[EMAIL PROTECTED]>:
>
> > Is this function in sage? Where is it located?
>
> Which function?

Sorry, the random_monomials() function.

>
> --Mike
>
> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: random polynomial generation

2007-10-25 Thread didier deshommes

2007/10/25, Mike Hansen <[EMAIL PROTECTED]>:
>
> > Since integers are chosen uniformly, this would guarantee (?) that the
> > polynomial is generated uniformly. Only hitch is that I don't know if
> > there is such inttovec is in in SAGE yet. mhansen, any idea?
>
> Yes, this is pretty much what I'm doing.  While I don't have those
> exact functions, they would be easy to implement.
>
> How fast do these need to be?  Here's a rough function that uniformly
> selects monomials without replacement from all possible monomials with
> degree less than d.

Is this function in sage? Where is it located?

didier

>
> def random_monomials(n, degree, terms):
> #Get the counts of the total number of monomials
> #of degree d
> counts = [1]  #degree 0
> for d in range(1, degree):
> counts.append(binomial(n+d-1, d))
> total = sum(counts)
> #Select a random indices
> indices = sample(xrange(total), terms)
> monomials = []
> for random_index in indices:
> #Figure out which degree it corresponds to
> d = 0
> while random_index >= counts[d]:
> random_index -= counts[d]
> d += 1
> #Generate the corresponding monomial
> comb = choose_nk.from_rank(random_index, n+d-1, n-1)
> monomial = [ comb[0] ]
> monomial += map(lambda i: comb[i+1]-comb[i]-1, range(n-2))
> monomial.append( n+d-1-comb[-1]-1 )
> monomials.append(monomial)
> return monomials
>
> Here's an example:
>
> sage: time  random_monomials(20, 40, 20)
> CPU times: user 0.09 s, sys: 0.00 s, total: 0.09 s
> Wall time: 0.09
>
> [[8, 1, 5, 0, 0, 1, 2, 0, 1, 1, 2, 0, 0, 2, 4, 2, 1, 4, 3, 1],
>  [0, 0, 9, 2, 0, 7, 2, 0, 3, 2, 1, 0, 3, 1, 0, 1, 4, 0, 4, 0],
>  [0, 0, 3, 0, 1, 4, 3, 1, 0, 2, 1, 3, 4, 1, 1, 0, 6, 7, 0, 0],
>  [0, 2, 3, 0, 0, 2, 1, 2, 5, 3, 0, 0, 1, 5, 2, 0, 1, 1, 9, 0],
>  [0, 1, 1, 7, 0, 1, 6, 0, 1, 0, 1, 0, 1, 6, 2, 0, 7, 0, 2, 1],
>  [7, 0, 3, 1, 0, 6, 1, 4, 0, 8, 0, 0, 0, 0, 0, 1, 3, 3, 0, 0],
>  [0, 0, 0, 4, 1, 5, 3, 1, 1, 0, 0, 2, 3, 3, 3, 1, 4, 0, 1, 6],
>  [1, 2, 5, 0, 5, 1, 1, 0, 0, 7, 0, 1, 1, 1, 1, 2, 3, 4, 1, 0],
>  [1, 7, 0, 0, 4, 3, 0, 2, 0, 0, 1, 8, 1, 1, 0, 0, 2, 5, 0, 0],
>  [0, 4, 0, 3, 5, 0, 0, 0, 1, 0, 1, 3, 2, 1, 8, 4, 0, 0, 1, 0],
>  [1, 0, 9, 0, 1, 7, 3, 1, 2, 0, 0, 1, 0, 0, 5, 1, 0, 6, 0, 0],
>  [1, 3, 0, 3, 5, 0, 1, 2, 0, 2, 4, 1, 0, 4, 1, 2, 3, 1, 4, 0],
>  [0, 2, 3, 8, 1, 0, 3, 1, 0, 1, 1, 1, 0, 1, 5, 5, 1, 5, 0, 0],
>  [3, 0, 4, 0, 8, 0, 3, 1, 0, 2, 0, 1, 0, 3, 1, 6, 2, 2, 0, 1],
>  [2, 5, 1, 0, 1, 0, 2, 5, 1, 2, 3, 3, 0, 0, 0, 4, 4, 0, 0, 0],
>  [1, 0, 6, 2, 5, 0, 0, 0, 1, 4, 2, 0, 5, 0, 1, 1, 0, 0, 3, 4],
>  [1, 1, 0, 2, 0, 1, 1, 1, 3, 3, 2, 2, 1, 0, 0, 1, 1, 1, 11, 7],
>  [7, 0, 3, 0, 4, 1, 2, 1, 6, 0, 0, 1, 3, 1, 0, 0, 7, 3, 0, 0],
>  [1, 2, 3, 1, 0, 1, 0, 0, 3, 3, 2, 0, 5, 0, 0, 0, 3, 1, 2, 7],
>  [0, 5, 0, 3, 1, 1, 2, 0, 1, 1, 0, 1, 4, 2, 8, 2, 2, 1, 0, 2]]
>
>
> --Mike
>
> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: random polynomial generation

2007-10-25 Thread didier deshommes

2007/10/25, Martin Albrecht <[EMAIL PROTECTED]>:
> This construction is random if the random number generator ("randint") is
> random. Btw. how random is randint?

The core generator for all random functions in Python uses the
mersenne twister which is pretty strong.

I have another suggestion for this problem, that looks somewhat like
yours. Maple has 2 functions in its combinatorics package that :
inttovec(number,nvars) which turns a number into vector of length
nvars, and vectotint(vec) that does the opposite. Here's the
documentation for them:
"""
These two functions provide a one-to-one correspondence between the
non-negative integers and all vectors composed of n non-negative
integers.
The one-to-one correspondence is defined as follows. View all vectors
of n non-negative   integers as exponent vectors on n variables.
Therefore, for each vector, there is a   corresponding monomial.
Collect all such monomials and order them by increasing total
degree. Resolve ties by ordering monomials of the same degree in
lexicographic order. This gives a canonical ordering.
"""
Ex:
> inttovec(9,2);
  [0, 3]

> vectoint([0,3]);
9

Now the idea is simple: for random_elements(deg,terms) , generate the
a number randomly in (0, nchoosek(n+d-1,d)) and compute the
corresponding monomial:

for t in terms:
   num = randint(0, nchoosek(n+d-1,d))
   term = inttovec(num,nvars)

Since integers are chosen uniformly, this would guarantee (?) that the
polynomial is generated uniformly. Only hitch is that I don't know if
there is such inttovec is in in SAGE yet. mhansen, any idea?

didier

>
> Now we need to choose a degree d at random. We cannot do this uniformly at
> random because the classes (associated to the degree) are not of the same
> size (e.g., 1, 10, 55 above) We don't want to choose classes uniformly but
> elements and again mhansen beat me to an implementation:
>
> def random_monomial_less_than_degree(n, degree):
>  #Get the counts of the total number of monomials
>  #of degree d
>  counts = [1]  #degree 0
>  for d in range(1, degree):
>  counts.append(binomial(n+d-1, d))
>  total = sum(counts)
>  #Select a random one
>  random_index = randint(0, total-1)
>  #Figure out which degree it corresponds to
>  d = 0
>  while random_index >= counts[d]:
>  random_index -= counts[d]
>  d += 1
>
>  #Generate the corresponding monomial
>  comb = choose_nk.from_rank(random_index, n+d-1, n-1)
>  monomial = [ comb[0] ]
>  monomial += map(lambda i: comb[i+1]-comb[i]-1, range(n-2))
>  monomial.append( n+d-1-comb[-1]-1 )
>  return monomial
>
> However, an implementation without the need to explicitly construct the counts
> array would be good.
>
> With this in place one can start thinking about constructing random
> polynomials from random monomials. For this we don't have an elegant solution
> yet. We (=Steffen and me) distinguish two cases:
>
> Let #T be the number of terms requested.
>
> If $MM is the number of all possible monomials of all allowed degree <= d and
> #T < $MM/2 then we generate #T _distinct_ monomials as above and assign
> random coefficients (possibly zero). The overhead of requesting distinct
> monomials should be at most 2 because if we are looking for 1/2 of the search
> space, every second choice should be a double.
>
> If #T > $MM/2 we generate all possible monomials, pick #T and assign
> coefficients. This should be more effective for this case because we don't
> generate any doubles (but memory is more precious than cpu cycles, so we
> might have to move that barrier up a bit).
>
> Does this sound like a sensible approach?
>
> Martin
>
> --
> name: Martin Albrecht
> _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
> _www: http://www.informatik.uni-bremen.de/~malb
> _jab: [EMAIL PROTECTED]
>
>
> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: random polynomial generation

2007-10-24 Thread didier deshommes
I've attached a patch that takes care of 1) only and updated
http://sagetrac.org/sage_trac/ticket/980 . The individual degree
distribution is a little better:
{{{
sage: GF(10007)['x,y,q'].random_element(6,10)
 -2005*x^6 + 2400*x^4*y^2 - 3609*x^3*y^3 + 488*x*y^5 - 3093*x^4*y*q +
3482*x*y*q^3 - 989*x^2*y*q - 3529*x*q^3 - 3957*x
}}}

But note that most of the time for the example at the beginning of the
thread, we still get 6,7 out of 9 terms most of the time. I still
don't think this is a bug: we are not creating a polynomial with 9
terms in it, but picking one with at most 9 terms.
{{{
sage: GF(10007)['x,y'].random_element(4,9)
 797*x^4 - 439*x^2*y^2 - 1457*x*y^3 - 2348*y^4 - 1721*x^3 - 1885*x^2*y
- 1760*x*y^2 + 310*y
}}}


didier

2007/10/24, Steffen <[EMAIL PROTECTED]>:
>
>
>
> On Oct 24, 5:45 am, "didier deshommes" <[EMAIL PROTECTED]> wrote:
> > 2007/10/23, Steffen <[EMAIL PROTECTED]>:
> >
> > > Exactly, thats one of two points. The maximum degree in every variable
> > > is (maximum total degree of resulting polynomial) / (number of
> > > varialbes of the polynomial). Thus for example GF(10007)
> > > ['x,y,z'].random_element(5,9) will be limited in every variable to
> > > degree 5/3 = 1 !!!. This is not what the upper definition says.
> > > The second point is about the number of coefficients that are set to
> > > 0. This might a point to argue about, but if I create a random
> > > polynomial with a  (maximum number of terms to generate) then I expect
> > > that the 0 occurs with the same probability and thus as often as every
> > > other element. Thats why I am not happy if 20% or more of the
> > > parameters are 0.
> >
> > I filed out a bug report about those 2 issues:
> > 1) Degrees can severely restricted.
> > 2) The polynomials returned can be too sparse
> >
> > I plan to post a patch addressing your concerns (I can especially see
> > how 1) can be annoying). Random poly generation will most likely be
> > slower, so for now I'm planning to keep the current behavior around,
> > even if it is not the default.
> >
> > didier
>
> Thanks, I will wait for didiers patch. If I then have any additional
> requirements I will implement them via an optional flag or smth
> similar.
>
> Steffen
>
>
> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---

diff -r 1a19787af98d sage/rings/polynomial/multi_polynomial_ring_generic.pyx
--- a/sage/rings/polynomial/multi_polynomial_ring_generic.pyx   Sun Oct 21 
10:13:32 2007 -0700
+++ b/sage/rings/polynomial/multi_polynomial_ring_generic.pyx   Wed Oct 24 
18:23:14 2007 -0400
@@ -453,23 +453,31 @@ cdef class MPolynomialRing_generic(sage.
 
 sage: R.random_element(41) # random
 -4*x^6*y^4*z^4*a^6*b^3*c^6*d^5 + 1/2*x^4*y^3*z^5*a^4*c^5*d^6 - 
5*x^3*z^3*a^6*b^4*c*d^5 + 10*x^2*y*z^5*a^4*b^2*c^3*d^4 - 5*x^3*y^5*z*b^2*c^5*d
-
+sage: f=ZZ['q,w,e,r,t,y'].random_element(degree=200,terms=19)
+sage: f.degree() <= 200
+True
+
 AUTHOR:
 -- didier deshommes
 """
-# General strategy:
-# generate n-tuples of numbers with each element in the tuple
-# not greater than  (degree/n) so that the degree 
-# (ie, the sum of the elements in the tuple) does not exceed
-# their total degree
-
+
 n = self.__ngens # length of the n-tuple
-max_deg = int(degree/n)  # max degree for each term
 R = self.base_ring()
 
-# restrict exponents to positive integers only
-exponents = [ tuple([ZZ.random_element(0,max_deg+1) for _ in range(n)])
-   for _ in range(terms) ]
+exponents = []
+for i in range(terms):
+exps = []
+deg = degree
+for i in range(n):
+exp = ZZ.random_element(0,deg+1)
+if exp <= deg:
+exps.append(exp)
+deg -= exp 
+else:
+exps.append(0)
+
+exponents.append(tuple(exps))
+
 coeffs = []
 for _ in range(terms):
 c = R.random_element(*args,**kwds)


[sage-devel] Re: random polynomial generation

2007-10-23 Thread didier deshommes

2007/10/23, Steffen <[EMAIL PROTECTED]>:
> Exactly, thats one of two points. The maximum degree in every variable
> is (maximum total degree of resulting polynomial) / (number of
> varialbes of the polynomial). Thus for example GF(10007)
> ['x,y,z'].random_element(5,9) will be limited in every variable to
> degree 5/3 = 1 !!!. This is not what the upper definition says.
> The second point is about the number of coefficients that are set to
> 0. This might a point to argue about, but if I create a random
> polynomial with a  (maximum number of terms to generate) then I expect
> that the 0 occurs with the same probability and thus as often as every
> other element. Thats why I am not happy if 20% or more of the
> parameters are 0.

I filed out a bug report about those 2 issues:
1) Degrees can severely restricted.
2) The polynomials returned can be too sparse

I plan to post a patch addressing your concerns (I can especially see
how 1) can be annoying). Random poly generation will most likely be
slower, so for now I'm planning to keep the current behavior around,
even if it is not the default.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: random polynomial generation

2007-10-16 Thread didier deshommes

2007/10/16, Steffen <[EMAIL PROTECTED]>:
> Hi didier,
>
> the implementation does not return a polynomial of a total degree of
> at most 4, but a polynomial of total degree of at most 4/2 = 2 in x
> and in y. If I change the total degree to 5, nothing happens, since
> 5/2 = 2. This might be a bug in the implementation. However I am happy
> with this behaviour and maybe there should be the option for choosing
> the total degree or the degree in every variable.

For total degree, I'm using the definition here:
http://planetmath.org/encyclopedia/OrderAndDegreeOfPolynomial.html

So I am not concerned about individual degrees at all.

> Furthermore I am not happy with this implementation in general. In
> step 1.) you do not care about repetitions. This sounds reasonible
> since repetitions are part of randomness. Later in step 3) you do care
> about repetetions and summarise them under the value 0. If the value 0

I don't explicitly discard repetitions in 3), the dictionary object
takes care of that by discarding repeated keys (in this case, the keys
are the degree tuples).

didier

> gains the same importance as all other values in the corresponding set
> of values, than the  multiple occurance of 0 is a repetition, too.
>
> I am quite new in SAGE and have no idea how sage code looks like, but
> I will have a look and see if I can do some changes :-)
>
> Cheers, Steffen
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: random polynomial generation

2007-10-15 Thread didier deshommes

2007/10/15, Steffen <[EMAIL PROTECTED]>:
>
> Hi,
>
> I need to create a random multivariate polynomial. I do it as follows:
>
> F = GF(10007)['x,y'].random_element(4,9)

Hi Stephen,
This is not an "exact" function. The only guarantee we have is that we
will get a polynomial with total degree of   *at most* 4 and total
number of terms is *at most* 9.

You're right, in such a big field the coefficient is almost always
nonzero. The problem is in the degrees: we don't check for repetitions
when generating them (we don't care). As you know, we often view
multivariate polynomials as dictionaries with the degrees as keys and
the coefficients as values. The functions works simply (with
parameters 4 and 9):
1) generate 9 random tuples of for the degrees. The only requirement
we have is that the sum of the element in these tuples must not exceed
 4. Repetitions are allowed.
2) Generate 9 coefficients.
3) Create a dictionary where the keys are the degree tuples and the
values are the coefficients. Repetitions are discarded and that is how
we end up with a polynomial with less than 9 terms.
4) Create a polynomial from this dictionary and return it.

Hope that helps.

didier

>
> Now, sage creates a polynomial in x and y of degree 2 in every
> variable, since 4 = 2+2. Furthermore 9 restricts the polynomial to 9
> coefficients. I could not find any documentation for
> "random_element(..,..)" but thats my guess after tinkering around with
> the values. So far everything is perfect.
> The problem is now, that most of the time the created polynomial has
> only 6 or 7 coefficients. Since the probability to choose 0 in the
> field GF(bigPrime) is quite low, I would expect the polynomial to have
> 9 coefficients in most cases. If I increase this second parameter of
> the random_element function, the average number of coefficients
> increases up to the maximum possible number of coefficients, which is
> 9. Unfortunately, the computation time for creating the polynomial
> increases nearly linearly with the second parameter of the
> "random_element" function.
> So I am wondering if my understanding of the parameters of
> "random_elment" is wrong or if this function really produces such
> results, which I do not regard as random behaviour.
>
> Cheers, Steffen
>
>
> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: multivariate polynomial coefficients

2007-10-13 Thread didier deshommes

2007/10/13, Joel B. Mohler <[EMAIL PROTECTED]>:
>
> Thanks for the discussion about this topic.  I send this mail to re-iterate
> and summarize.  It seems there are two things that you might want:
> 1)  Get the coefficient of a specific monomial in the multivariate polynomial
> ring.
> 2)  Get the coefficient of the polynomial in a tower of (two) polynomial
> extensions
>
> I suggest that MPolynomial.coefficient method perform function #1 above.  It
> currently does some strange things over the base rings I've tested.  It does
> vary on base ring due to implementation differences.
>
> I suggest that there be a new method which performs function #2 and I suggest
> it be called "polynomial_coefficient", but I really don't like that name.  I
> almost prefer "coefficient_polynomial" since it will sort beside coefficient
> in documentation and help people realize that if they are not happy
> with "coefficient" that they have an alternative.  Of course, each method's
> documentation should probably mention the other.

+1,
Those should be 2 separate methods, as they try to solve 2 (slightly)
different problems.

>
> I'm wondering if we could have a vote on preferred syntax.  I'm not going to
> describe the parameters because if they are not clear enough from context, it
> probably isn't a good parameter choice :) :
>
> sage: P.=ZZ[]
> sage: f=(1-v)*(1-2*w)*(1-3*x); f
> -6*v*w*x + 2*v*w + 3*v*x + 6*w*x - v - 2*w - 3*x + 1
> ##
> #  Alternative Number 1
> ##
> sage: f.polynomial_coefficient({w:0,v:1})
> 3*x - 1

+1 for this notation.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: multivariate polynomial coefficients

2007-10-12 Thread didier deshommes

2007/10/12, Joel B. Mohler <[EMAIL PROTECTED]>:
> sage: P.=ZZ[]
> sage: f=x*y^2*z^3+y^2*z
> sage: f.coefficient(y,2,z,3)  # I want the "coefficient" of y^2*z^3
> # Bang
>
> That doesn't seem very nice to me.

Good point: Dictionary it is then. (Incidentally, there downs seem a
non-obvious way to do this in Maple).

didier

>
> --
> Joel
>
> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: multivariate polynomial coefficients

2007-10-12 Thread didier deshommes

2007/10/12, Joel B. Mohler <[EMAIL PROTECTED]>:
>
> This e-mail is too long.  Here's the bottom line:  I suggest that the
> coefficient method on a multivariate polynomial ring take a dictionary
> indicating the variables and degrees that you want to restrict your attention
> to.
>
> It seems that the multivariate polynomial coefficient function is a bit
> inflexible (and inconsistent).  I'm looking for some insight about how to
> think about the following things.
>
> sage: P.=ZZ[]
> sage: f=x*y^2+x*y+y+x+1
> sage: f.coefficient(y^2)
> x
> sage: f.coefficient(y^1)
> x + 1
> sage: f.coefficient(y^0)
> 1
>
> I realize that y^0 == 1 so that the last line is returning the constant
> coefficient (and the implication that y is special to me the user is totally
> unseen by the coefficient method).  But, the logic seems a bit inconsistent.
> I'd suggest that this next line work:
>
> sage: f.coefficient({y:0})
> x + 1

+1.

Interestingly enough, Maple has the same limitation when you pass the
exponent to it directly:
> coeff(f,y^0);
Error, invalid input: coeff received 1, which is not valid for its 2nd
argument, x

But:
> coeff(f,y,0);
  x + 1

returns the right answer

Actually I like Maple's notation better here over the dictionary
notation you proposed: it is as intuitive and I have to type less
curly braces to get the same result :)

didier

--~--~-~--~~~---~--~~
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] Re: dsage

2007-10-10 Thread didier deshommes

2007/10/10, John Voight <[EMAIL PROTECTED]>:
>
> What is "screen"?  Unfortunately, it is not an easy thing to Google!

Here is a link to screen :
http://www.gnu.org/software/screen/

There's a quick tutorial here:
http://www.kuro5hin.org/story/2004/3/9/16838/14935

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.8.3 on Solaris - A New Hope

2007-09-28 Thread didier deshommes

2007/9/25, mabshoff <[EMAIL PROTECTED]>:
>
>
>
> On Sep 24, 10:42 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> > On 9/24/07, didier deshommes <[EMAIL PROTECTED]> wrote:
> >
> > > Some build notes:
> > > - Singular needs "-lcurses" whenever "-lreadline" is specified. Using
> > > it from the console still fails for me.
>
> It depends how readline is build. Many times -ltermcap should fix the
> problem, but I got Singular to build and run without problems on
> Solaris 9/10 Sparc and Solaris 10 Opteron. Another solution might be
> to build ncurses, but I would have to look at the beautiful and well
> structured Singular build system 8)


I'm able to start it from the console (with -ltermcap), but I had to
change the singular.py interface so that the executable would point to
$SAGE_LOCAL/bin/Singular-3-0-3 instead of SAGELOCAL/bin/Singular. I'm
guessing a link didn't get updated or something...


> I think the trick to building clisp on Solaris is to use a gcc 3.4 and
> pass -DNOGENERATIONALGC or something during the build. That is at
> least the workaround on NetBSD and when I build Sage's clisp on
> Solaris 9 the last time it crashes during the first invocation of the
> garbage collector. I reported the problem to the clisp development
> list but never got a reply.

Painful.

>
> > > - to  build matplotlib, python needs this fix:
> > >http://www.scipy.org/Cookbook/Matplotlib/CompilingMatPlotLibOnSolaris...
>
> Interesting, never had that problem.

Very interesting, I've had to build it on Solaris and nexenta and each
time compilation of matplotlib failed until I tried this.

> Easiest is to symbolically link gfortran or g95 to g77, otherwise

I did that, and I get this:
"""
customize GnuFCompiler
Couldn't match compiler version for 'G95 (GCC 4.0.3 (g95 0.90!) Aug  1
2006)\nCopyright (C) 2002-2005 Free Software Foundation, Inc.\n\nG95
comes with NO WARRANTY, to the extent permitted by law.\nYou may
redistribute copies of G95\nunder the terms of the GNU General Public
License.\nFor more information about these matters, see the file named
COPYING'
customize Gnu95FCompiler
customize SunFCompiler
'linker_exe'
[...]

f90:f77: Lib/fftpack/dfftpack/dcosqb.f
sh: f90: not found
sh: f90: not found
error: Command "f90 -ftrap=%none -fixed -xcode=pic32 -c -c
Lib/fftpack/dfftpack/dcosqb.f -o
build/temp.solaris-2.11-i86pc-2.5/Lib/fftpack/dfftpack/dcosqb.o"
failed with exit status 1
Error building scipy.
"""

Do you know how scipy picks its compiler? The build scripts look opaque to me...

Testing of interfaces is completely broken for me, I can't tell if I
miscompiled pexpect or if it's something much scarier/deeper.


didier

> > > Tests that failed:
> >
> > Yikes!
> >
> >
> >
> > >sage -t  algebras/free_algebra_quotient.py
> > > sage -t  calculus/calculus.py
> > > sage -t  ext/interactive_constructors_c.pyx
> > > sage -t  functions/constants.py
> > > sage -t  functions/functions.py
> > > sage -t  functions/transcendental.py
> > > sage -t  geometry/lattice_polytope.py
> > > sage -t  interfaces/gap.py
> > > sage -t  interfaces/singular.py
> > > sage -t  lfunctions/lcalc.py
>
> I got a fix for lcalc. Need to send it in :)
>
> > > sage -t  lfunctions/sympow.py
>
> No fix for Sympow on Solaris with Intel/AMD chips so far, but I
> believe that the problem is that sympow detects an Intel/AMD cpu and
> uses special assembly flags to use the extended FPU precision, while
> the fallback mode should be used.
>
> > > sage -t  matrix/matrix2.pyx
> > > sage -t  matrix/matrix_integer_dense.pyx
> > > sage -t  matrix/matrix_mpolynomial_dense.pyx
> > > sage -t  matrix/matrix_space.py
> > > sage -t  modular/ssmod/ssmod.py
> > > sage -t  plot/plot.py
> > > sage -t  rings/number_field/number_field.py
> > > sage -t  rings/number_field/number_field_element.pyx
> > > sage -t  rings/number_field/number_field_ideal_rel.py
> > > sage -t  rings/polynomial/groebner_fan.py
> > > sage -t  rings/polynomial/multi_polynomial_element.py
> > > sage -t  rings/polynomial/multi_polynomial_ideal.py
> > > sage -t  rings/polynomial/multi_polynomial_ideal_libsingular.pyx
> > > sage -t  rings/polynomial/multi_polynomial_libsingular.pyx
> > > sage -t  rings/polynomial/multi_polynomial_ring.py
> >

[sage-devel] Re: singular gcd slow-down

2007-09-25 Thread didier deshommes
2007/9/19, Joel B. Mohler <[EMAIL PROTECTED]>:
>
> On Wednesday 19 September 2007 16:22, William Stein wrote:
> > I think those timings are way out of date, since Singular 3 seems
> > to be *very* fast at mod p multivariate GCD computation, even
> > though it sucks over QQ.   Check out this paper:
> >
> >   http://www.cecm.sfu.ca/CAG/papers/brown.ps
> >
> > It on exactly the problem of GCD over QQ (or equiv ZZ),
> > and section 2 has a complete description of a gcd algorithm
> > that reduces gcd over ZZ to doing gcd's mod p.
>
> I'll be looking into implementing that.  It makes me disgruntled to be at the
> mercy of mathematica (or pick your favorite big commercial m).  :D.

FYI,
I plan on implementing a multivariate gcd algorithm for Sage over RR
and CC some time next year. The algorithm is by Kaltofen et al. Here's
the abstract:
"
 Abstract. We consider the problem of computing minimal real or
complex deformations to
the coefficients in a list of relatively prime real or complex
multivariate polynomials such that the
deformed polynomials have a greatest common divisor (GCD) of at least
a given degree k. In addition,we restrict the deformed coefficients by a
given set of linear constraints, thus introducing the linearly
constrained approximate GCD problem. We present an algorithm based on
a version of the structured
"

There is already an implementation of the algorithm written in maple
available here if anyone is interested:
http://www4.ncsu.edu/~kaltofen/software/manystln/

didier

>
> --
> Joel
>
> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Fwd: Trac rules

2007-09-24 Thread didier deshommes

2007/9/24, Robert Bradshaw <[EMAIL PROTECTED]>:

> I like the idea of giving people edit access to a wiki when they
> become contributors, and think this should be periodically (and
> perhaps manually) copied over to a static page periodically.

+1

>
> - Robert
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.8.3 on Solaris - A New Hope

2007-09-24 Thread didier deshommes

2007/9/17, didier deshommes <[EMAIL PROTECTED]>:
> 2007/9/16, mabshoff <[EMAIL PROTECTED]>:
> > Didier, does "sage -testall" pass on your install?
>
> Actually, I stopped at lapack due to lack of time. I'm plan to
> continue where I left things off on thursday (a little before sbd 3
> officially starts).

Some build notes:
- Singular needs "-lcurses" whenever "-lreadline" is specified. Using
it from the console still fails for me.
- clisp won't build but I noticed that blastwave.org has a binary
version 2.39 so I installed that and maxima detected it.
- to  build matplotlib, python needs this fix:
http://www.scipy.org/Cookbook/Matplotlib/CompilingMatPlotLibOnSolaris10?highlight=%28solaris%29
I did have a spkg wich that tried to get around that...
- quaddouble: I re-enabled your rqdf_fix.h to get around isinf(), INFINITY, etc.
- I have not installed scipy because I don't know how to point
sage_fortran.bin to my fortran compiler. I'm sure the solution simple
though...

Tests that failed:
   sage -t  algebras/free_algebra_quotient.py
sage -t  calculus/calculus.py
sage -t  ext/interactive_constructors_c.pyx
sage -t  functions/constants.py
sage -t  functions/functions.py
sage -t  functions/transcendental.py
sage -t  geometry/lattice_polytope.py
sage -t  interfaces/gap.py
sage -t  interfaces/singular.py
sage -t  lfunctions/lcalc.py
sage -t  lfunctions/sympow.py
sage -t  matrix/matrix2.pyx
sage -t  matrix/matrix_integer_dense.pyx
sage -t  matrix/matrix_mpolynomial_dense.pyx
sage -t  matrix/matrix_space.py
sage -t  modular/ssmod/ssmod.py
sage -t  plot/plot.py
sage -t  rings/number_field/number_field.py
sage -t  rings/number_field/number_field_element.pyx
sage -t  rings/number_field/number_field_ideal_rel.py
sage -t  rings/polynomial/groebner_fan.py
sage -t  rings/polynomial/multi_polynomial_element.py
sage -t  rings/polynomial/multi_polynomial_ideal.py
sage -t  rings/polynomial/multi_polynomial_ideal_libsingular.pyx
sage -t  rings/polynomial/multi_polynomial_libsingular.pyx
sage -t  rings/polynomial/multi_polynomial_ring.py
sage -t  rings/polynomial/multi_polynomial_ring_generic.pyx
sage -t  rings/polynomial/polynomial_element.pyx
sage -t  rings/polynomial/polynomial_quotient_ring.py
sage -t  rings/polynomial/polynomial_quotient_ring_element.py
sage -t  rings/polynomial/polynomial_singular_interface.py
sage -t  rings/polynomial/term_order.py
sage -t  rings/polynomial/toy_buchberger.py
sage -t  rings/complex_double.pyx
sage -t  rings/homset.py
sage -t  rings/morphism.py
sage -t  rings/power_series_ring.py
sage -t  rings/quotient_ring.py
sage -t  rings/quotient_ring_element.py
sage -t  rings/real_double.pyx
sage -t  rings/real_rqdf.pyx
sage -t  rings/ring.pyx
sage -t  schemes/elliptic_curves/ell_padic_field.py
sage -t  schemes/elliptic_curves/ell_rational_field.py
sage -t  schemes/generic/affine_space.py
sage -t  schemes/generic/algebraic_scheme.py
sage -t  schemes/generic/divisor.py
sage -t  schemes/generic/morphism.py
sage -t  schemes/generic/projective_space.py
sage -t  schemes/hyperelliptic_curves/hyperelliptic_padic_field.py
sage -t  schemes/plane_curves/affine_curve.py
sage -t  schemes/plane_curves/constructor.py
sage -t  schemes/plane_curves/curve.py
sage -t  schemes/plane_curves/projective_curve.py
sage -t  structure/element.pyx


>
> didier
>
> >
> > 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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Fwd: Calculus

2007-09-18 Thread didier deshommes

BTW, matlab has 1-based indexing too. Maple has both: there is an
array object that can be 0,1,2,... based and a List object that is
1-based. I think it would be nice to have an iterator object similar
to (1:n) in matlab (but not a list object).

didier

2007/9/18, Joel B. Mohler <[EMAIL PROTECTED]>:
>
> On Tuesday 18 September 2007 14:34, Robert Bradshaw wrote:
> >  I still like the [a..b] notation that makes
> > things totally obvious, and I am as surprised as Peter Doyle at the
> > shift of topic of whether or not indices should be 0-based (which we
> > don't have a choice about while sticking with Python).
>
> Well, I'll respond as to why I think they are exactly the same issue (in
> spirit) since I'm the one who brought up 0-based vs. 1-based.   To me, it is
> very very intuitive that range(10) has 10 elements.  The only serious point
> of contention is where those 10 elements start.  That's why I think that
> these are the same issues.
>
> I'll also say that I didn't mean to open this can of worms.  It was just on my
> mind at the time and I don't really expect us to preparse or change python to
> work around this.  However, I could fully understand why anyone would think
> it a royal pain in the neck.  When trying to compute something that you read
> on paper, it is a continual conversion and a very confusing conversion.
> After all, one of the classic source of programming errors is "off-by-one".
>
> --
> Joel
>
> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.8.3 on Solaris - A New Hope

2007-09-17 Thread didier deshommes

2007/9/16, mabshoff <[EMAIL PROTECTED]>:
> Didier, does "sage -testall" pass on your install?

Actually, I stopped at lapack due to lack of time. I'm plan to
continue where I left things off on thursday (a little before sbd 3
officially starts).

didier

>
> 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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.8.3 on Solaris - A New Hope

2007-09-16 Thread didier deshommes

2007/9/16, mabshoff <[EMAIL PROTECTED]>:
> it looks like you are running a fairly recent OpenSolaris build. But
> is it "pure" OpenSolaris or Nexenta? I know you used Nexenta in the
> past, but that is quite different because the userspace is close to
> 100% GNU while Solaris is sufficiently different to cause issues. I
> run the latest official Solaris 10 U4:

It is pure Solaris. More specifically this is "Solaris Express
Community Edition b57". The only modifications I made is that I  use
gnu build tools whenever I can (ie gmake, gcc, gas, ranlib, tar, etc).
I hope that answers your question.

>
> uname -a
> SunOS unknown 5.10 Generic_120012-14 i86pc i386 i86pc
>
> > ~/custom/sage-2.8.4.2 $ gcc -v
> > Reading specs from /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.0.2/specs
> > Target: i386-pc-solaris2.8
> > Configured with: ../sources/gcc-4.0.2/configure --prefix=/opt/csw/gcc4
> > --with-local-prefix=/opt/csw --with-gnu-as --with-as=/opt/csw/bin/gas
> > --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-threads=posix
> > --enable-shared --enable-multilib --enable-nls --with-included-gettext
> > --with-libiconv-prefix=/opt/csw --with-x --enable-java-awt=xlib
> > --with-system-zlib --enable-languages=c,c++,f95,java,objc,ada
> > Thread model: posix
> > gcc version 4.0.2
> >
> > I am using  pre-compiled packages from blastwave.
>
> " --enable-threads=posix" might take care of some of the python issue.
> I have seen python 2.5.1 at blastwave.org, so I assume it is possible
> to build it without too much fiddling. William and  I wanted to build
> everything from source without the need to install external packages.
> And we are trying to also get it to work in Solaris 9.
>

> Haven't seen that one. But it is a GMP symbol and I have no idea why
> that would be linked against Lapack. The BlastWave binary also seems
> to have been compiled for Solaris 2.8, so that might be an issue.

Come to thinks about it, I think the gfortran lapack package installs
mpfr (or gmp I can't remember) with it. The solution might as simple
as grabbing the gfortran binary for x86-solaris and installing it
manually.

didier

> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage 2.8.3 on Solaris - A New Hope

2007-09-16 Thread didier deshommes

2007/9/16, mabshoff <[EMAIL PROTECTED]>:
> Solaris 10 on Opteron:
>
> toolchain:
>
> ../gcc-4.2.1/configure --with-ld=/usr/sfw/i386-sun-solaris2.10/bin/ld
> --with-as=/usr/sfw/bin/gas \
> --prefix=/usr/local/gcc-4.2.1 --enable-languages=c,c++,fortran --with-
> gmp=/usr/local/gmp-4.2.2-32/ \
> --with-mpfr=/usr/local/mpfr-2.2.1p2-32/
> ###
> Issues:
> ###

I am using solaris 10 also (granted, on a p4), but so far I'm not
running into as many issues are you are:
~/custom/sage-2.8.4.2 $ uname -a
SunOS unknown 5.11 snv_57 i86pc i386
~/custom/sage-2.8.4.2 $ gcc -v
Reading specs from /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.0.2/specs
Target: i386-pc-solaris2.8
Configured with: ../sources/gcc-4.0.2/configure --prefix=/opt/csw/gcc4
--with-local-prefix=/opt/csw --with-gnu-as --with-as=/opt/csw/bin/gas
--without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-threads=posix
--enable-shared --enable-multilib --enable-nls --with-included-gettext
--with-libiconv-prefix=/opt/csw --with-x --enable-java-awt=xlib
--with-system-zlib --enable-languages=c,c++,f95,java,objc,ada
Thread model: posix
gcc version 4.0.2

I am using  pre-compiled packages from blastwave. The only showstopper
has been lapack:
sage_fortran -fPIC  -c lsame.f -o lsame.o
ld.so.1: f951: fatal: relocation error: file
/opt/csw/gcc4/libexec/gcc/i386-pc-solaris2.8/4.0.2/f951: symbol
__gmpn_clz_tab: referenced symbol not found

ntl, python, libgcrypt and even linbox are some of the packages that
build flawlessly.

didier

>
> * libgcrypt-1.2.4
>
> In src/tests/Makefile.in:
>
> LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS)
> \
> $(AM_LDFLAGS) $(LDFLAGS) -lnsl -lsocket -lmp -lscf -lgen -
> ldoor -lmd -lgcc_s -L/lib/ -luutil -o $@
>
> Bug in os installation: in /lib: missing link to libuutil.so from
> libuutil.so.1?
>
> * opencdk-0.5.9
>
> In src/tests/Makefile.in:
>
> LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS)
> \
> $(AM_LDFLAGS) $(LDFLAGS) \
> -lnsl -lsocket -lmp -lscf -lgen -ldoor -lmd -lgcc_s -L/lib/ -
> luutil -o $@
>
>
> * gnutls-1.6.3: unresolved problem:
>
> /bin/bash ../libtool --tag=CC   --mode=link gcc  -D_REENTRANT -
> D_THREAD_SAFE -Wno-pointer-sign -pipe -I/export/home/mabshoff/
> sage-2.8.4.2/local/include  -I/export/home/mabshoff/sage-2.8.4.2/local/
> include   -lnsl -lsocket -lmp -lscf -lgen -ldoor -lmd -lgcc_s -L/lib/ -
> luutil -o gnutls-serv serv-gaa.o serv.o common.o select.o ../lib/
> libgnutls.la ../libextra/libgnutls-extra.la -L/export/home/mabshoff/
> sage-2.8.4.2/local/lib -lgcrypt -L/export/home/mabshoff/sage-2.8.4.2/
> local/lib -lgpg-error
> gcc -D_REENTRANT -D_THREAD_SAFE -Wno-pointer-sign -pipe -I/export/home/
> mabshoff/sage-2.8.4.2/local/include -I/export/home/mabshoff/
> sage-2.8.4.2/local/include -o .libs/gnutls-serv serv-gaa.o serv.o
> common.o select.o  -lnsl -lsocket -lmp -lscf -lgen -ldoor -lmd -lgcc_s
> -L/lib/ -luutil ../lib/.libs/libgnutls.so -L/export/home/mabshoff/
> sage-2.8.4.2/local/lib ../libextra/.libs/libgnutls-extra.so /export/
> home/mabshoff/sage-2.8.4.2/spkg/build/gnutls-1.6.3/src/lib/.libs/
> libgnutls.so -lz -lxnet /export/home/mabshoff/sage-2.8.4.2/local/lib/
> libgcrypt.so /export/home/mabshoff/sage-2.8.4.2/local/lib/libgpg-
> error.so -Wl,--rpath -Wl,/export/home/mabshoff/sage-2.8.4.2/local/lib
> ../libextra/.libs/libgnutls-extra.so: undefined reference to
> [EMAIL PROTECTED]'
> ../libextra/.libs/libgnutls-extra.so: undefined reference to
> [EMAIL PROTECTED]'
> ../libextra/.libs/libgnutls-extra.so: undefined reference to
> [EMAIL PROTECTED]'
> ../libextra/.libs/libgnutls-extra.so: undefined reference to
> [EMAIL PROTECTED]'
> ../libextra/.libs/libgnutls-extra.so: undefined reference to
> [EMAIL PROTECTED]'
> ../libextra/.libs/libgnutls-extra.so: undefined reference to
> [EMAIL PROTECTED]'
> ../libextra/.libs/libgnutls-extra.so: undefined reference to
> [EMAIL PROTECTED]'
> ../libextra/.libs/libgnutls-extra.so: undefined reference to
> [EMAIL PROTECTED]'
> ../libextra/.libs/libgnutls-extra.so: undefined reference to
> [EMAIL PROTECTED]'
>
> Odd, because ntohs and so on are in -lsocket -lnls -lresovl - cc
> shooting across. Sun ld issue?
>
> * python: needs "-lrt -laio -lmd" for symbols sem_init() - bug in
> configure script.
>   "-lmd" also fixes md5 import problem.
>
>   problems with sockets - see below:
>
> * twisted: "import socket" fails
>
> running install_egg_info
> Writing /export/home/mabshoff/sage-2.8.4.2/local/lib/python2.5/site-
> packages/zope.interface-3.3.0-py2.5.egg-info
> Traceback (most recent call last):
>   File "setup.py", line 20, in 
> from twisted import copyright
>   File "./twisted/__init__.py", line 26, in 
> from twisted.python import compat
>   File "./twisted/python/compat.py", line 15, in 
> import sys, string, socket, struct
>   File "/export/home/mabshoff/sage-2.8.4.2/local/lib/python2.5/
> socket.py", line 45, in 
> import _socket
> ImportError: No module named _socket
> Error: Su

[sage-devel] Re: next bug squash?

2007-08-20 Thread didier deshommes

2007/8/20, didier deshommes <[EMAIL PROTECTED]>:
Updated spkg for sympow here:
http://sage.math.washington.edu/home/dfdeshom/sympow-1.018.1.p2.spkg

didier

> 2007/8/20, mabshoff <[EMAIL PROTECTED]>:
> > Yeah, I think that sympow uses extended precision for doubles. I never
> > ran properly on Cygwin on x86 cpus, so I am somewhat worried on
> > getting this to run properly on Sparc without some freaky gcc flags or
> > some sparc assembly. I don't think it is high on Willam's priority
> > list because it seems to be rather specialized,
> >
>
> This is another linux-ism (x86-specific to boot). I would not worry
> about it. I can't imagine that this would be so important that it
> needs extended precision. Otherwise, sympow would be useless on
> anything not linux and not x86.
>
> didier
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: next bug squash?

2007-08-20 Thread didier deshommes

2007/8/20, mabshoff <[EMAIL PROTECTED]>:
> Yeah, I think that sympow uses extended precision for doubles. I never
> ran properly on Cygwin on x86 cpus, so I am somewhat worried on
> getting this to run properly on Sparc without some freaky gcc flags or
> some sparc assembly. I don't think it is high on Willam's priority
> list because it seems to be rather specialized,
>

This is another linux-ism (x86-specific to boot). I would not worry
about it. I can't imagine that this would be so important that it
needs extended precision. Otherwise, sympow would be useless on
anything not linux and not x86.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: next bug squash?

2007-08-20 Thread didier deshommes

2007/8/20, mabshoff <[EMAIL PROTECTED]>:

> The overall situation: Most major packets build, I believe sympow and
> cvxopt are the remaining holdouts. cvxopt  complains about a missing
> complex.h. I know that there cvxopt binaries for Solaris - so any
> ideas? sympow might be slightly harder to crack due to the whole Sparc
> thing.

Hi,
I had no problem building sympow after making sure that CC='gcc'. Of
course, it gives me: "You do not appear to have an x86 based system
--- not using fpu.c
" and I don't know whether that's important or not (is that what the
Sparc thing is about?). I should have more time to look at it in 4
hours.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] What you need to build SAGE

2007-08-20 Thread didier deshommes

[I was going to post this on Trac as an "enhancement", but Trac seems
to be down at the moment]

Hi,
Current;y, the only official dependencies for SAGE are: "gcc, g++,
make, m4, perl, ranlib, and tar" (in $SAGE_ROOT/README.txt). I'd like
to see these specified with a little more detail in the README file,
so that new users know exactly what they need to make SAGE run. These
are what I've used to build SAGE on my laptop on linux (ubuntu 7.04):
gcc/g++ 4.1 and above (version 3.4 OK)
autoconf 2.59 and above
automake 1.10
flex 2.5.33
bison 2.3
make 3.81
bunzip2 1.0.3
tar 1.6
perl 5.0
ranlib 2.17.50
m4 1.4.8

Anything I'm missing?

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: next bug squash?

2007-08-20 Thread didier deshommes

2007/8/20, William Stein <[EMAIL PROTECTED]>:
>
> Hi,
>
> I propose that the next SAGE bug squash even be Saturday, September 1, which 
> is
> in two weeks.   Whose interested?

Looks like I'll miss that one too, as I'll be out of town for labor
day weekend.


> Those are just some ideas for what would make SAGE "3.0" material.
> Let me know what you think.

High on my wishlist is being able to run SAGE on solaris 10
(opensolaris). With all the work that has been done on porting SAGE on
solaris 9,  this should be easier... in theory.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: fixes need for SAGE 2.8.1 to work on Solaris

2007-08-20 Thread didier deshommes

2007/8/17, mabshoff <[EMAIL PROTECTED]>:
> ###
>
> flintqs-20070505: linux-ism for types. In lanzos.h add
>
> #ifdef __sun
> #define u_int32_t unsigned int
> #define u_int64_t unsigned long [?long?]
> #endif
>
> ###

FYI, this should have already been fixed in later versions of flintqs,
since I reported the same bug around june 12 '07. A simple "svn
update" could be all that's needed.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: quaddouble in sage, and other floating point issues

2007-08-13 Thread didier deshommes

2007/8/14, William Stein <[EMAIL PROTECTED]>:
> Correct me if I'm wrong, but I don't think that makes sense.
> If I do this:
>
> sage: a = RQDF(5)
> sage: number_of_partitions(1000)
> 24061467864032622473692149727991
> sage: del a
>
> then during the number_of_partitions call the CPU is set to
> the wrong mode.

You are right, I did not think about this.

2007/8/13, Jonathan Bober <[EMAIL PROTECTED]>:
> So -ffloat-store doesn't work. So on cpus without sse2, the quaddouble
> wrapper needs to use the fpu fix, but probably should be rewritten so
> that it doesn't affect other things.

> One possibility is that one wrap _add_c_impl, _sub_c_impl,
> etc., by setting the CPU mode, doing the op, then unsetting
> the cpu mode.   This is probably the robust solution (??),
> but might have potential efficiency issues (which should be
> investigated with careful benchmarking).

It's looking like the *only* solution. Looks fail-safe, and of course,
very ugly :).

On a related note, it looks like GSL has a "-gsl" compilation flag
that "Use[s] GSL to control floating point rounding and precision".

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: quaddouble in sage, and other floating point issues

2007-08-13 Thread didier deshommes

2007/8/11, Jonathan Bober <[EMAIL PROTECTED]>:

> cdef class RealQuadDoubleField_class(Field):
> """
> Real Quad Double Field
> """
>
> def __init__(self):
> fpu_fix_start(self.cwf)
>
> def __dealloc__(self):
> fpu_fix_end(self.cwf)
>
> [etc]
>
> __dealloc__() is never called until sage exits, however, since a global
> instance of this class is created at startup. This means that all


I didn't realize this, but I don't think RealQuadDoubleField_class
needs to set the flags. If one looks at the  QuadDoubleElement class,
the fpu_fix_*() functions are called every time a quad double number
is created  and destroyed, which I think is more appropriate. This
might be the solution. I haven't actually checked this though (it's
late here...).


> (3a)What I think might be the best idea, at least on Linux, is to change
> the compilation settings for quad double so that the fpu fix is not
> needed. There are two ways to do this: If a processor supports sse2,
> then passing gcc -march=whatever -msse2 -mfpmath=sse (maybe the -march
> isn't needed) will cause gcc to use sse registers and instructions for

> doubles, and these have the proper precision. In fact, gcc already does
> this by default for x86-64 cpus, so the quad double package doesn't even

Yes, the fpu_fix_() functions are meant to only work around the
"weird" (depending on your perspective) behavior of  x86 cpus.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: docprofile (was: bugs, bugs, bugs)

2007-08-10 Thread didier deshommes

2007/8/10, Jonathan Bober <[EMAIL PROTECTED]>:
> Here is a high level description of another possible idea, ignoring most
> implementation details for a moment. To test the speed of my SAGE
> installation, I simply run a function benchmark(). This runs lots of
> test code, and probably takes at least an hour to run, and returns a
> Benchmark object, say, which contains lots of information about how long
> various tests took to run.

+1
I like it, here are a few more suggestions:
- package compilation flags, amount of physical memory should also be
recorded. Speedups can be noticeable depending on these only
- sometimes things just "hang" (external processes). There should be a
way for tests to gracefully exit and mark these tests as "incomplete"
or just be skipped altogether.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Fwd: sage_c_lib patch

2007-08-02 Thread didier deshommes

2007/8/2, William Stein <[EMAIL PROTECTED]>:
 should be a subdirectory of SAGE_ROOT/devel/sage/, and
> SAGE_ROOT/devel/sage/spkg-install should install both, and
> setup.py should be extended to build the c_lib if it changes.
> Moreover, spkg-dist in SAGE_ROOT/devel/sage should of course
> package up the c_lib directory.  This way when somebody wants to
> write code that involves both c_lib and the normal SAGE library (something
> that is very common), only a single hg repository is involved.

Could there be a case where someone would write code only for
sage_c_lib and not need the whole sage.spkg? I have no idea if this
actually happens, I'm just asking for completeness :)

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: computing the number of partitions of an integer

2007-07-30 Thread didier deshommes

2007/7/30, Bill Hart <[EMAIL PROTECTED]>:
> I have a similar problem in some code I am currently
> writing. I need precisely quad precision, so mpfr is out of the
> question.

Hi Bill,
You might want to consider Yozo Hida's quaddouble C/C++ package here:
http://www.cs.berkeley.edu/~yozo/

There is also a wrapper for it in SAGE.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: 3 feature request for multivariate polynomials

2007-07-30 Thread didier deshommes

2007/7/30, Martin Albrecht <[EMAIL PROTECTED]>:
>
> Hi Didier,
>
> I hope you don't mind that I have some remarks about your patches

Not at all! I am just poking my way through the multivariate code and
any input from someone more knowledgeable than me would be greatly
appreciated.

>
> The R.random_element method on the other hand seems to be specialized for
> MPolynomial_polydict only, i.e. you'd loose the speed advantage of
> MPolynomial_libsingular by constructing an MPolynomial_polydict in any case.

Is there a way to construct a multivariate polynomial from a
dictionary? That's what I was shooting for, but I'm getting it doesn't
always work. Example:

Base ring is RR:
{{{
sage: # Works fine
sage:  from sage.rings.polynomial.polydict import PolyDict  

sage:  R. = MPolynomialRing(RR,3,order='grevlex')
sage: D= PolyDict( {(1, 1, 1): 1, (0, 0, 1): 1/2, (0, 1, 0): 9, (0, 1,
1): -3/8, (0, 0, 0): 3/4})
sage: R(D)
 x*y*z - 3/8*y*z + 9*y + 1/2*z + 3/4
}}}

Base ring is QQ (this fails):
{{{
sage:  R. = MPolynomialRing(QQ,3,order='grevlex')
sage: R(D)
---
 Traceback (most recent call last)
/home/dfdeshom/custom/sage/devel/sage-multi-random/
in ()
/home/dfdeshom/custom/sage/devel/sage-multi-random/multi_polynomial_libsingular.pyx
in multi_polynomial_libsingular.MPolynomialRing_libsingular.__call__()
/home/dfdeshom/custom/sage/local/lib/python2.5/site-packages/sage/rings/rational_field.py
in __call__(self, x, base)
172 if isinstance(x, sage.rings.rational.Rational):
173 return x
--> 174 return sage.rings.rational.Rational(x, base)
175
176 def construction(self):
/home/dfdeshom/custom/sage/devel/sage-multi-random/rational.pyx in
rational.Rational.__init__()
/home/dfdeshom/custom/sage/devel/sage-multi-random/rational.pyx in
rational.Rational.__set_value()
: Unable to coerce PolyDict with
representation {(0, 0, 0): 3/4, (0, 1, 1): -3/8, (0, 1, 0): 9, (1, 1,
1): 1, (0, 0, 1): 1/2} () to Rational
}}}

Is this a bug, or am I not using this correctly?

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: 3 feature request for multivariate polynomials

2007-07-30 Thread didier deshommes

2007/7/30, Carl Witty <[EMAIL PROTECTED]>:
> It seems pretty strange to me, mostly because you lose too much
> information by eliding zeroes.  As far as I can tell, given
> MPolynomialRing(QQ,2,order='lex'), all of the following polynomials:
>
>   3*x^2 + 1
>   3*x^5 + x
>   3*y^7 + 1
>   3*y + 1
>
> would have a coefficients() list of [3, 1].  Is that true, and if so,
> is this really a useful function?

For me it makes sense because I just need a method that iterates over
the coefficients of a polynomial. Having the ordering respected is a
little extra that I think helps the user. I could put the zeros in
there, but her are my own subjective reasons not to:
 - I think of multivariate polynomials as sparse polynomials, so I
think coefficients() with the 0s omitted is OK.
 - Maple does the same thing :) (I know, I know: not an argument...)
 - Putting these zeros involves generating all the degree exponents,
which is slower. It can be done, but generating all the coefficients
this way for something like
f = x^6*y^12*z^2
makes a big list made mostly of zeros.

Here's a compromise: a paramater, (say all_coefficients) could be
specified to have an explicit list. Thoughts?

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: 3 feature request for multivariate polynomials

2007-07-29 Thread didier deshommes
gers only
+_exponents = [ tuple([ZZ.random_element(0,max_deg+1) for _ in 
range(n)])
+   for _ in range(terms) ]
+_coeffs = [R.random_element(*args,**kwds) for _ in range(terms)]
+
+d = dict( zip(tuple(_exponents),_coeffs) )
+return multi_polynomial_element.MPolynomial_polydict(self, PolyDict(d))
+
+
 
 # Leave *all* old versions!
 
diff -r 711283cd88d7 sage/rings/polynomial/polynomial_element.pyx
--- a/sage/rings/polynomial/polynomial_element.pyx  Tue Jul 24 16:24:24 
2007 -0700
+++ b/sage/rings/polynomial/polynomial_element.pyx  Mon Jul 30 00:49:44 
2007 -0400
@@ -2129,6 +2129,31 @@ cdef class Polynomial(CommutativeAlgebra
 """
 return self // self.gcd(self.derivative())
 
+def norm(self, p):
+r""" 
+Return the \code{p^th} norm of this polynomial
+
+EXAMPLES:
+sage: R=RR['x'] ; x = R.0
+sage: f = x^6 + x^2 + -x^4 -x^3
+    sage: f.norm(2) == 2.0
+
+sage: f.norm(1)
+4.00
+sage: f.norm(infinity)
+1.00
+
+AUTHOR:
+-- didier deshommes
+"""
+coeffs = self.coeffs()
+if 1 == p:
+return RR(sum([abs(i**p) for i in coeffs]))
+
+if p is infinity:
+return RR(max([abs(i) for i in coeffs]))
+
+return RR(sum([abs(i)**p for i in coeffs]))**(1/p)
 
 # - inner functions -
 # Sagex can't handle function definitions inside other function
@@ -2185,8 +2210,6 @@ cdef do_karatsuba(left, right):
 t0 = bd
 return _karatsuba_sum(t0,_karatsuba_sum(t1,t2))
 
-
-
 cdef class Polynomial_generic_dense(Polynomial):
 """
 A generic dense polynomial.
@@ -2497,6 +2520,8 @@ cdef class Polynomial_generic_dense(Poly
 modulo $x^n$.
 """
 return self._parent(self.__coeffs[:n], check=False)
+
+
 
 def make_generic_polynomial(parent, coeffs):
 return parent(coeffs)


[sage-devel] 3 feature request for multivariate polynomials

2007-07-27 Thread didier deshommes

Hi there,
I'm trying to work with multivariate polynomials in SAGE and here are
3 features that I would like. Assume f is a multi-poly:
 * f.coefficients() for multivariate polynomials. I would like to get
all the coefficients of f in a list, according to the term order
attached to its ring (this  would basically the equivalent of the
univariate case). For example:
{{{
sage: # lex ordering
sage: R. = MPolynomialRing(QQ,2,order='lex')
sage: f=23*x^6*y^7 + x^3*y+6
sage: f
23*x^6*y^7 + x^3*y+6
sage: f.coefficients()
 [23, 1, 6]
}}}

Another example where we use revlex ordering:
{{{
sage: # revlex ordering
sage: R. = MPolynomialRing(QQ,2,order='revlex')
sage: f=23*x^6*y^7 + x^3*y+6
sage: f
 6 + x^3*y + 23*x^6*y^7
sage: f.coefficients()
[6,1,23]
}}}

Does such function make sense?

* random_element() for multivariate polynomials would be really nice
to have. In addition, I think it would be a good idea to specify
certain additional parameters:
  * d : maximum total degree of each term. I'm using total degree here
to mimic the univariate case, but I'd like to hear other suggestions.
  * n: how many terms of total degree at most d we must generate.
For example:
{{{
sage: R. = MPolynomialRing(QQ,2,order='lex')
sage: # generate a poly of total degree 3, with 2 terms in it
sage: R.random_element(d=3, n=2)
2*x^2*y + x*y
}}

* A function to compute the pth norm of a polynomials. I don't think
this is hard to implement, it's just that no one has had a use for it
yet :)

Feedback and suggestion would be greatly appreciated.

didier


--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: predefined symbolic variable names

2007-07-08 Thread didier deshommes

2007/7/8, Hamptonio <[EMAIL PROTECTED]>:
>
> My biases are probably based on using mathematica for 17 years, but I
> like the way it handles numerical vs symbolic computations.  So at
> present, in sage, sin(1) is symbolic, and sin(1.0) is numerical, and

+1, I like this behavior as well. And I like that currently you can
mix both symbolic and numerical types  (e.g. in polynomial
expressions).

> this I think is good.  What I think is bad is that something like
> 1.0*sin(1) is not numerical - in mathematica the sin(1) would be

Some people like symbolic expression, some like numerical expressions
for the above case :) .

This is off-topic: given a floating-point number, I think it would be
cool to have a way of telling users, "BTW,34.0191213743 is quite close
to  7*(pi + e - 1) in the field you're working with". This is probably
very hard.

2007/7/7, William Stein <[EMAIL PROTECTED]>:
> So I propose that the only symbolic variables that are predefined
> are x (since it's so useful to have this predefined), I (=sqrt(-1)),
> and e (=2.7...).

What about pi? :) . It seems to me that pi is as "special" as e.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: request for comments: ZZ(ZZ(FOO).binary(),2) == FOO

2007-06-28 Thread didier deshommes

On 6/29/07, David Harvey <[EMAIL PROTECTED]> wrote:
>
>
> On Jun 28, 2007, at 5:04 PM, Martin Albrecht wrote:
>
> > Hi there,
> >
> > I often come across the situation where I have to construct an
> > integer from
> > its binary representation and vice versa. So far you do it in SAGE
> > using
> > strings. I have attached a preliminary patch which allows the
> > following code
> > to work, i.e. I _replaced_ the binary() method (which returned a
> > string) with
> > a method that returns a tuple of Python ints.
> >
> > sage: e = ZZ(10231252).binary(); e
> > (1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1,
> > 0, 0)
> > sage: ZZ(e,2)
> > 10231252
> >
> > I know that this patch has some issues:
> > * it breaks doctests which rely on strings (fix by replace ZZ.binary
> > () with
> > ZZ.str(2))
> > * it returns a tuple of Python ints should return tuple (?) of GF
> > (2) elements
> > but I didn't want to mess with imports yet
> > * it can be done faster
> > * you loose the minus sign: ZZ(-1).binary() is (1,), shall it raise an
> > exception then?
> >
> > I am not out for micromanagement but I hesitate to just submit a
> > polished
> > patch as the Integers are such a central building block of SAGE.
> > So, does
> > anybody actually like the current behavior of ZZ.binary() which
> > returns a
> > (signed) string? Any other objections against making the above work?
>
> Hmmm I don't know if I like this. Well, I don't have any objections
> to such a method being available, but I prefer the name "binary" to
> have the current behaviour. It's more pythonic, like the hex function.

+1 for keeping the method and but changing the name.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: spkg refactoring and development model

2007-06-27 Thread didier deshommes
On 6/22/07, William Stein <[EMAIL PROTECTED]> wrote:
> Could you say something about the fact that currently there is no way
> to uninstall
> a SAGE package, since we don't track what files are actually
> installed.  That said,
> we definitely *could* implement something simple that stores a list of
> all files installed
> in the install certificate in the spkg/installed directory.  I'm
> thinking of something like
> computing a list of all files before then after the install, hence
> getting a list of what
> was installed (plus a list of files overwritten).   Anyway, I'm just
> randomly throwing this
> out for comment.  Maybe people who do gentoo/rpm/deb's can make a more
> intelligent comment. For SAGE uninstall isn't a big deal, since 
> essentially
> nobody ever wants to uninstall a package.

It's mostly painless to remove a package if:
-- you know where all its files are. Most of them are in
SAGE_ROOT/local/include/ and SAGE_ROOT/local/lib/ . It's pretty to
figure out what goes where from the spkg-install script.
-- you know that SAGE won't be using the functionality provided by
this package itself. It would be really cool if by removing maxima for
example, the uninstall script also figured out that that
SAGE_ROOT/devel/sage-main/sage/calculus/*.py would also have to be
removed. Really cool, but probably a bit overkill
-- you remove the file with its name located in SAGE_ROOT/spkg/installed/

BTW, I have attached a small patch that makes installing an SPKG from
a hard drive possible.

On 6/19/07, Brian Granger <[EMAIL PROTECTED]> wrote:
> Isn't newest_version already on the users system if they already have
> sage installed - it is usd to build sage in the first place.

It's already there, along with all standard packages that are needed
to build SAGE. I'm not sure why it's still being downloaded.

> This is a great summary of all spkg things!  This should definitely be
> put into the SAGE docs somewhere.

There is a section on creating an SPKG
(http://modular.math.washington.edu/sage/doc/html/prog/node24.html), I
can update it to reflect the new changes.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---

diff -r 1b20b47c02d7 sage-spkg
--- a/sage-spkg Sat Jun 02 22:31:55 2007 -0700
+++ b/sage-spkg Wed Jun 27 14:16:26 2007 -0400
@@ -83,6 +83,12 @@ PKG_NAME=`basename "$PKG_NAME"`
 PKG_NAME=`basename "$PKG_NAME"`
 PKG_SRC="$1"
 PKG_BASE=`echo "$PKG_NAME" | sed -e "s/-.*//"`
+
+# This is a "local" package
+if [  -f "$PKG_SRC" ]; then
+echo "Installing $1 from hard drive"
+PKG_SRC="$1"
+fi
 
 if [ ! -f "$PKG_SRC" ]; then
 if [ -f "$SAGE_PACKAGES/standard/$PKG_NAME.spkg" ]; then


[sage-devel] Re: spkg refactoring and development model

2007-06-22 Thread didier deshommes

[Apologies, I hit "Send" too soon]

I'm not sure how to write this since it seems to be so "easy" to me.
I'll start from the beginning, ie I won't worry about dumbing it down
too much and stating obvious things.

Q: what is a SAGE package?
A: A SAGE package (spkg) is a script that builds an install a piece of
software for your SAGE installation. Thus an spkg usually has 2 things
in it:
- The source code of the software
- The script that will build and install the software into SAGE.

Q: What does one look like?
A: Look in SAGE_ROOT/spkg/standard and you'll find a bunch of files
with .spkg extensions. For example box-1.0.spkg might be a package
living there. An spkg is just a tar ball. If you decompress
box-1.0.spkg, you'll see something that looks like this:
box-1.0/
spkg-install  -- (required) shell script run to install the package
spkg-check  -- (optional) runs the packages test suite after
spkg-install succeeds
SAGE.txt  -- Any modification done to the src/ directory are
recorded here
  /patches-- (optional) any files needed by spkg-install for patching
  /src-- the software that has to be installed.
  /.hg-- A mercurial repository that has
spkg-install, spkg-rebuild,
   spkg-check, SAGE.txt and all contents patches.

Q: What's new about this format? What's all the fuss about?
A: It was decided that:
--  Having the installation scripts under version control would be a
good idea for people that have to make and modify spkg's frequently.
-- Separating source code and our patches would  would keep
us from the temptation of forking other projects. I also think this
will force us to send patches upstream when we're tired of managing
too much of them.

Q: OK, so how do I create one?
A: Suppose you have a piece of software called pa-1.0.tar.gz written
in C/C++ that you've downloaded from sourceforge. Here's how I would
do it:
-- make a fresh directory. I'll call mine new/
-- save pa-1.0.tar.gz in it
-- untar  pa-1.0.tar.gz
-- rename  pa-1.0/ to src/
-- create a spkg-install script. This is a shell script that will run
./configure, make, make install.  You want to install the library in
SAGE_ROOT/local/lib/, so might want to set
--prefix=SAGE_ROOT/local/lib/ for the configure script. Header files
go into SAGE_ROOT/local/include. Any additional libraries that you
want to compile  pa-1.0 against are in  SAGE_ROOT/local/lib/ , BTW.
-- if you have to modify pa-1.0 's source itself in any way, don't do
it directly. Instead, put the file you've modified in the patches/
directory, and in your spkg-install script, run something like
cp patches/file.c src/file.c
before configuring and building.
-- put spkg-install and patches/ under version control:
hg init ; hg add spkg-install patches; hg ci -m "new spkg created for pa!"
-- rename new/ to pa-1.0/
-- run: sage -spkg pa-1.0/ and it will create for you pa-1.0.spkg. You're done!

Special thanks to Brian, William and Joel for the discussion and feedback.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: spkg refactoring and development model

2007-06-22 Thread didier deshommes

On 6/18/07, Nick Alexander <[EMAIL PROTECTED]> wrote:
>
> "didier deshommes" <[EMAIL PROTECTED]> writes:
>
> > On Jun 1, 10:59 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> >> package_dir
> >> spkg-install-- (required) shell script run to install the package
> >> spkg-rebuild  -- (optional) download latest version of package from
> >>  web page and recreate the src directory
> >> spkg-check-- (optional) runs the packages test suite after
> >>   spkg-install succeeds
> >> README.txt   -- (optional) what used to be SAGE.txt
> >> /patches-- (optional) any files needed by spkg-install for 
> >> patching
> >> /src-- (warning if not there) exact copy of what
> >> is available
> >>   at some website.
> >> /.hg-- (optional) mercurial repository that has
> >>   spkg-install, spkg-rebuild,
> >>   spkg-check, README.txt and all contents
> >> of patches.
> >

> This is unbelievably cool.  I just had to hard reinstall IPython
> because I hacked it too hard and couldn't hg revert to the previous
> revision.  A little tutorial on how one hacks a SAGE package would
> really help developers such as Dave Saunders, who is working on
> linbox_wrap, too.

I'm not sure how to write this since it seems to be so "easy" to me.
I'll start from the begining, ie I won't worry about dumbing it down
too much and stating obvious things.

Q: what is a SAGE package?
A: A SAGE package (spkg) is a script that builds an install a piece of
software for your SAGE installation. Thus an spkg usually has 2 things
in it:
- The source code of the software
- The script that will build and install the software into SAGE.

Q: What does one look like?
A: Look in SAGE_ROOT/spkg/standard and you'll find a bunch of files
with .spkg extensions. For example box-1.0.spkg might be a package
living there. An spkg is just a tar ball. If you decompress
box-1.0.spkg, you'll see something that looks like this:
box-1.0/
spkg-install  -- (required) shell script run to install the package
spkg-check  -- (optional) runs the packages test suite after
 spkg-install succeeds
SAGE.txt  -- Any modification done to the src/ directory are
recorded here
   /patches-- (optional) any files needed by spkg-install for patching
   /src-- the software that has to be installed.
   /.hg-- A mercurial repository that has
spkg-install, spkg-rebuild,
spkg-check, SAGE.txt and all contents patches.

Q: What's new about this format? What's all the fuss about?
A: It was decided that:
--  Having the installation scripts under version control would be a
good idea for people that have to make and modify spkg's frequently.
-- Separating source code and installation scripts would  would keep
us from the temptation of forking other projects. I also think this
will force us

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: spkg for sage_c_lib

2007-06-20 Thread didier deshommes

On 6/20/07, Joel B. Mohler <[EMAIL PROTECTED]> wrote:
> Anyhow, the new package for sage_c_lib gets a bit confusing because we had a
> mercurial repository for the actual development of the sage_c_lib in the
> original sage_c_lib spkg.  The new spkg spec calls for a mercurial repository
> for the spkg-* scripts in the root of the spkg.  Do we want both of these
> mercurial repositories in the spkg?

> 2)  Have a single mercurial repository for both the spkg-* scripts and the
> actual code in the src/ subdirectory.

+1. This is basically what the spkg looks like now: Header files, src/
subdir, configure, Makefile, spkg-install, etc are all in a single
repo.

> 3)  Keep the actual code source control outside the spkg and release
> non-version controlled tarballs from this to be packaged in the spkg.

+0. This would be ideal but requires that someone has to worry about
making a separate package for sage_c_lib (by running "hg archive"
periodically, for example. Maybe this could be a cron job?)


didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: sage_c_lib-2.6.p1.spkg

2007-06-19 Thread didier deshommes

On 6/19/07, Joel B. Mohler <[EMAIL PROTECTED]> wrote:
> I think that it has way deeper problems than that.  I like the new layout of
> the files in the tar ball, but the hg repository doesn't reflect this new
> layout.  I'm not exactly sure what is supposed to be in the repository -- all
> of the files, or just the parts under src?

You're right. All of these are under version control:
aclocal.m4
AUTHORS
ChangeLog
configure.in
COPYING
INSTALL
Makefile.am
Makefile.in
NEWS
README
SAGE.txt
spkg-install
src/

The problem is that this spkg is being distributed as it's being
developped, ie development and distribution versions are in the same
tar ball. I think there should be some separation of these if we want
them to respect the new spkg structure.  For now, I'm not touching the
sage* spkg's and will just be cleaning up the .lo .o, etc files.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: spkg refactoring and development model

2007-06-19 Thread didier deshommes

On 6/18/07, Brian Granger <[EMAIL PROTECTED]> wrote:
> > Then SAGE wouldn't know that the package had been updated.
> > Those version numbers are used to determine whether it is
> > necessary to install a package.
>
> I didn't know SAGE was actually using them.  Is this when sage -update
> is run?  My understanding is that the decision to upgrade something
> was based on the timestamps if the files compared with the stub in the
> installed directory.  Am I mistaken.

The sage-update script gives an idea of how sage is upgraded from a SAGE_SERVER:
- download the new install script
- download the new list file. The list file contains all spkgs with
their version numbers. It is from it that sage knows which packages
have been updated and why specifying version numbers for now is
necessary.
- download the new deps file
- download the newest_version script. newest_version determines the
latest version of an spkg you have installed locally.
- check the contents of your list file against your `ls
spkg/standard/`. Anything that is in list and not in the output of ls
is downloaded.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: spkg refactoring and development model

2007-06-18 Thread didier deshommes

On 6/18/07, Brian Granger <[EMAIL PROTECTED]> wrote:
> I am talking about the both the directory structure that is needed for
> the script/makefiles to function properly:
>
> spkg/
> standard/
> base/
>
> As well as the actual scripts and makefiles (deps, install,
> newest-version, etc) that have to be in particular locations in that
> tree to work properly.  For instance, deps as to be in standard,
> install in spkg newest-version in standard, and a bunch of stuff has
> to be in base.

I agree with this: the scripts in spkg/, spkg/base/ and spkg/standard/
should be  under version control.

> SPKG.txt
> SPKG-README.txt

I vote for SPKG.txt too.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: sage_c_lib-2.6.p1.spkg

2007-06-18 Thread didier deshommes

On 6/18/07, David Harvey <[EMAIL PROTECTED]> wrote:
>
> Questions re: above package:
>
> * there are uncommitted changes in that directory i.e. "hg diff"
> gives nontrivial output. That's a bit weird. Are the changes supposed
> to be committed or rolled back?
> * there's also a lot of other crud, like object files etc, probably
> doesn't belong there.

I will clean that up. I didn't touch the sage* packages because I
assumed they were already "in order"

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: spkg refactoring and development model

2007-06-18 Thread didier deshommes

On Jun 1, 10:59 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> package_dir
> spkg-install-- (required) shell script run to install the package
> spkg-rebuild  -- (optional) download latest version of package from
>  web page and recreate the src directory
> spkg-check-- (optional) runs the packages test suite after
>   spkg-install succeeds
> README.txt   -- (optional) what used to be SAGE.txt
> /patches-- (optional) any files needed by spkg-install for 
> patching
> /src-- (warning if not there) exact copy of what
> is available
>   at some website.
> /.hg-- (optional) mercurial repository that has
>   spkg-install, spkg-rebuild,
>   spkg-check, README.txt and all contents
> of patches.

I've updated all spkg's so that they now have an hg repo with the
directory structure based on the one listed above. Comments and
suggestions are welcomed. You can see them here:
http://sage.math.washington.edu/home/dfdeshom/custom/spkg/

One note: I would prefer that READMET.txt be kept as SAGE.txt (or
renamed to something else) because then it would be clear that
modifications were made to the spkg. I tend to ignore README.txt's
anyway because they don't tell you why you should read them.

On 6/1/07, Brian Granger <[EMAIL PROTECTED]> wrote:
> 2.  The other scripts/makefiles involved in the spkg build process -
> like newest_version, install, save-env, etc.

sage-env is under version control, but the others aren't.

>
> 3.  The overall directory structure that contains the
> scrips/makefiles.  The reason this is important is that most of the
> scripts make strong assumptions about where they are run from.  Also,
> as I have begun refactoring, some of the scripts have been moved
> around (for instance newest_version has been moved to
> base/spkg-newest-version).  Managing this without the associated
> directory structure is a pain.

Are you talking about the scripts in SAGE_ROOT/local/bin ? Because
they are under version control (this is where sage-env lives too).

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: spkg refactoring and development model

2007-06-01 Thread didier deshommes

On 6/1/07, Brian Granger <[EMAIL PROTECTED]> wrote:
> *  HG queues help with the issues of maintaining patches against a
> changing upstream source, but it is still a pain and nontrivial.

Would the mq extension help? It's an hg extension for managing queues:
http://www.selenic.com/mercurial/wiki/index.cgi/MqExtension

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: spkg refactoring and development model

2007-06-01 Thread didier deshommes

On 5/31/07, Brian Granger <[EMAIL PROTECTED]> wrote:

> > > For each spkg, there would be a corresponding directory containing the
> > > spkg-install script and the sage subdirectory (but _not_ the source
> > > code for the package itself).  I think it would be a good idea to
> > > create a format for the spkgs that is a little more standardized.
> > > Here is an example:
> > >
> > > ipython-0.8
> > > spkg-install # existing spkg-install script
> > > ./spkg-patches   # rename the sage directory to this for clarity
> > > spkg-fetch.py # a python script that could be called to
> > > get the source for ipython

Would spkg-fetch.py download package A from A's homepage or from sage.math?

> > >
> > > I think the spkg-fetch.py script is an important part of this.  It
> > > would allow us to not include the source code for each package in the
> > > repo, but it would make it very easy to write a script that begins
> > > with only the scripts in the repo and builds a full source
> > > distribution of everything.
> I think this penalty could be paid once - the source packages could be
> downloaded into the hg tree - but not commited to the repo.  Once that
> is done, the spkgs could be built in place.
>
> My thought is that the only people who would have to do this are those
> who are maintaining/creating spkgs.  Most people will simply use the
> created spkgs that include the source.

So if I download sage-version.tar, it would have the spkgs with their
sources. If I ran sage -upgrade,  it would do an hg checkout on the
spkg/standard directory, update any spkg that needs to be and download
(if necessary) the sources to build and compile them. Did I get that
right?

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: spkg refactoring and development model

2007-06-01 Thread didier deshommes

On 6/1/07, Joel B. Mohler <[EMAIL PROTECTED]> wrote:
> The main relation of this to the current discussion is that gentoo solves the
> patch/mainline problem by distributing patch files which are applied on the
> user's computer before the build of the package in question.  Sometimes there
> are a large number of patches applied (I don't have a specific example, but
> I'm pretty sure I've seen as many as 10-15 patches applied before a build.)
> This way it is very clear to any concerned individual exactly what is coming
> from upstream (the original package is downloaded as part of the install
> process), vs. what is coming from the gentoo packagers.

I'm sure I'm missing something here. Could you elaborate more on how
gentoo does it to solve the patching problem? If it's just a bunch of
bash scripts, couldn't we write them ourselves? It seems to me that
this is basically what spkg-install is doing now.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: spkg refactoring and development model

2007-05-31 Thread didier deshommes

On 5/22/07, Brian Granger <[EMAIL PROTECTED]> wrote:
>
> SAGE developers,
>
> As you may know, I have been working on building some new spkgs and
> have also begun refactoring the spkg build scripts themselves.  A few
> ideas that I would like feedback on:
>
> 1.  Creating a repository for the spkg makefiles and build scripts

+1
Ideally, I would like having a full hg repository for the spkg
makefiles *and* the source. I have had to patch close to 10 packages
this past weekend and I need to eventually submit patches for all of
them. Having an hg repo for these would make the process much more
easier.

But I would settle for a sage/spkg-patches.txt file that one could
edit and keep track of under an hg repository. Some kind of version
control on packages is necessary.

> For each spkg, there would be a corresponding directory containing the
> spkg-install script and the sage subdirectory (but _not_ the source
> code for the package itself).  I think it would be a good idea to
> create a format for the spkgs that is a little more standardized.
> Here is an example:
>
> ipython-0.8
> spkg-install # existing spkg-install script
> ./spkg-patches   # rename the sage directory to this for clarity
> spkg-fetch.py # a python script that could be called to
> get the source for ipython
>
> I think the spkg-fetch.py script is an important part of this.  It
> would allow us to not include the source code for each package in the
> repo, but it would make it very easy to write a script that begins
> with only the scripts in the repo and builds a full source
> distribution of everything.
>
> Some questions about this approach:
>
> Does this seem like the best way to manage the spkg infrastructure?

+0
The only problem I see with this is the initial cost of checking out
all these packages from sage.math

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Building SAGE on NexentaOS?

2007-05-29 Thread didier deshommes

On 5/29/07, didier deshommes <[EMAIL PROTECTED]> wrote:
> (http://osdir.com/ml/mathematics.sage.general/2006-07/msg00011.html):
> """
> 2. clisp-2.38/src/makemake.in sets BINARY_DISTRIB=1 for Solaris.  This
>causes an incorrect definition of uint64_to_I (and perhaps other
>problems).  Commenting out BINARY_DISTRIB=1 in makemake.in gave me
>a working clisp on 32-bit x86 Solaris.  I'm still having problems
>with clisp on 32-bit and 64-bit SPARC Solaris.
> """

This is actually the right solution: I forgot to make dist-clean. SAGE
now builds on my machine! Here's  a set of notes I took during the
whole process:

"""
Use gcc-3.4 with Nexenta since gcc-4.0 is said to be buggy:
sudo apt-get install gcc-3.4 g++-3.4 m4 bison flex libtool autoconf automake

Make the OS find a gcc/g++ (nexenta bug):
ln -s /usr/bin/gcc-3.4 /usr/bin/gcc
ln -s /usr/bin/g++-3.4 /usr/bin/g++

Modify SHAREDFLAGS so that NTL passes the right one to accept -fPIC
instead of -Kpic:
SHAREDFLAGS=-fPIC

Build Linbox without the --enable-optimization option (for now?).

Modify Python for Matplotlib:
http://www.scipy.org/Cookbook/Matplotlib/CompilingMatPlotLibOnSolaris10

Modify Singular's singuname.sh script. Modify Singular's Singluar/Makefile file:
[sage-devel discussion]

Modify quaddouble's include/qd/qd_inline (this is a known bug for
\infty on solaris)
Taken from mysql mailing list (http://lists.mysql.com/commits/24366):
#if !defined(HAVE_ISINF)
 /* The configure check for "isinf with math.h" has failed */
#ifdef isinf
#undef isinf
#endif

In sage/rings/real_rqdf.pyx,  explicitly define NAN and INFINITY:
cdef double NAN = 0.0/0.0
cdef double INFINITY = 1.0/0.0

Modify sage/rings/real_rqdf.pxd to include isfinite for solaris:
cdef extern from "ieeefp.h":
   int finite(double)

Modify clisp:
(http://osdir.com/ml/mathematics.sage.general/2006-07/msg00011.html):
"""
2. clisp-2.38/src/makemake.in sets BINARY_DISTRIB=1 for Solaris.  This
  causes an incorrect definition of uint64_to_I (and perhaps other
  problems).  Commenting out BINARY_DISTRIB=1 in makemake.in gave me
  a working clisp on 32-bit x86 Solaris.  I'm still having problems
  with clisp on 32-bit and 64-bit SPARC Solaris.
"""

lcalc: conflict in include/getopt.h. . Commented out:
extern int getopt (int __argc_, char *const *__argv_, const char *__shortopts);
# else /* not __GNU_LIBRARY__ */
 /* breaks on Solaris: extern int getopt (); */
 # endif /* __GNU_LIBRARY__ */

sympow: there is no hard link on NexentaOS to /usr/bin/cc (nexenta
bug). Create it like this:
sudo ln -s /usr/bin/gcc /usr/bin/cc

cddlib: Copied a new sage/allfaces.c that compiles on Nexenta.

tachyon3d: added an if statement in spkg-install:
if [ $UNAME = "SunOS" ]; then
ne=`uname -v|grep -i nexenta`
if [ $ne ]; then
make solaris-pthreads-gcc
finished
fi
make solaris-thr
finished
fi

flintqs: Solaris doesn't know about u_int*_t.
In F2matrix.h:
/* Some platforms don't support u_int_32 */
typedef uint32_t u_int32_t;
In lanczos.h:
/* Some platforms don't support u_int_64 */
#ifndef u_int64_t
#define u_int64_t unsigned long long int
#endif
"""

I'll be building these packages on other platforms to see if anything breaks.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Building SAGE on NexentaOS?

2007-05-29 Thread didier deshommes

On 5/29/07, Martin Albrecht <[EMAIL PROTECTED]> wrote:
> Hi, just stick it into Makefile.in. This is the source for the Makefile.

That did it and Singular built succesfully!

On 5/29/07, William Stein <[EMAIL PROTECTED]> wrote:
> Wow, Didier, many thanks for helping with the Solaris port
> of SAGE!  I've been wanting to finish this forever, and got
> stuck -- for example on linbox -- your help is *greatly* appreciated.
> Some of my notes related to this are here:
>http://sage.math.washington.edu/home/was/lj/todo.txt
>
> Again, thanks!

I consider most of it to be pure luck (e.g. the linbox problem). I'm
seeing how far I can push it :)


Other packages that built:
extcode-2.5.3
freetype-2.1.10
gap-4.4.9
gd-2.0.33.p4
quaddouble-2.2.p6 (with some modifications. Solaris has a known bug
with isinfinity(double))
sage-2.5.3 (with some modifications to real_rqdf.p*)
sage_c_lib-2.5.3
sage_scripts-2.5.3
sagex-20070504
sqlite-3.3.17.p1
zodb3-3.6.0.p1

I'm now having trouble building clisp.
The errrors I get all look like this
{{{
:/export/home/dfdeshom/custom/sage-2.5.3/spkg/standard/clisp-2.41.p2/src/syscalls/calls.c:2151:
undefined reference to `uint64_to_I'
:/export/home/dfdeshom/custom/sage-2.5.3/spkg/standard/clisp-2.41.p2/src/syscalls/calls.c:2161:
undefined reference to `uint64_to_I'
}}}

I googled around and found that Joe Weening had already run into this
problem and a solution
(http://osdir.com/ml/mathematics.sage.general/2006-07/msg00011.html):
"""
2. clisp-2.38/src/makemake.in sets BINARY_DISTRIB=1 for Solaris.  This
   causes an incorrect definition of uint64_to_I (and perhaps other
   problems).  Commenting out BINARY_DISTRIB=1 in makemake.in gave me
   a working clisp on 32-bit x86 Solaris.  I'm still having problems
   with clisp on 32-bit and 64-bit SPARC Solaris.
"""

His solution does not seem to work for me. Does anyone has an idea of
what to try? I wish I could just apt-get it but Nexenta doesn't seem
to have it (it's still an alpha release).

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Building SAGE on NexentaOS?

2007-05-29 Thread didier deshommes

The problem doesn't seem to be with libtermcap or curses. It's a flag
problem. When compiling libsingular, the "--shared flag" has to be
passed to gcc, instead of the default "-export-dynamic". For that, the
Makefile in Singular/Makefile has to have a secial section for
nexentaos as follows:
{{{
ifeq ($(SINGUNAME),ix86-nexentaos)
SO_SUFFIX = so
LIBSINGULAR_FLAGS = --shared
LIBSINGULAR_LIBS = -lsingfac -lsingcf -lntl -lreadline -lgmp -lomalloc_ndebug
endif
}}}

And for singular to find ix86-nexentaos, singuname.sh has to have the following:
{{{
elif (echo $uname_a | $egrep "SunOS" >$devnull)
then
# NexentaOS ###
if (echo $uname_a | $egrep "NexentaOS" > $devnull)
then
   #echo ""
   echo ${prefix}-nexentaos
   #echo ""
   #exit 0
else
echo ix86-SunOS
#exit 0
fi
exit 0
}}}

Problem is, I don't know how to tell the make file Singular/Makefile
that "--shared" has to be passed to gcc for nexentaos. I could just
stick the first fragment showed above, but Singular/Makefile is
generated dynamically. How do I stick this piece of code in
Singular/Makefile dynamically?

didier

On 5/29/07, mabshoff <[EMAIL PROTECTED]> wrote:
>
>
> >
> > Hello,
> >
> > as far as I can tell these are symbols from the termcap library.
>
> Sorry, I should have written curses/ncurses library - too early for
> me.
>
> > Could
> > you post the exact command of the compiler/linker before the failure?
> >
> > There have been several efforts to get SAGE to build and run on
> > "proper" Solaris, so I might be worthwhile that you post some patches.
> >
> > Cheers,
> >
> > Michael
>
> 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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Building SAGE on NexentaOS?

2007-05-28 Thread didier deshommes

Hi there,
NexentaOS (aka GNU/Solaris) is an open-source unix with the SunOS
kernel and GNU tools on top of it. Package management is done with
Debian's apt-get. I am investigating using NexentaOS as a file/media
server on a newish P4 (mainly because of zfs) and thought I would try
to build SAGE on it for fun. So far, the following packages compile
(some with small modifications):
bzip2-1.0.4
conway_polynomials-0.2
cremona_mini-0.1
dir-0.1
extcode-2.5.3
freetype-2.1.10
gd-2.0.33.p4
gdmodule-0.56.p4
givaro-3.2.6
gmp-4.2.1.p6
graphs-0.1
gsl-1.9
iml-1.0.1.p6
ipython-0.8.0.p1
libpng-1.2.16.p3
linbox-20070522 (has to compile w/o --enable-optimization)
matplotlib-0.90.0.p2 (requires python modification in pyconfig.h)
mercurial-0.9.3.p1
mpfi-1.3.4-rc3.p4
mpfr-2.2.1
mwrank-20061123
ntl-5.4.1.p3  (passes erroneous -Kpic flag to gcc instead of -
fPIC)
numpy-20070307
openssl-0.9.8d.p1
pari-2.3.1.cvs-20070305
pexpect-2.0.p1
prereq-0.2
pycrypto-2.0.1
python-2.5.1.p2
readline-5.2
sage_c_lib-2.5.3
sage_scripts-2.5.3
sagex-20070504
sqlite-3.3.17.p1
termcap-1.3.1
zlib-1.2.3.p2

However with Singular (more specifically libSingular), I'm hitting a
wall . Here's the output I get:
{{{
/usr/lib/gcc/i386-pc-solaris2.11/3.4.6/crt1.o: In function
`_start':crt1.s:(.text+0x59): undefined reference to `main'
/export/home/dfdeshom/custom/sage-2.5.3/local/lib/libreadline.so:
undefined reference to `tgetnum'
/export/home/dfdeshom/custom/sage-2.5.3/local/lib/libreadline.so:
undefined reference to `tgoto'
/export/home/dfdeshom/custom/sage-2.5.3/local/lib/libreadline.so:
undefined reference to `tgetflag'
/export/home/dfdeshom/custom/sage-2.5.3/local/lib/libreadline.so:
undefined reference to `tputs'
/export/home/dfdeshom/custom/sage-2.5.3/local/lib/libreadline.so:
undefined reference to `tgetent'
/export/home/dfdeshom/custom/sage-2.5.3/local/lib/libreadline.so:
undefined reference to `tgetstr'
collect2: ld returned 1 exit status
make[1]: *** [libsingular] Error 1
}}}

Any ideas? It looks like building SAGE on Nexenta should be possible.


--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] SD4 room-sharing wanted for the first 3 days

2007-05-09 Thread didier deshommes

Hi there,
I am looking for someone to room-share with from Monday 11/06 to
Thursday 14/06 for SAGE Days 4.  If you would like to split the cost
of a room, please email me. I plan to stay at the College Inn ($75/
night).

didier


--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: SAGE-2.5 (!)

2007-05-09 Thread didier deshommes

On 5/9/07, William Stein <[EMAIL PROTECTED]> wrote:
>  * new packages:
>  - flintqs

I have not heard about flintqs for awhile and I'm curious about it.
Would the flintqs people care to explain how to use it from SAGE? Is
it for univariate polynomials over Q only? Will there be a talk about
it at SD4 :) ?

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: sage-2.5.alpha3

2007-05-06 Thread didier deshommes

All tests pass on my machine, a Centrino running ubuntu feisty:

didier

On 5/6/07, William Stein <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I've posted sage-2.5.alpha3 here:
>
>http://sage.math.washington.edu/home/was/sage2.5/
>
> Feedback is welcome.   This still won't build on OS X PowerPC or
> Cygwin, but should build on Linux and Intel OS X and pass "make test"
> there.  Also, it should have most code that people have sent me for
> inclusion in SAGE.   The official sage-2.5 is getting close, so any
> testing feedback is greatly appreciated.  In particular, if people
> could try out some of the new features in sage-2.5, especially symbolic
> computation, this would be quite valuable.
>
> Here's a list of the main things that are new in sage-2.5.alpha3:
>
> 2.5: * new packages:
>  - flintqs
>  - ipython-0.8.0 (w stein)
>  - maxima-5.12.0 (w stein)
>  - python-2.5.1 (y qiang) -- important bug fixes
>  - tachyon3d-0.98beta (w stein)
>  * m abshoff:  cputime bugfix for cygwin
>  * m albrecht: major new singular library mode interface for SAGE 
> which
>provides the world's fastest polynomial
> arithmetic to SAGE (not
>yet enabled by default!)
>  * r bradshaw: tons of polynomial and power series optimizations;
>Coleman p-adic integration; Kedlaya for genus > 1
>  * t clemens:  source browser bugfix
>  * p de napoli:fix some bugs in rationals and integers
>  * d deshomme: (refereed by r bradshaw and w stein) very good support
>for Hida's quad-double field RQDF.
>  * w hart: quadratic sieve update (SAGE's qsieve command):
> "It is MUCH faster,
>especially for large factorizations, on account
> of having implemented the
>large prime variant. it will factor an 81 digit
> number in < 20 minutes.
>On the Athlon it is the fastest generally
> available implementation of the
>quadratic sieve in the world for certain sized
> factorizations, and
>only slightly behind at other sizes."
>Another example: n =
> next_prime(2^110)*next_prime(2^120) has these
>times on 32-bit 2Ghz linux: qsieve (107s), PARI
> (223s), Magma 2.13 (336s).
>  * d harvey:   improvements, bug fixes.
>  * d kohel:quaternion algebra improvements
>  * k minola:   tmp file clean bugfix; misc build fixes.
>  * k minola, d joyner:  updated the conway polynomial table
>  * w stein and b moretti: major new symbolic calculus functionality
>  * w stein:rewrite of SAGE/maxima interface.
>  * c witty:(refereed by n alexandar) a new algebraic reals field
>(Qbar meet RR!).  mpfr improvements
>
> >
>

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Fwd: Fwd: [sage-forum] String-integer coercion

2007-05-06 Thread didier deshommes

I've only looked at the frontpage... I'm wondering if it would not be
better to merge the 2 sets of links :
"Use SAGE Online! (alternate) | Live Tutorial | Download |
Documentation |"

and
"""
 DownloadDocumentation
Live Tutorial   Mailing Lists, etc
"""

into one big one. The second set of links take all my attention
(bigger fonts) and I hav eto look harder to see the links at the top.

Maybe the links only relevant to developers could be moved to the
bottom of the page, away from the user-centric links? Or was that
intentional?

Looking at Timothy's page, I really like the fonts and colors, but the
content is just not appropriate for an intro to SAGE. The perfect SAGE
page for me would be William's content and layout + Tim's fonts and
colors.

didier

On May 6, 3:37 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm doing a redesign of the SAGE website to target SAGE much
> more at end users rather than developers (I think the tipping
> point has now arrived, since about 500 people downloaded
> SAGE in the last two weeks...)  Anyways, your comments
> on the mockup here would be welcome:
>http://sage.math.washington.edu/home/was/rc/web/index.html
> (Note that links to actual downloads etc might not work.)
> My questions are mainly:
>   (1) do the pages look:
>  -- visually appealing
>  -- simple and clean
>  -- convey all the necessary information (i.e., I'm not missing
>  key things that used to be there)
>
>   (2) does the text on the front page reasonably convey what
>SAGE is to somebody who say has never heard of programs
>like GAP and PARI, and just wants to know if SAGE might
>be for them?
>
>   (3) Does the front page text seem to much like sales talk?
>Compared to Maple or Mathematica's web pages it's nothing
>(those pages are gut-wrenchingly obnoxious),
>but it might still be too much.
>
>   (4) I've purposely went from clean and simple, even more so
>than before, instead of say tricky drop downs css menus, etc.,
>
> Thanks,
>   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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Python Access Control module?

2007-04-27 Thread didier deshommes

On 4/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Does anybody know of some sort of kitchen-sink type of authentication module 
> that's commonly used in python?  For the notebook, I've had to write my own, 
> and it stinks -- any time a new feature is added, we forget to lock it down, 
> and it isn't at all robust or configurable.  It would seem that Yi is having 
> to write his own, too (granted, it sounds like he's thought about it a lot 
> more than I have).
>
> Can anybody suggest a pre-existing package that "just works"?

Googling aroung, I found this:
http://www.chrisarndt.de/en/software/python/#auth

"""
This Python module collection provides functions and classes for
authentication purposes and user database management. Also included
are some command line scripts, examples and pydoc generated API
documentation.
"""

I don't know if it works though :) . More web frameworks for python
can be found here:
http://wiki.python.org/moin/WebFrameworks

Also, doesn't Twisted have an authentication module? I haven't used
it, but it's the first thing I thought about when you posted this.

didier

--~--~-~--~~~---~--~~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



  1   2   >