[sage-support] Re: Is this a memory problem?

2007-12-10 Thread mabshoff



On Dec 10, 6:46 am, "Mike Hansen" <[EMAIL PROTECTED]> wrote:
> In case you're curious, here are some timings for higher powers along
> with memory usage.
>
> sage: s = SFASchur(QQ)
> sage: f = s([2,1])
> sage: get_memory_usage()
> 515.17578125
>
> sage: time a = f^10
> CPU times: user 6.64 s, sys: 0.03 s, total: 6.67 s
> Wall time: 6.74
> sage: get_memory_usage()
> 526.26171875  #11MB
>
> sage: time a = f^11
> CPU times: user 30.18 s, sys: 0.05 s, total: 30.23 s
> Wall time: 30.98
> sage: get_memory_usage()
> 536.171875 #21MB
>
> sage: time a = f^12
> CPU times: user 116.47 s, sys: 0.13 s, total: 116.60 s
> Wall time: 119.75
> sage: get_memory_usage()
> 554.5 #39MB
>
> sage: time a = f^13
> CPU times: user 437.49 s, sys: 0.44 s, total: 437.94 s
> Wall time: 444.04
> sage: get_memory_usage()
> 585.796875  #70MB
> sage: len(a)
> 30641
>
> I believe that there is eventual room for improvement in the memory usage.
>
> --Mike
>
> On Dec 9, 2007 10:44 PM, BFJ <[EMAIL PROTECTED]> wrote:
>
>
>
> > That was fast!
>
> > Thanks for looking into the problem. I'll be doing more extensive
> > calculations over the next couple of weeks (I'm porting some Maple
> > code). I'll let you know if I run into any other problems. I'm excited
> > about the prospect of a 17-fold performance increase.
>
> > Thanks very much,

You can test those improvements yourself by building

http://sage.math.washington.edu/home/mabshoff/sage-2.9.alpha4.tar

[182 MB]. Assuming you have the standard build tools it should build
in about two hours. You can also wait for 2 days and 2.9 should be
released in binary form.

Cheers,

Michael

>
> > --
> > [EMAIL PROTECTED]
>
> > On Dec 9, 11:34 pm, "Mike Hansen" <[EMAIL PROTECTED]> wrote:
> > > Hello,
>
> > > The actual issue was that I forgot to covert symmetrica's LONGINT type
> > > ( 22 ) over to the correct Sage type.  I hadn't actually tested it
> > > with calculations that got up to numbers that big.  I made a ticket
> > > for this and posted a patch:http://sagetrac.org/sage_trac/ticket/1445
> > > It will be in the next version ( 2.9 ) which will come out in about 3
> > > days.
>
> > > --Mike
>
> > > On Dec 9, 2007 10:01 PM, [EMAIL PROTECTED]
>
> > > <[EMAIL PROTECTED]> wrote:
>
> > > > I'm trying to use the combinatorics features in Sage to do some Chern
> > > > class calculations. When I run the commands below, I get exceptions
> > > > that I don't know how to interpret.
>
> > > > The same calculation in Maple using John Stembridge's SF package
> > > > completes successfully using roughly 149 MB and 7.08 s CPU time.
>
> > > > Is this just an issue of memory limitation? If so, can (and how do) I
> > > > lift the limitation to access more of the 2 GB I have on the machine
> > > > I'm running this on?
>
> > > > code follows:
> > > > I'm using Sage 2.8.15 on an i386 Linux platform. I also tried this on
> > > > an Intel OS X 10.5 machine with the same result. Also, all the powers
> > > > of "f" from 1 to 7 work fine. f^8 and higher powers fail.
> > > > ---
>
> > > > sage: s=SFASchur(QQ)
> > > > sage: f=s([2,1]); f
> > > > s[2, 1]
> > > > sage: f^8
> > > > ---
> > > >Traceback (most recent call
> > > > last)
>
> > > > /Users/benjaminjones/Desktop/sage-2.8.15-osx10.5-intel-i386-Darwin/
> > > >  in ()
>
> > > > /Users/benjaminjones/Desktop/sage-2.8.15-osx10.5-intel-i386-Darwin/
> > > > local/lib/python2.5/site-packages/sage/combinat/sfa.py in
> > > > __pow__(self, n)
> > > > 881 z = A(Integer(1))
> > > > 882 for i in range(n):
> > > > --> 883 z *= self
> > > > 884 return z
> > > > 885
>
> > > > /Users/benjaminjones/Desktop/sage-2.8.15-osx10.5-intel-i386-Darwin/
> > > > element.pyx in sage.structure.element.RingElement.__imul__()
>
> > > > .
> > > > .
> > > > .
> > > > .
>
> > > > /Users/benjaminjones/Desktop/sage-2.8.15-osx10.5-intel-i386-Darwin/
> > > > symmetrica.pxi in sage.libs.symmetrica.symmetrica._py()
>
> > > > : 22
> > > > sage:
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: Stufit expander fails with MacOS Sage 10.4 download

2007-12-10 Thread Robert Lockwood
On Dec 9, 2007 9:14 PM, Robert Lockwood <[EMAIL PROTECTED]> wrote:

> Thanks, I saw the post about the link problem as 2999 others and I
> downloded atfer reading Slashdot.
>
> Here's what I get.
>
> -bash: ./sage: No such file or directory
> Spot:~/sage robertlockwood$
>
>
>
> On Dec 9, 2007 9:04 PM, William Stein <[EMAIL PROTECTED]> wrote:
>
> >
> > On Dec 9, 2007 8:53 PM, Robert Lockwood <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > >
> > > On Dec 9, 2007 4:52 PM, William Stein < [EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > > On Dec 9, 2007 10:35 AM, RandomWalk <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > I've run stuffit twice, downloaded a new tar.gz and run it again.
> >  it
> > > > > fails each time.
> > > > >
> > > > > What to do?
> > > > >
> > > >
> > > > Trying typing this into Terminal:
> > > >
> > > > cd Download   # or whever you downloaded the tar.gz file
> > > > tar zxvf exact-name-of-the-tar-gz-file
> > > >
> > > > Does it work?  Or are there errors?
> > > >
> > >
> > > It failed again.  The time before this it had problems with a link.  I
> > > didn't use the same args to tar as this time.  Here's the last few
> > lines:
> > > sage-2.8.15-osx10.4-intel-i386-Darwin /spkg/standard/blas-
> > 20070724.spkg
> > > sage-2.8.15-osx10.4-intel-i386-Darwin/spkg/standard/symmetrica-
> > 0.3.3.spkg
> > > sage-2.8.15-osx10.4-intel-i386-Darwin/spkg/standard/termcap-1.3.1.spkg
> > > sage-2.8.15-osx10.4-intel-i386-Darwin /spkg/standard/matplotlib-
> > 0.90.0.p5.spkg
> > > sage-2.8.15-osx10.4-intel-i386-Darwin/spkg/standard/newest_version
> > > sage-2.8.15-osx10.4-intel-i386-Darwin/spkg/standard/gdmodule-
> > 0.56.p4.spkg
> > > sage-2.8.15-osx10.4-intel-i386-Darwin /spkg/standard/moin-
> > 1.5.7.p1.spkg
> > > sage-2.8.15-osx10.4-intel-i386-Darwin/spkg/gen_html
> > > sage-2.8.15-osx10.4-intel-i386-Darwin/spkg/install
> > > tar: Error exit delayed from previous errors
> > >
> >
> > Could you try downloading this again from here:
> >
> >   http://sagemath.org/SAGEbin/apple_osx/intel/
> >
> > I posted a new binary that fixed some symlink issues, so it might
> > work better.
> >
> > By the way, even above, when in terminal you do
> >
> >  cd sage-2.8.15-osx10.4-intel-i386-Darwin
> >  ./sage
> >
> > what happens?
> >
> > William
> >
> >
> > I downloaded again and ran tar by hand as you suggested (and got the
> > same error) and then ran ./sage.  Here's what I got:
> >
> Spot:~/Sage/sage-2.8.15-osx10.4-intel-i386-Darwin robertlockwood$ ./sage
--
| SAGE Version 2.8.15, Release Date: 2007-12-03  |
| Type notebook() for the GUI, and license() for information.|
--
The SAGE install tree may have moved.
Regenerating Python.pyo and .pyc files that hardcode the install PATH
(please wait less than a minute)...
Please do not interrupt this.

sage:

I'm off to work now and will check again this evening.

Nate

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] sage clustered

2007-12-10 Thread samba

hello everybody,

I try sage and it's very powerful, but I'm wondering if it's possible
to run sage in a cluster,  or if you know, to post some link which
explain how to to this.

Thanks,
samba.

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: sage clustered

2007-12-10 Thread William Stein

On Dec 10, 2007 8:38 AM, samba <[EMAIL PROTECTED]> wrote:
>
> hello everybody,
>
> I try sage and it's very powerful, but I'm wondering if it's possible
> to run sage in a cluster,  or if you know, to post some link which
> explain how to to this.

You might find dsage useful, at least for *certain* types of
cluster-related tasks:

   http://sagemath.org/doc/html/ref/module-sage.dsage.dsage.html


You might also find ipython1 useful -- Fernando, maybe you could comment
about the latest on ipython1?  We haven't updated it in sage for like 8 months.


Both are included in sage.

 -- William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: SAGE-2.8.15!

2007-12-10 Thread Andrzej Giniewicz

Hi,

I've seen that R moved from experimental to optional, now as
r-2.6.1.p6, tryied it but got:

sage: import rpy
---
Traceback (most recent call
last)

/home/giniu/ in ()

/opt/sage/local/lib/python2.5/site-packages/rpy.py in ()
171
172 # The new exception
--> 173 RException = _rpy.RException
174
175 # I/O setters

: 'module' object has no attribute
'RException'

that can be known issue but I decided I will report... :)

best regards,
Andrzej.

On 4 Gru, 16:40, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Dec 4, 2007 6:25 AM, gginiu <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > > There already is an optional/experimental R.spkg and because of rpy
> > > little integration work into Python needs to be done. It will probably
> > > take a while to expose all the functionality desired by Sage
> > > developers directly, but we need to start by including it.
>
> > well, then if there is anything I can help with - from testing to
> > whatever - you can count me in :) I'm already downloading it :)
>
> Please type
>
> sage: install_package('sage -i r-2.6.1rc.p1')
>
> and report back whether the install works for you or not (it's an experimental
> package still, which means that it's likely to *not* work for a lot of 
> people).
>
> If it does install, try this:
>
> sage: import rpy
> sage: rpy.r.t_test(range(100))
>
> Check out
>  rpy.sourceforge.net
> for more discussion about rpy, which provides a very
> fast interface to essentially all the functionality of R.
> NOTE: As of now, you'll probably want to do
> sage: RealNumber = float; Integer = int
> to turn off preparsing of floats and ints when using R, since
> the patch for making R play nicely with Sage types isn't in
> yet.
>
> William
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: SAGE-2.8.15!

2007-12-10 Thread William Stein

On Dec 10, 2007 10:50 AM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I've seen that R moved from experimental to optional, now as
> r-2.6.1.p6, tryied it but got:
>
> sage: import rpy
> ---
> Traceback (most recent call
> last)
>
> /home/giniu/ in ()
>
> /opt/sage/local/lib/python2.5/site-packages/rpy.py in ()
> 171
> 172 # The new exception
> --> 173 RException = _rpy.RException
> 174
> 175 # I/O setters
>
> : 'module' object has no attribute
> 'RException'
>
> that can be known issue but I decided I will report... :)

Thanks.  However:
  (1) What operating system are you using exactly, and what gcc version?
  (2) Could you send the build log for building R (i.e., the end of
 SAGE_ROOT/install.log)?
  (3) If you type
   sage: !R
what happens?

 --William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Notebook Server Setup? (Upgrade to Gutsy)

2007-12-10 Thread Adam Getchell

Hi all,

I upgraded my SAGE install from feisty to gutsy by adding XUbuntu via:

sudo apt-get install xubuntu-desktop

and then doing an upgrade using the Upgrade manager.

One item that seemed to break was the "notebook" script (which I'm
having a hard time finding, where is it located?). It fails with:

[EMAIL PROTECTED]:~$ notebook
eth0: error fetching interface information: Device not found
Error starting notebook.

However, SAGE starts just fine using:

sudo sage -notebook

And then connecting to https://:8000

Also, issuing sudo sage -update gets the newest packages of Singular,
which work great!

Questions: After looking around in notebook.py, I see a method
add_user to add more users. Where is this accessible?

Also, I changed the port=443 in Notebook.__init__ , however, SAGE
still started on (non-standard port) 8000. Which classes/files control
the SAGE server?

I guess my questions basically boil down to sysadmin ones: how do I
add/delete users? where is authentication handled? how do I change the
port?

Basically, I'm looking at setting up a SAGE notebook server using
standard https, with add/remove users, and (hopefully) the ability to
tie into an authentication system (such as CAS, which already has a
python module written for it for Zope, of which it looks like Twisted
has some commonality).

Thanks,

Adam
-- 
"Invincibility is in oneself, vulnerability in the opponent." -- Sun Tzu

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: Notebook Server Setup? (Upgrade to Gutsy)

2007-12-10 Thread William Stein

On Dec 10, 2007 11:05 AM, Adam Getchell <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I upgraded my SAGE install from feisty to gutsy by adding XUbuntu via:

I assume you're using sage-vmware?

> sudo apt-get install xubuntu-desktop
>
> and then doing an upgrade using the Upgrade manager.

Excellent.   I'm glad that works.

> One item that seemed to break was the "notebook" script (which I'm
> having a hard time finding, where is it located?). It fails with:

I recall it being /usr/local/bin/notebook

Try doing
   [EMAIL PROTECTED]:~$  which notebook
to find out for sure.

>
> [EMAIL PROTECTED]:~$ notebook
> eth0: error fetching interface information: Device not found
> Error starting notebook.

Did your network interface change to eth1 or something?  Look
in /usr/local/bin/notebook to see what is going on.

> However, SAGE starts just fine using:
>
> sudo sage -notebook
>
> And then connecting to https://:8000

Excellent.

> Also, issuing sudo sage -update gets the newest packages of Singular,
> which work great!
>
> Questions: After looking around in notebook.py, I see a method
> add_user to add more users. Where is this accessible?

Currently there are two ways to add users though a third is planned:

(1) Start the notebook like this:

   sage: notebook(..., accounts=True)

then just like at http://sagenb.com on the lower right there will
be a link to create a new account.   You can add a bunch
of accounts (the email isn't really used, except to send
a confirmation message).  Create all the accounts you want,
then rerun the server with notebook(..., accounts=False)
to run the server but without just *anybody* being able to
create a new account.

(2) From the command line -- this is trickier.  If you need this
let me know and I'll answer later.

We plan to make it so admins have a panel in the notebook
to add new users and manage them.  It will look much like the
"Mange Users" screens in Google Groups.   I havne't had
time to implement this yet.

> Also, I changed the port=443 in Notebook.__init__ , however, SAGE
> still started on (non-standard port) 8000. Which classes/files control
> the SAGE server?

The port it uses is determined by the port= option to the notebook command:

   sage: notebook(port = 80)

runs it on port 80.Do


   sage: notebook?

for more along these lines.

> I guess my questions basically boil down to sysadmin ones: how do I
> add/delete users?

We haven't implementing deleting users yet :-(.

>  where is authentication handled?

in server/notebook/avatars.py and server/notebook/twist.py

Alex Clemesha and Dorain Raymer wrote avatars.py so
they might have some helpful remarks.

> how do I change the
> port?

See above.

>
> Basically, I'm looking at setting up a SAGE notebook server using
> standard https, with add/remove users, and (hopefully) the ability to
> tie into an authentication system (such as CAS, which already has a
> python module written for it for Zope, of which it looks like Twisted
> has some commonality).
>

Cool.

 -- William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: SAGE-2.8.15!

2007-12-10 Thread Andrzej Giniewicz



On 10 Gru, 19:57, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Dec 10, 2007 10:50 AM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi,
>
> > I've seen that R moved from experimental to optional, now as
> > r-2.6.1.p6, tryied it but got:
>
> > sage: import rpy
> > ---
> > Traceback (most recent call
> > last)
>
> > /home/giniu/ in ()
>
> > /opt/sage/local/lib/python2.5/site-packages/rpy.py in ()
> > 171
> > 172 # The new exception
> > --> 173 RException = _rpy.RException
> > 174
> > 175 # I/O setters
>
> > : 'module' object has no attribute
> > 'RException'
>
> > that can be known issue but I decided I will report... :)
>
> Thanks.  However:
>   (1) What operating system are you using exactly, and what gcc version?

to be most specific...

[EMAIL PROTECTED] ~]$ gcc --v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/usr --enable-shared --enable-
languages=c,c++,objc --enable-threads=posix --enable-__cxa_atexit --
disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-
clocale=gnu --disable-libstdcxx-pch --with-tune=generic
Thread model: posix
gcc version 4.2.2

That's current Arch Linux, kernel 2.6.23.9 (stock distribution kernel)
and gLibc 2.7, my machine is 32bit Athlon Barton, exactly it's:

[EMAIL PROTECTED] ~]$ cat /proc/cpuinfo
processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 6
model   : 10
model name  : AMD Athlon(tm) XP 2600+
stepping: 0
cpu MHz : 2091.122
cache size  : 256 KB
fdiv_bug: no
hlt_bug : no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 1
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up ts
bogomips: 4186.91
clflush size: 32

>   (2) Could you send the build log for building R (i.e., the end of
>  SAGE_ROOT/install.log)?

it's not shortest so I've put it on net, it looks ok... it's at
http://giniu.ravenlord.ws/install.log - I renamed old log and did sage
-f r-2.6.1.p6 to be sure only needed lines are included

>   (3) If you type
>sage: !R
> what happens?

R console starts, I can do for example hist(rnorm(1000)) so I can say
it mostly works...

>  --William

cheers,
Andrzej.

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: SAGE-2.8.15!

2007-12-10 Thread William Stein

On Dec 10, 2007 11:33 AM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote:
> On 10 Gru, 19:57, "William Stein" <[EMAIL PROTECTED]> wrote:
> > On Dec 10, 2007 10:50 AM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> > > Hi,
> >
> > > I've seen that R moved from experimental to optional, now as
> > > r-2.6.1.p6, tryied it but got:
> >
> > > sage: import rpy
> > > ---
> > > Traceback (most recent call
> > > last)
> >
> > > /home/giniu/ in ()
> >
> > > /opt/sage/local/lib/python2.5/site-packages/rpy.py in ()
> > > 171
> > > 172 # The new exception
> > > --> 173 RException = _rpy.RException
> > > 174
> > > 175 # I/O setters
> >
> > > : 'module' object has no attribute
> > > 'RException'
> >
> > > that can be known issue but I decided I will report... :)
> >
> > Thanks.  However:
> >   (1) What operating system are you using exactly, and what gcc version?
>
> to be most specific...

Alright, I'm pretty stumped so far.   what happens if you
just edit
   /opt/sage/local/lib/python2.5/site-packages/rpy.py
and put a # at the beginning of the line
   RException = _rpy.RException
and try again?  I'm just curious.

Something is really weird, since for all my installs the context for the code
you list above is:

# Three new exceptions
# base exception
RPyException = _rpy.RPy_Exception;

# R <-> Python conversion exception
RPyTypeConversionException = _rpy.RPy_TypeConversionException;

# Exception raised by R
RPyRException = _rpy.RPy_RException

# for backwards compatibility
RException = RPyException


I wonder why your code looks totally different, why you have
# The new exception
RException = _rpy.RException

That code doesn't even appear in my rpy.py.


>
> [EMAIL PROTECTED] ~]$ gcc --v
> Using built-in specs.
> Target: i686-pc-linux-gnu
> Configured with: ../configure --prefix=/usr --enable-shared --enable-
> languages=c,c++,objc --enable-threads=posix --enable-__cxa_atexit --
> disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-
> clocale=gnu --disable-libstdcxx-pch --with-tune=generic
> Thread model: posix
> gcc version 4.2.2
>
> That's current Arch Linux, kernel 2.6.23.9 (stock distribution kernel)
> and gLibc 2.7, my machine is 32bit Athlon Barton, exactly it's:
>
> [EMAIL PROTECTED] ~]$ cat /proc/cpuinfo
> processor   : 0
> vendor_id   : AuthenticAMD
> cpu family  : 6
> model   : 10
> model name  : AMD Athlon(tm) XP 2600+
> stepping: 0
> cpu MHz : 2091.122
> cache size  : 256 KB
> fdiv_bug: no
> hlt_bug : no
> f00f_bug: no
> coma_bug: no
> fpu : yes
> fpu_exception   : yes
> cpuid level : 1
> wp  : yes
> flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up ts
> bogomips: 4186.91
> clflush size: 32
>
> >   (2) Could you send the build log for building R (i.e., the end of
> >  SAGE_ROOT/install.log)?
>
> it's not shortest so I've put it on net, it looks ok... it's at
> http://giniu.ravenlord.ws/install.log - I renamed old log and did sage
> -f r-2.6.1.p6 to be sure only needed lines are included
>
> >   (3) If you type
> >sage: !R
> > what happens?
>
> R console starts, I can do for example hist(rnorm(1000)) so I can say
> it mostly works...
>
> >  --William
>
> cheers,
> Andrzej.
>
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: SAGE-2.8.15!

2007-12-10 Thread Andrzej Giniewicz

Well, now that's indeed strange... maybe old version that I had
installed from -experimental messed something up, and it doesn't
update this file so maybe it's old one?... this could explain why it
looks different... revision of this file is quite old, that's Id tag:
rpy.py 342 2007-02-20 16:41:47Z warnes... commenting this line out
result in:

sage: from rpy import *
sage: r
RPy version 1.0.1 [R version 2.6.1 (2007-11-26)]

I will remove this file, make sure write permission on all files are
ok and rebuild R spkg - I will be back with results in minutes...

On 10 Gru, 20:48, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Dec 10, 2007 11:33 AM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote:
>
>
>
> > On 10 Gru, 19:57, "William Stein" <[EMAIL PROTECTED]> wrote:
> > > On Dec 10, 2007 10:50 AM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
>
> > > > I've seen that R moved from experimental to optional, now as
> > > > r-2.6.1.p6, tryied it but got:
>
> > > > sage: import rpy
> > > > ---
> > > > Traceback (most recent call
> > > > last)
>
> > > > /home/giniu/ in ()
>
> > > > /opt/sage/local/lib/python2.5/site-packages/rpy.py in ()
> > > > 171
> > > > 172 # The new exception
> > > > --> 173 RException = _rpy.RException
> > > > 174
> > > > 175 # I/O setters
>
> > > > : 'module' object has no attribute
> > > > 'RException'
>
> > > > that can be known issue but I decided I will report... :)
>
> > > Thanks.  However:
> > >   (1) What operating system are you using exactly, and what gcc version?
>
> > to be most specific...
>
> Alright, I'm pretty stumped so far.   what happens if you
> just edit
>/opt/sage/local/lib/python2.5/site-packages/rpy.py
> and put a # at the beginning of the line
>RException = _rpy.RException
> and try again?  I'm just curious.
>
> Something is really weird, since for all my installs the context for the code
> you list above is:
>
> # Three new exceptions
> # base exception
> RPyException = _rpy.RPy_Exception;
>
> # R <-> Python conversion exception
> RPyTypeConversionException = _rpy.RPy_TypeConversionException;
>
> # Exception raised by R
> RPyRException = _rpy.RPy_RException
>
> # for backwards compatibility
> RException = RPyException
>
> I wonder why your code looks totally different, why you have
> # The new exception
> RException = _rpy.RException
>
> That code doesn't even appear in my rpy.py.
>
>
>
>
>
> > [EMAIL PROTECTED] ~]$ gcc --v
> > Using built-in specs.
> > Target: i686-pc-linux-gnu
> > Configured with: ../configure --prefix=/usr --enable-shared --enable-
> > languages=c,c++,objc --enable-threads=posix --enable-__cxa_atexit --
> > disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-
> > clocale=gnu --disable-libstdcxx-pch --with-tune=generic
> > Thread model: posix
> > gcc version 4.2.2
>
> > That's current Arch Linux, kernel 2.6.23.9 (stock distribution kernel)
> > and gLibc 2.7, my machine is 32bit Athlon Barton, exactly it's:
>
> > [EMAIL PROTECTED] ~]$ cat /proc/cpuinfo
> > processor   : 0
> > vendor_id   : AuthenticAMD
> > cpu family  : 6
> > model   : 10
> > model name  : AMD Athlon(tm) XP 2600+
> > stepping: 0
> > cpu MHz : 2091.122
> > cache size  : 256 KB
> > fdiv_bug: no
> > hlt_bug : no
> > f00f_bug: no
> > coma_bug: no
> > fpu : yes
> > fpu_exception   : yes
> > cpuid level : 1
> > wp  : yes
> > flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> > mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up ts
> > bogomips: 4186.91
> > clflush size: 32
>
> > >   (2) Could you send the build log for building R (i.e., the end of
> > >  SAGE_ROOT/install.log)?
>
> > it's not shortest so I've put it on net, it looks ok... it's at
> >http://giniu.ravenlord.ws/install.log- I renamed old log and did sage
> > -f r-2.6.1.p6 to be sure only needed lines are included
>
> > >   (3) If you type
> > >sage: !R
> > > what happens?
>
> > R console starts, I can do for example hist(rnorm(1000)) so I can say
> > it mostly works...
>
> > >  --William
>
> > cheers,
> > Andrzej.
>
> --
> William Stein
> Associate Professor of Mathematics
> University of Washingtonhttp://wstein.org
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: SAGE-2.8.15!

2007-12-10 Thread Andrzej Giniewicz

OK...

so I removed this file, and it is now never... well... seems that at
switch from experimental to optional something went wrong on my local
machine... now it says:

sage: import rpy
sage: rpy.r

...

/opt/sage/local/lib/python2.5/site-packages/rpy.py in __repr__(self)
321
322 def __repr__(self):
--> 323 Rver = self.__getitem__('R_version_string')
324 return "RPy version %s [%s]" % (rpy_version, Rver)
325

/opt/sage/local/lib/python2.5/site-packages/rpy.py in
__getitem__(self, name)
304 def __getitem__(self, name):
305 # use r's 'get' function here, because the rpy one
only handles functions!
--> 306 obj = self.__dict__[name] = self.__dict__.get(name,
self.get(name))
307 return obj
308

: Error in function (x, pos = -1, envir =
as.environment(pos), mode = "any",  :
  variable "R_version_string" was not found

I remember I had same problem with experimental, I had to change
underscore to dot in name, and it was also on RPy mailing list for few
people... anyway I don't know if this is still some remaining part of
old version, or new... I'm going to build clean sage and then get this
package... will report back when it will be ready but it will take
some time...

sorry for troubles, didn't thought it can be old-file-problem,
A.

On 10 Gru, 20:48, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Dec 10, 2007 11:33 AM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote:
>
>
>
> > On 10 Gru, 19:57, "William Stein" <[EMAIL PROTECTED]> wrote:
> > > On Dec 10, 2007 10:50 AM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote:
>
> > > > Hi,
>
> > > > I've seen that R moved from experimental to optional, now as
> > > > r-2.6.1.p6, tryied it but got:
>
> > > > sage: import rpy
> > > > ---
> > > > Traceback (most recent call
> > > > last)
>
> > > > /home/giniu/ in ()
>
> > > > /opt/sage/local/lib/python2.5/site-packages/rpy.py in ()
> > > > 171
> > > > 172 # The new exception
> > > > --> 173 RException = _rpy.RException
> > > > 174
> > > > 175 # I/O setters
>
> > > > : 'module' object has no attribute
> > > > 'RException'
>
> > > > that can be known issue but I decided I will report... :)
>
> > > Thanks.  However:
> > >   (1) What operating system are you using exactly, and what gcc version?
>
> > to be most specific...
>
> Alright, I'm pretty stumped so far.   what happens if you
> just edit
>/opt/sage/local/lib/python2.5/site-packages/rpy.py
> and put a # at the beginning of the line
>RException = _rpy.RException
> and try again?  I'm just curious.
>
> Something is really weird, since for all my installs the context for the code
> you list above is:
>
> # Three new exceptions
> # base exception
> RPyException = _rpy.RPy_Exception;
>
> # R <-> Python conversion exception
> RPyTypeConversionException = _rpy.RPy_TypeConversionException;
>
> # Exception raised by R
> RPyRException = _rpy.RPy_RException
>
> # for backwards compatibility
> RException = RPyException
>
> I wonder why your code looks totally different, why you have
> # The new exception
> RException = _rpy.RException
>
> That code doesn't even appear in my rpy.py.
>
>
>
>
>
> > [EMAIL PROTECTED] ~]$ gcc --v
> > Using built-in specs.
> > Target: i686-pc-linux-gnu
> > Configured with: ../configure --prefix=/usr --enable-shared --enable-
> > languages=c,c++,objc --enable-threads=posix --enable-__cxa_atexit --
> > disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-
> > clocale=gnu --disable-libstdcxx-pch --with-tune=generic
> > Thread model: posix
> > gcc version 4.2.2
>
> > That's current Arch Linux, kernel 2.6.23.9 (stock distribution kernel)
> > and gLibc 2.7, my machine is 32bit Athlon Barton, exactly it's:
>
> > [EMAIL PROTECTED] ~]$ cat /proc/cpuinfo
> > processor   : 0
> > vendor_id   : AuthenticAMD
> > cpu family  : 6
> > model   : 10
> > model name  : AMD Athlon(tm) XP 2600+
> > stepping: 0
> > cpu MHz : 2091.122
> > cache size  : 256 KB
> > fdiv_bug: no
> > hlt_bug : no
> > f00f_bug: no
> > coma_bug: no
> > fpu : yes
> > fpu_exception   : yes
> > cpuid level : 1
> > wp  : yes
> > flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> > mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow up ts
> > bogomips: 4186.91
> > clflush size: 32
>
> > >   (2) Could you send the build log for building R (i.e., the end of
> > >  SAGE_ROOT/install.log)?
>
> > it's not shortest so I've put it on net, it looks ok... it's at
> >http://giniu.ravenlord.ws/install.log- I renamed old log and did sage
> > -f r-2.6.1.p6 to be sure only needed lines are included
>
> > >   (3) If you type
> > >sage: !R
> > > what happens?
>
> > R console starts, I can do for example hist(rnorm(1000)) so I can say
> > it mostly works...
>
> > >  --William
>
> > ch

[sage-support] Re: SAGE-2.8.15!

2007-12-10 Thread William Stein

On Dec 10, 2007 12:26 PM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote:
>
> OK...
>
> so I removed this file, and it is now never... well... seems that at
> switch from experimental to optional something went wrong on my local
> machine... now it says:
>
> sage: import rpy
> sage: rpy.r
>
> ...
>
> /opt/sage/local/lib/python2.5/site-packages/rpy.py in __repr__(self)
> 321
> 322 def __repr__(self):
> --> 323 Rver = self.__getitem__('R_version_string')
> 324 return "RPy version %s [%s]" % (rpy_version, Rver)
> 325
>
> /opt/sage/local/lib/python2.5/site-packages/rpy.py in
> __getitem__(self, name)
> 304 def __getitem__(self, name):
> 305 # use r's 'get' function here, because the rpy one
> only handles functions!
> --> 306 obj = self.__dict__[name] = self.__dict__.get(name,
> self.get(name))
> 307 return obj
> 308
>
> : Error in function (x, pos = -1, envir =
> as.environment(pos), mode = "any",  :
>   variable "R_version_string" was not found
>
> I remember I had same problem with experimental, I had to change
> underscore to dot in name, and it was also on RPy mailing list for few
> people... anyway I don't know if this is still some remaining part of
> old version, or new... I'm going to build clean sage and then get this
> package... will report back when it will be ready but it will take
> some time...
>
> sorry for troubles, didn't thought it can be old-file-problem,

I'm sorry for the troubles you're having, and greatly appreciate
that your testing the R spkg.  That rpy doesn't overwrite
old files, etc., is something I'll have to keep in mind when we make
new spkg's that include new versions of R and rpy -- we'll have
to be careful to delete the old rpy files manually.

 -- William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: SAGE-2.8.15!

2007-12-10 Thread Andrzej Giniewicz



On 10 Gru, 21:45, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Dec 10, 2007 12:26 PM, Andrzej Giniewicz <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > OK...
>
> > so I removed this file, and it is now never... well... seems that at
> > switch from experimental to optional something went wrong on my local
> > machine... now it says:
>
> > sage: import rpy
> > sage: rpy.r
>
> > ...
>
> > /opt/sage/local/lib/python2.5/site-packages/rpy.py in __repr__(self)
> > 321
> > 322 def __repr__(self):
> > --> 323 Rver = self.__getitem__('R_version_string')
> > 324 return "RPy version %s [%s]" % (rpy_version, Rver)
> > 325
>
> > /opt/sage/local/lib/python2.5/site-packages/rpy.py in
> > __getitem__(self, name)
> > 304 def __getitem__(self, name):
> > 305 # use r's 'get' function here, because the rpy one
> > only handles functions!
> > --> 306 obj = self.__dict__[name] = self.__dict__.get(name,
> > self.get(name))
> > 307 return obj
> > 308
>
> > : Error in function (x, pos = -1, envir =
> > as.environment(pos), mode = "any",  :
> >   variable "R_version_string" was not found
>
> > I remember I had same problem with experimental, I had to change
> > underscore to dot in name, and it was also on RPy mailing list for few
> > people... anyway I don't know if this is still some remaining part of
> > old version, or new... I'm going to build clean sage and then get this
> > package... will report back when it will be ready but it will take
> > some time...
>
> > sorry for troubles, didn't thought it can be old-file-problem,
>
> I'm sorry for the troubles you're having, and greatly appreciate
> that your testing the R spkg.]

no problem, whole pleasure on my side :)

>  That rpy doesn't overwrite
> old files, etc., is something I'll have to keep in mind when we make
> new spkg's that include new versions of R and rpy -- we'll have
> to be careful to delete the old rpy files manually.

ok, so I build fresh sage 2.8.15, upgraded to get new singular, and
then installed r-2.6.1.p6, this ensures fresh environment for R...
unfortuneatlly I get:

sage: import rpy
sage: rpy.r
---
  Traceback (most recent call
last)

/home/giniu/ in ()

/opt/sage/local/lib/python2.5/site-packages/IPython/Prompts.py in
__call__(self,
 arg)
521
522 # and now call a possibly user-defined print
mechanism
--> 523 manipulated_val = self.display(arg)
524
525 # user display hooks can change the variable to be
stored in

/opt/sage/local/lib/python2.5/site-packages/IPython/Prompts.py in
_display(self,
 arg)
545 """
546
--> 547 return self.shell.hooks.result_display(arg)
548
549 # Assign the default display method:

/opt/sage/local/lib/python2.5/site-packages/IPython/hooks.py in
__call__(self, *
args, **kw)
132 #print "prio",prio,"cmd",cmd #dbg
133 try:
--> 134 ret = cmd(*args, **kw)
135 return ret
136 except ipapi.TryNext, exc:

/opt/sage/local/lib/python2.5/site-packages/IPython/hooks.py in
result_display(s
elf, arg)
160
161 if self.rc.pprint:
--> 162 out = pformat(arg)
163 if '\n' in out:
164 # So that multi-line strings line up with the left
column of

/opt/sage/local/lib/python2.5/pprint.py in pformat(self, object)
109 def pformat(self, object):
110 sio = _StringIO()
--> 111 self._format(object, sio, 0, 0, {}, 0)
112 return sio.getvalue()
113

/opt/sage/local/lib/python2.5/pprint.py in _format(self, object,
stream, indent,
 allowance, context, level)
127 self._readable = False
128 return
--> 129 rep = self._repr(object, context, level - 1)
130 typ = _type(object)
131 sepLines = _len(rep) > (self._width - 1 - indent -
allowance)

/opt/sage/local/lib/python2.5/pprint.py in _repr(self, object,
context, level)
193 def _repr(self, object, context, level):
194 repr, readable, recursive = self.format(object,
context.copy(),
--> 195 self._depth,
level)
196 if not readable:
197 self._readable = False

/opt/sage/local/lib/python2.5/pprint.py in format(self, object,
context, maxleve
ls, level)
205 and whether the object represents a recursive
construct.
206 """
--> 207 return _safe_repr(object, context, maxlevels, level)
208
209

/opt/sage/local/lib/python2.5/pprint.py in _safe_repr(object, context,
maxlevels
, level)
290 return format % _commajoin(components), readable,
recursive
291
--> 292 rep = repr(object)
293 return rep, (rep and not rep.startswith('<')), False
294

/opt/sage/local/lib/python2.5/site-packages/rp

[sage-support] gaussian_binomial()

2007-12-10 Thread Daniel Bump


There are some problems with the function gaussian_binomial
in sage 2.8.14. The help string contains a typo:

 binom{n}{k}_q = frac{(1-q^m)(1-q^{m-1})... (1-q^{m-r+1})}
 {(1-q)(1-q^2)... (1-q^r)}.

The typo is that m and r on the RHS should match n and k on the LHS.

I feel that to be useful gaussian_binomial(n,k,q) should work if n
and k are integers and 0<=k<=n, no matter what q is. At the moment,
the function requires q to be an integer but there will be
applications if q is an indeterminate.  Moreover if q = 1 this
should give the ordinary binomial coefficient but the current
implementation fails due to division by zero.

Perhaps the following is one way to improve the
function would be as follows. Then it gives the
correct behavior when q is an indeterminate or q=1.

Why does the original function use misc.prod instead
of prod?

Daniel Bump

def gaussian_binomial(n,k,q):
r"""
Return the gaussian binomial
$$
   \binom{n}{k}_q = \frac{(1-q^n)(1-q^{n-1})\cdots (1-q^{n-k+1})}
 {(1-q)(1-q^2)\cdots (1-q^k)}.
$$ 

EXAMPLES:
sage: gaussian_binomial(5,1,2)
31

AUTHOR: David Joyner and William Stein
"""

R.=QQ[]

n = prod([1 - x**i for i in range((n-k+1),n+1)])
d = prod([1 - x**i for i in range(1,k+1)])

return (n / d).subs(x = q)




 

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: gaussian_binomial()

2007-12-10 Thread mabshoff



On Dec 11, 1:48 am, Daniel Bump <[EMAIL PROTECTED]> wrote:
> There are some problems with the function gaussian_binomial
> in sage 2.8.14. The help string contains a typo:
>
>  binom{n}{k}_q = frac{(1-q^m)(1-q^{m-1})... (1-q^{m-r+1})}
>  {(1-q)(1-q^2)... (1-q^r)}.
>
> The typo is that m and r on the RHS should match n and k on the LHS.
>
> I feel that to be useful gaussian_binomial(n,k,q) should work if n
> and k are integers and 0<=k<=n, no matter what q is. At the moment,
> the function requires q to be an integer but there will be
> applications if q is an indeterminate.  Moreover if q = 1 this
> should give the ordinary binomial coefficient but the current
> implementation fails due to division by zero.
>
> Perhaps the following is one way to improve the
> function would be as follows. Then it gives the
> correct behavior when q is an indeterminate or q=1.
>
> Why does the original function use misc.prod instead
> of prod?
>

Hello Daniel,

thanks or the bug report. We are now tracking this issue at

http://www.sagetrac.org/sage_trac/ticket/1456

> Daniel Bump

Cheers,

Michael

>
> def gaussian_binomial(n,k,q):
> r"""
> Return the gaussian binomial
> $$
>\binom{n}{k}_q = \frac{(1-q^n)(1-q^{n-1})\cdots (1-q^{n-k+1})}
>  {(1-q)(1-q^2)\cdots (1-q^k)}.
> $$
>
> EXAMPLES:
> sage: gaussian_binomial(5,1,2)
> 31
>
> AUTHOR: David Joyner and William Stein
> """
>
> R.=QQ[]
>
> n = prod([1 - x**i for i in range((n-k+1),n+1)])
> d = prod([1 - x**i for i in range(1,k+1)])
>
> return (n / d).subs(x = q)
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: gaussian_binomial()

2007-12-10 Thread David Joyner

Thanks for reporting this, Dan! It's now
http://sagetrac.org/sage_trac/ticket/1456


On Dec 10, 2007 7:48 PM, Daniel Bump <[EMAIL PROTECTED]> wrote:
>
>
> There are some problems with the function gaussian_binomial
> in sage 2.8.14. The help string contains a typo:
>
>  binom{n}{k}_q = frac{(1-q^m)(1-q^{m-1})... (1-q^{m-r+1})}
>  {(1-q)(1-q^2)... (1-q^r)}.
>
> The typo is that m and r on the RHS should match n and k on the LHS.
>
> I feel that to be useful gaussian_binomial(n,k,q) should work if n
> and k are integers and 0<=k<=n, no matter what q is. At the moment,
> the function requires q to be an integer but there will be
> applications if q is an indeterminate.  Moreover if q = 1 this
> should give the ordinary binomial coefficient but the current
> implementation fails due to division by zero.
>
> Perhaps the following is one way to improve the
> function would be as follows. Then it gives the
> correct behavior when q is an indeterminate or q=1.
>
> Why does the original function use misc.prod instead
> of prod?
>
> Daniel Bump
>
> def gaussian_binomial(n,k,q):
> r"""
> Return the gaussian binomial
> $$
>\binom{n}{k}_q = \frac{(1-q^n)(1-q^{n-1})\cdots (1-q^{n-k+1})}
>  {(1-q)(1-q^2)\cdots (1-q^k)}.
> $$
>
> EXAMPLES:
> sage: gaussian_binomial(5,1,2)
> 31
>
> AUTHOR: David Joyner and William Stein
> """
>
> R.=QQ[]
>
> n = prod([1 - x**i for i in range((n-k+1),n+1)])
> d = prod([1 - x**i for i in range(1,k+1)])
>
> return (n / d).subs(x = q)
>
>
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] patch creation problem?

2007-12-10 Thread David Joyner

Hi:
It seems like I saw this reported already but can't find it now.
I'm thinking I'm doing something stupid, but can't figure it out
and was wondering if someone on this list can see the problem.

My usual procedure for creating a patch is as follows:

1. Take a file I want to edit, say linear_code.py in sage/coding,
copy it to a directory sagestuff, say.
2. Create a clone, say codes1.
3. Edit the file, modifying/adding the functions I want.
4. Copy the file sagestuff/linear_code.py to
sage/coding/linear_code.py, over-writing the existing file.
5. Rebuild the clone sage -br
6. Test the file sage -t sagestuff/linear_code.py
7. If there are errors, go to step 3. Other wise,
create a patch using hg_sage.commit() and
hg_sage.bundle('mybundle')

This process is no longer working for me. Now, it seems I have
to type sage -sh before step 6. Then I have to type
export EDITOR=vi (export EDITOR=emacs seems not to work)
before step 7.

Does this make sense? Is the behavior of SAGE different or am I
doing something stupid?

- David

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: [sage-devel] bug in 2.8.15 (somewhere in sage.calculus?)

2007-12-10 Thread David Joyner

On Dec 10, 2007 8:29 PM, Jonathan Bober <[EMAIL PROTECTED]> wrote:
>
> Hi all. I just opened ticket #1457 (see below)
>
> http://trac.sagemath.org/sage_trac/ticket/1457
>
> The following is hopefully pretty self explanatory:
>
> ---
>
> The following took place on an Intel Core Duo (32 bit) running Ubuntu
> 7.10. Hopefully the cause is obvious for someone familiar with the
> calculus/plotting code.
>
> (Note: replacing f(x) with f(x) = 2.0 * sqrt(x^2.0 + 300.0^2.0) - x +
> 1000.0 is a suitable workaround.)
>
>
> --
> | SAGE Version 2.8.15, Release Date: 2007-12-03  |
> | Type notebook() for the GUI, and license() for information.|
> --
>
> sage: f(x) = 2 * sqrt(x^2 + 300^2) - x + 1000
> sage: P = f.diff(x).diff(x).plot(xmin=0,xmax=1000)
> ---
> Traceback (most recent call last)
>

Note

sage: x = var("x")
sage: f = lambda x: 2 * sqrt(x^2 + 300^2) - x + 1000
sage: P = f(x).diff(x).diff(x).plot(xmin=0,xmax=1000)
sage: show(P)
sage: g =  2 * sqrt(x^2 + 300^2) - x + 1000
sage: P = g.diff(x).diff(x).plot(xmin=0,xmax=1000)
sage: show(P)

both work and yield the same plot.


> /home/bober/sage-2.8.15.alpha1/ in ()
>
> /home/bober/sage-2.8.15.alpha1/local/lib/python2.5/site-packages/sage/calculus/calculus.py
>  in plot(self, *args, **kwds)
> 602 else:
> 603 f = self.function(param)
> --> 604 return plot(f, *args, **kwds)
> 605
> 606 def __lt__(self, right):
>
> /home/bober/sage-2.8.15.alpha1/local/lib/python2.5/site-packages/sage/plot/plot.py
>  in __call__(self, funcs, *args, **kwds)
>2303 G = funcs.plot(*args, **kwds)
>2304 else:
> -> 2305 G = self._call(funcs, *args, **kwds)
>2306 if do_show:
>2307 G.show()
>
> /home/bober/sage-2.8.15.alpha1/local/lib/python2.5/site-packages/sage/plot/plot.py
>  in _call(self, funcs, xmin, xmax, parametric, polar, label, show, **kwds)
>2353
>2354 try:
> -> 2355 y = f(x)
>2356 data.append((x, float(y)))
>2357 except (ZeroDivisionError, TypeError, ValueError), msg:
>
> /home/bober/sage-2.8.15.alpha1/local/lib/python2.5/site-packages/sage/calculus/calculus.py
>  in (x)
> 591 else:
> 592 param = A[0]
> --> 593 f = lambda x: self(x)
> 594 else:
> 595 A = self.variables()
>
> /home/bober/sage-2.8.15.alpha1/local/lib/python2.5/site-packages/sage/calculus/calculus.py
>  in __call__(self, *args)
>4012 vars = self.args()
>4013 dct = dict( (vars[i], args[i]) for i in range(len(args)) )
> -> 4014 return self._expr.substitute(dct)
>4015
>4016 def _repr_(self, simplify=True):
>
> /home/bober/sage-2.8.15.alpha1/local/lib/python2.5/site-packages/sage/calculus/calculus.py
>  in substitute(self, in_dict, **kwds)
>2589 kwds = self.__parse_in_dict(in_dict, kwds)
>2590 kwds = self.__varify_kwds(kwds)
> -> 2591 return X._recursive_sub(kwds)
>2592
>2593 def subs(self, *args, **kwds):
>
> /home/bober/sage-2.8.15.alpha1/local/lib/python2.5/site-packages/sage/calculus/calculus.py
>  in _recursive_sub(self, kwds)
>3424 """
>3425 ops = self._operands
> -> 3426 new_ops = [SR(op._recursive_sub(kwds)) for op in ops]
>3427
>3428 #Check to see if all of the new_ops are symbolic constants
>
> /home/bober/sage-2.8.15.alpha1/local/lib/python2.5/site-packages/sage/calculus/calculus.py
>  in _recursive_sub(self, kwds)
>3424 """
>3425 ops = self._operands
> -> 3426 new_ops = [SR(op._recursive_sub(kwds)) for op in ops]
>3427
>3428 #Check to see if all of the new_ops are symbolic constants
>
> /home/bober/sage-2.8.15.alpha1/local/lib/python2.5/site-packages/sage/calculus/calculus.py
>  in _recursive_sub(self, kwds)
>3430 is_constant = all(map(lambda x: isinstance(x, 
> SymbolicConstant), new_ops))
>3431 if is_constant:
> -> 3432 return SymbolicConstant( self._operator(*map(lambda x: 
> x._obj, new_ops)) )
>3433 else:
>3434 return self._operator(*new_ops)
>
> /home/bober/sage-2.8.15.alpha1/rational.pyx in 
> sage.rings.rational.Rational.__pow__()
>
> : BUG:  Rational.__pow__ called on a 
> non-Rational
> sage:
>
>
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sa

[sage-support] Re: patch creation problem?

2007-12-10 Thread William Stein

On Dec 10, 2007 5:44 PM, David Joyner <[EMAIL PROTECTED]> wrote:
>
> Hi:
> It seems like I saw this reported already but can't find it now.
> I'm thinking I'm doing something stupid, but can't figure it out
> and was wondering if someone on this list can see the problem.
>
> My usual procedure for creating a patch is as follows:
>
> 1. Take a file I want to edit, say linear_code.py in sage/coding,
> copy it to a directory sagestuff, say.
> 2. Create a clone, say codes1.
> 3. Edit the file, modifying/adding the functions I want.
> 4. Copy the file sagestuff/linear_code.py to
> sage/coding/linear_code.py, over-writing the existing file.
> 5. Rebuild the clone sage -br
> 6. Test the file sage -t sagestuff/linear_code.py
> 7. If there are errors, go to step 3. Other wise,
> create a patch using hg_sage.commit() and
> hg_sage.bundle('mybundle')
>
> This process is no longer working for me. Now, it seems I have
> to type sage -sh before step 6.

What happens if you don't?

> Then I have to type
> export EDITOR=vi (export EDITOR=emacs seems not to work)
> before step 7.

What happens if you dont type export EDITOR=vi?
There could be a problem due to maybe some sort of  library conflict.

William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: patch creation problem?

2007-12-10 Thread David Joyner

On Dec 10, 2007 9:25 PM, William Stein <[EMAIL PROTECTED]> wrote:
>
> On Dec 10, 2007 5:44 PM, David Joyner <[EMAIL PROTECTED]> wrote:
> >
> > Hi:
> > It seems like I saw this reported already but can't find it now.
> > I'm thinking I'm doing something stupid, but can't figure it out
> > and was wondering if someone on this list can see the problem.
> >
> > My usual procedure for creating a patch is as follows:
> >
> > 1. Take a file I want to edit, say linear_code.py in sage/coding,
> > copy it to a directory sagestuff, say.
> > 2. Create a clone, say codes1.
> > 3. Edit the file, modifying/adding the functions I want.
> > 4. Copy the file sagestuff/linear_code.py to
> > sage/coding/linear_code.py, over-writing the existing file.
> > 5. Rebuild the clone sage -br
> > 6. Test the file sage -t sagestuff/linear_code.py
> > 7. If there are errors, go to step 3. Other wise,
> > create a patch using hg_sage.commit() and
> > hg_sage.bundle('mybundle')
> >
> > This process is no longer working for me. Now, it seems I have
> > to type sage -sh before step 6.
>
> What happens if you don't?


It does not read the changes I made. For example, if I added a
function 'chinen_polynomial'
and add examples in the docstring for that function, all the examples
will fail with
AttributeError: 'LinearCode' object has no attribute 'chinen_polynomial'.


>
> > Then I have to type
> > export EDITOR=vi (export EDITOR=emacs seems not to work)
> > before step 7.
>
> What happens if you dont type export EDITOR=vi?


sage: hg_sage.commit()
cd "/home/wdj/wdj/sagefiles/sage-2.8.13.alpha1/devel/sage" && hg diff  | less
cd "/home/wdj/wdj/sagefiles/sage-2.8.13.alpha1/devel/sage" && hg commit
emacs: symbol lookup error: /usr/lib/libcairo.so.2: undefined symbol:
FT_Library_SetLcdFilter
transaction abort!
rollback completed
abort: edit failed: emacs exited with status 127



> There could be a problem due to maybe some sort of  library conflict.
>
> William
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: patch creation problem?

2007-12-10 Thread William Stein

On Dec 10, 2007 6:35 PM, David Joyner <[EMAIL PROTECTED]> wrote:
>
> On Dec 10, 2007 9:25 PM, William Stein <[EMAIL PROTECTED]> wrote:
> >
> > On Dec 10, 2007 5:44 PM, David Joyner <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi:
> > > It seems like I saw this reported already but can't find it now.
> > > I'm thinking I'm doing something stupid, but can't figure it out
> > > and was wondering if someone on this list can see the problem.
> > >
> > > My usual procedure for creating a patch is as follows:
> > >
> > > 1. Take a file I want to edit, say linear_code.py in sage/coding,
> > > copy it to a directory sagestuff, say.
^

Do *not* do step 1.

> > > 2. Create a clone, say codes1.
> > > 3. Edit the file, modifying/adding the functions I want.


Do 3 *in* the clone directory, i.e., SAGE_ROOT/devel/sage/sage/z

> > > 4. Copy the file sagestuff/linear_code.py to
> > > sage/coding/linear_code.py, over-writing the existing file.

Do NOT do that (since you didn't do 1).

> > > 5. Rebuild the clone sage -br
> > > 6. Test the file sage -t sagestuff/linear_code.py

Do NOT do that (instead test SAGE_ROOT/devel/sage/sage/z)


> > > 7. If there are errors, go to step 3. Other wise,
> > > create a patch using hg_sage.commit() and
> > > hg_sage.bundle('mybundle')
> > >
> > > This process is no longer working for me. Now, it seems I have
> > > to type sage -sh before step 6.
> >
> > What happens if you don't?
>
>
> It does not read the changes I made. For example, if I added a
> function 'chinen_polynomial'
> and add examples in the docstring for that function, all the examples
> will fail with
> AttributeError: 'LinearCode' object has no attribute 'chinen_polynomial'.
>
>
> >
> > > Then I have to type
> > > export EDITOR=vi (export EDITOR=emacs seems not to work)
> > > before step 7.
> >
> > What happens if you dont type export EDITOR=vi?
>
>
> sage: hg_sage.commit()
> cd "/home/wdj/wdj/sagefiles/sage-2.8.13.alpha1/devel/sage" && hg diff  | less
> cd "/home/wdj/wdj/sagefiles/sage-2.8.13.alpha1/devel/sage" && hg commit
> emacs: symbol lookup error: /usr/lib/libcairo.so.2: undefined symbol:
> FT_Library_SetLcdFilter
> transaction abort!
> rollback completed
> abort: edit failed: emacs exited with status 127
>
>
>
> > There could be a problem due to maybe some sort of  library conflict.
> >
> > William
> >
> > >
> >
>
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: patch creation problem?

2007-12-10 Thread William Stein

On Dec 10, 2007 6:35 PM, David Joyner <[EMAIL PROTECTED]> wrote:
>
> On Dec 10, 2007 9:25 PM, William Stein <[EMAIL PROTECTED]> wrote:
> >
> > On Dec 10, 2007 5:44 PM, David Joyner <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi:
> > > It seems like I saw this reported already but can't find it now.
> > > I'm thinking I'm doing something stupid, but can't figure it out
> > > and was wondering if someone on this list can see the problem.
> > >
> > > My usual procedure for creating a patch is as follows:
> > >
> > > 1. Take a file I want to edit, say linear_code.py in sage/coding,
> > > copy it to a directory sagestuff, say.
> > > 2. Create a clone, say codes1.
> > > 3. Edit the file, modifying/adding the functions I want.
> > > 4. Copy the file sagestuff/linear_code.py to
> > > sage/coding/linear_code.py, over-writing the existing file.
> > > 5. Rebuild the clone sage -br
> > > 6. Test the file sage -t sagestuff/linear_code.py
> > > 7. If there are errors, go to step 3. Other wise,
> > > create a patch using hg_sage.commit() and
> > > hg_sage.bundle('mybundle')
> > >
> > > This process is no longer working for me. Now, it seems I have
> > > to type sage -sh before step 6.
> >
> > What happens if you don't?
>
>
> It does not read the changes I made. For example, if I added a
> function 'chinen_polynomial'
> and add examples in the docstring for that function, all the examples
> will fail with
> AttributeError: 'LinearCode' object has no attribute 'chinen_polynomial'.
>
>
> >
> > > Then I have to type
> > > export EDITOR=vi (export EDITOR=emacs seems not to work)
> > > before step 7.
> >
> > What happens if you dont type export EDITOR=vi?
>
>
> sage: hg_sage.commit()
> cd "/home/wdj/wdj/sagefiles/sage-2.8.13.alpha1/devel/sage" && hg diff  | less
> cd "/home/wdj/wdj/sagefiles/sage-2.8.13.alpha1/devel/sage" && hg commit
> emacs: symbol lookup error: /usr/lib/libcairo.so.2: undefined symbol:
> FT_Library_SetLcdFilter
> transaction abort!
> rollback completed
> abort: edit failed: emacs exited with status 127
>

This is a library conflict.   I know how to fix it, by unsetting some
environment
variables before calling emacs.   This is trac #975:
http://trac.sagemath.org/sage_trac/ticket/975

For now, if you put this in your SAGE_ROOT/local/bin/ it will be a work-around:
   (1) Make a file SAGE_ROOT/local/bin/emacs
   (2) Put this in it:

#!/bin/sh
unset LD_LIBRARY_PATH
unset DYLD_LIBRARY_PATH
/usr/bin/emacs $@

   (3) make it executable:
chmod +x SAGE_ROOT/local/bin/emacs

William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Re: Notebook Server Setup? (Upgrade to Gutsy)

2007-12-10 Thread alex clemesha
On Dec 10, 2007 11:32 AM, William Stein <[EMAIL PROTECTED]> wrote:

> On Dec 10, 2007 11:05 AM, Adam Getchell <[EMAIL PROTECTED]> wrote:
> >
> > Hi all,
> >
> > I upgraded my SAGE install from feisty to gutsy by adding XUbuntu via:
>
> I assume you're using sage-vmware?
>
> > sudo apt-get install xubuntu-desktop
> >
> > and then doing an upgrade using the Upgrade manager.
>
> Excellent.   I'm glad that works.
>
> > One item that seemed to break was the "notebook" script (which I'm
> > having a hard time finding, where is it located?). It fails with:
>
> I recall it being /usr/local/bin/notebook
>
> Try doing
>   [EMAIL PROTECTED]:~$  which notebook
> to find out for sure.
>
> >
> > [EMAIL PROTECTED]:~$ notebook
> > eth0: error fetching interface information: Device not found
> > Error starting notebook.
>
> Did your network interface change to eth1 or something?  Look
> in /usr/local/bin/notebook to see what is going on.
>
> > However, SAGE starts just fine using:
> >
> > sudo sage -notebook
> >
> > And then connecting to https://:8000
>
> Excellent.
>
> > Also, issuing sudo sage -update gets the newest packages of Singular,
> > which work great!
> >
> > Questions: After looking around in notebook.py, I see a method
> > add_user to add more users. Where is this accessible?
>
> Currently there are two ways to add users though a third is planned:
>
> (1) Start the notebook like this:
>
>   sage: notebook(..., accounts=True)
>
> then just like at http://sagenb.com on the lower right there will
> be a link to create a new account.   You can add a bunch
> of accounts (the email isn't really used, except to send
> a confirmation message).  Create all the accounts you want,
> then rerun the server with notebook(..., accounts=False)
> to run the server but without just *anybody* being able to
> create a new account.
>
> (2) From the command line -- this is trickier.  If you need this
> let me know and I'll answer later.
>
> We plan to make it so admins have a panel in the notebook
> to add new users and manage them.  It will look much like the
> "Mange Users" screens in Google Groups.   I havne't had
> time to implement this yet.
>
> > Also, I changed the port=443 in Notebook.__init__ , however, SAGE
> > still started on (non-standard port) 8000. Which classes/files control
> > the SAGE server?
>
> The port it uses is determined by the port= option to the notebook
> command:
>
>   sage: notebook(port = 80)
>
> runs it on port 80.Do
>
>
>   sage: notebook?
>
> for more along these lines.
>
> > I guess my questions basically boil down to sysadmin ones: how do I
> > add/delete users?
>
> We haven't implementing deleting users yet :-(.
>
> >  where is authentication handled?
>
> in server/notebook/avatars.py and server/notebook/twist.py


The file 'server/notebook/avatars.py' should be the only place
where 'security' (i.e. deciding what resource to return depending
on a users login status, determined by a PaswordChecker)
is handled ... is looks like that has changed since I have looked at
the code for the Sage notebook.

Adam, if you want to know more of the details, please ask ...
the way Twisted handles security can be confusing at first,
but their method is actually very clean.


>
> Alex Clemesha and Dorain Raymer wrote avatars.py so
> they might have some helpful remarks.
>
> > how do I change the
> > port?
>
> See above.
>
> >
> > Basically, I'm looking at setting up a SAGE notebook server using
> > standard https, with add/remove users, and (hopefully) the ability to
> > tie into an authentication system (such as CAS, which already has a
> > python module written for it for Zope, of which it looks like Twisted
> > has some commonality).
>

I'm not sure of your intentions or desire to really set up a secure
enviroment,
but one thing I would recommend is that you *do not* serve the notebook
on a priviledged port, instead serve it from some non-privledged port (i.e.
8000), and you
can then set-up a reverse proxy to it (like "notebook.mysite.com") if you
want.


Alex





>
> >
>
> Cool.
>
>  -- William
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---



[sage-support] Getting started with the SAGE notebook

2007-12-10 Thread Ted Kosan

For those people who are having trouble getting started with SAGE
after installing it, the following "Getting Started With Sage"
document may be helpful:

http://sage.math.washington.edu/home/tkosan/newbies_book/short_version/

If you find these instructions to be useful, let me know and I will
look placing them into the SAGE tutorial.

Ted

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@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-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~--~~~~--~~--~--~---