[sage-support] Logarithmic integral at complex values?

2008-11-02 Thread Michel

Hi,

Is there a method in sage to compute Li(z) for z complex? I am trying
to illustrate
Riemann prime number formula but now it seems Li(z) accept only real
arguments.

Michel

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



[sage-support] Re: Logarithmic integral at complex values?

2008-11-02 Thread Michel

Ok it seems that li(x)=Ei(log(x)) and this works for complex values.
Furthermore Li(x)=li(x)-li(2).

It seems that Li(x) has been artificially curtailed to take
only real arguments.

Michel


On Nov 2, 3:00 pm, Michel <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is there a method in sage to compute Li(z) for z complex? I am trying
> to illustrate
> Riemann prime number formula but now it seems Li(z) accept only real
> arguments.
>
> Michel
--~--~-~--~~~---~--~~
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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Question about Plot

2008-11-02 Thread Marshall Hampton

I also do not have time to do this myself. The idea of the
"manual_plot" is that I might be able to do a seperate command, but
for the foreseeable future I will not have the time to understand the
current plot command well enough to improve it; I've tried and failed
already.  Instead, I have ended up writing my own commands for things
like multiple axes when I need them for critical things like
publications.

If you think its a bad idea to put such code in Sage itself, I won't
try to.  Some of it is likely to appear in some @interact examples I
am working on for modeling circulatory systems.

-Marshall

On Nov 1, 12:58 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Sat, Nov 1, 2008 at 10:44 AM, Marshall Hampton <[EMAIL PROTECTED]> wrote:
>
> > This has been irritating for a long time.  I have tried to look at
> > this code too but I find it confusing.  I have been reduced to writing
> > my own code to produce axes (sometimes I need some funny things, like
> > 2 sets of axes for a plot with two different scales).  There is
> > probably already a ticket for this but I'm not sure what it is off
> > hand.
>
> > In general there needs to be clearer ways to override the choices that
> > plot makes.  For example, I think currently that when one specifies
> > xmin, xmax, etc, the plot is still padded out a little, which is
> > sometimes unacceptable.  It also sometimes put the axes in the middle
> > of the plot, sometimes on the side...ack.
>
> > Maybe it would make sense to make an alternative plot command,
> > something like "manual_plot", with more direct and fine-grained
> > control.  Doing it from scratch might be easier than changing the
> > current code.
>
> No.  The problem is that plot is only partly implemented.
> One should look at the mathematica design for doing this (where this
> involves anything with axes), design a sage-friendly way of doing
> at least that functionality (and more), then implement it on top
> of the current plot command.  I wish I personally had time to do
> this right now, but I don't.
>
>  -- 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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: permissions in sage

2008-11-02 Thread William Stein

On Sun, Nov 2, 2008 at 7:38 AM, Kevin Buzzard <[EMAIL PROTECTED]> wrote:
> I'm still unclear about the philosophy of permissions.
>
> I downloaded sage 3.1.4 source and compiled from source. As root. Into
> /usr/local. Because I wasn't sure how to make the installation global.
>
> And today I tried (as a non-root user)
>
> sage: magma('sqrt(2)')
>
> [yes, I know it should be Sqrt but I'm guessing that isn't the problem]
>
> and I got
>
> ---
> TypeError Traceback (most recent call last)
>
> /home/buzzard/ in ()
>
> /usr/local/sage-3.1.4/local/lib/python2.5/site-packages/sage/interfaces/magma.pyc
> in __call__(self, x, gens)
>502 if isinstance(x, bool):
>503 return Expect.__call__(self, str(x).lower())
> --> 504 return Expect.__call__(self, x)
>505 return self.objgens(x, gens)
>506
>
> /usr/local/sage-3.1.4/local/lib/python2.5/site-packages/sage/interfaces/expect.pyc
> in __call__(self, x, name)
>963 return x
>964 if isinstance(x, basestring):
> --> 965 return cls(self, x, name=name)
>966 try:
>967 return self._coerce_from_special_method(x)
>
> /usr/local/sage-3.1.4/local/lib/python2.5/site-packages/sage/interfaces/expect.pyc
> in __init__(self, parent, value, is_name, name)
>   1281 except (TypeError, KeyboardInterrupt, RuntimeError,
> ValueError), x:
>   1282 self._session_number = -1
> -> 1283 raise TypeError, x
>   1284 self._session_number = parent._session_number
>   1285
>
> TypeError: While attempting to compile
> /usr/local/sage-3.1.4/data/extcode//magma/latex/latex.m (Data file
> non-existent):
> Can't open lock file
> /usr/local/sage-3.1.4/data/extcode//magma/latex/latex.lck for writing
> (Permission denied)
>
> While attempting to compile
> /usr/local/sage-3.1.4/data/extcode//magma/sage/basic.m (Data file
> non-existent):
> Can't open lock file
> /usr/local/sage-3.1.4/data/extcode//magma/sage/basic.lck for writing
> (Permission denied)
> sage:
>
> ***
>
> and I su-ed to root and tried again and got it right and then changed back
> to
> a non-root user and now it's OK. But what struck me, as a general user,
> was that the sage installation instructions didn't seem to explain anything
> to me about what the "correct" way to install sage system-wide on a unix
> machine was. Did I do the wrong thing?>
> Kevin
>
> PS this is sort of a 'bug report' but I'll send some general comments
> about your Bordeaux write-up to you later.

I think this is a reasonable bug report.  The fix is for Sage to
include the cached precompiled versions of the Magma files.
It used to be with Magma that one had to start it up as root
once because they didn't include precompiled files.  I think
this has changed, i.e., I think they now ship the precompiled
cached files in addition to the source files.

Note that it's best that sage bug reports should go to the mailing list
sage-support@googlegroups.com, and that I've cc'd this
message there.   This way vastly more people benefit from discussion
about the bugs, can find help (via a google search) when they run into
similar problems, etc.

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



[sage-support] Re: permissions in sage

2008-11-02 Thread William Stein

On Sun, Nov 2, 2008 at 10:23 AM, William Stein <[EMAIL PROTECTED]> wrote:
> On Sun, Nov 2, 2008 at 7:38 AM, Kevin Buzzard <[EMAIL PROTECTED]> wrote:
>> I'm still unclear about the philosophy of permissions.
>>
>> I downloaded sage 3.1.4 source and compiled from source. As root. Into
>> /usr/local. Because I wasn't sure how to make the installation global.
>>
>> And today I tried (as a non-root user)
>>
>> sage: magma('sqrt(2)')
>>
>> [yes, I know it should be Sqrt but I'm guessing that isn't the problem]

I've made this trac ticket #4424:

http://trac.sagemath.org/sage_trac/ticket/4424

>>
>> and I got
>>
>> ---
>> TypeError Traceback (most recent call last)
>>
>> /home/buzzard/ in ()
>>
>> /usr/local/sage-3.1.4/local/lib/python2.5/site-packages/sage/interfaces/magma.pyc
>> in __call__(self, x, gens)
>>502 if isinstance(x, bool):
>>503 return Expect.__call__(self, str(x).lower())
>> --> 504 return Expect.__call__(self, x)
>>505 return self.objgens(x, gens)
>>506
>>
>> /usr/local/sage-3.1.4/local/lib/python2.5/site-packages/sage/interfaces/expect.pyc
>> in __call__(self, x, name)
>>963 return x
>>964 if isinstance(x, basestring):
>> --> 965 return cls(self, x, name=name)
>>966 try:
>>967 return self._coerce_from_special_method(x)
>>
>> /usr/local/sage-3.1.4/local/lib/python2.5/site-packages/sage/interfaces/expect.pyc
>> in __init__(self, parent, value, is_name, name)
>>   1281 except (TypeError, KeyboardInterrupt, RuntimeError,
>> ValueError), x:
>>   1282 self._session_number = -1
>> -> 1283 raise TypeError, x
>>   1284 self._session_number = parent._session_number
>>   1285
>>
>> TypeError: While attempting to compile
>> /usr/local/sage-3.1.4/data/extcode//magma/latex/latex.m (Data file
>> non-existent):
>> Can't open lock file
>> /usr/local/sage-3.1.4/data/extcode//magma/latex/latex.lck for writing
>> (Permission denied)
>>
>> While attempting to compile
>> /usr/local/sage-3.1.4/data/extcode//magma/sage/basic.m (Data file
>> non-existent):
>> Can't open lock file
>> /usr/local/sage-3.1.4/data/extcode//magma/sage/basic.lck for writing
>> (Permission denied)
>> sage:
>>
>> ***
>>
>> and I su-ed to root and tried again and got it right and then changed back
>> to
>> a non-root user and now it's OK. But what struck me, as a general user,
>> was that the sage installation instructions didn't seem to explain anything
>> to me about what the "correct" way to install sage system-wide on a unix
>> machine was. Did I do the wrong thing?>
>> Kevin
>>
>> PS this is sort of a 'bug report' but I'll send some general comments
>> about your Bordeaux write-up to you later.
>
> I think this is a reasonable bug report.  The fix is for Sage to
> include the cached precompiled versions of the Magma files.
> It used to be with Magma that one had to start it up as root
> once because they didn't include precompiled files.  I think
> this has changed, i.e., I think they now ship the precompiled
> cached files in addition to the source files.
>
> Note that it's best that sage bug reports should go to the mailing list
> sage-support@googlegroups.com, and that I've cc'd this
> message there.   This way vastly more people benefit from discussion
> about the bugs, can find help (via a google search) when they run into
> similar problems, etc.
>
> 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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: permissions in sage

2008-11-02 Thread mabshoff



On Nov 2, 9:24 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Sun, Nov 2, 2008 at 10:23 AM, William Stein <[EMAIL PROTECTED]> wrote:
> > On Sun, Nov 2, 2008 at 7:38 AM, Kevin Buzzard <[EMAIL PROTECTED]> wrote:
> >> I'm still unclear about the philosophy of permissions.
>
> >> I downloaded sage 3.1.4 source and compiled from source. As root. Into
> >> /usr/local. Because I wasn't sure how to make the installation global.
>
> >> And today I tried (as a non-root user)
>
> >> sage: magma('sqrt(2)')
>
> >> [yes, I know it should be Sqrt but I'm guessing that isn't the problem]
>
> I've made this trac ticket #4424:
>
> http://trac.sagemath.org/sage_trac/ticket/4424

Are you talking about the "sig" files? They seem to be ASCII, so the
issue is easy enough to fix, but I consider it ridiculous that a 15+
year old software package needs write permissions in the same
directory as a source file to read it.



Cheers,

Michael

> > William
>
> --
> 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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: !

2008-11-02 Thread William Stein

On Sun, Nov 2, 2008 at 7:48 AM, Kevin Buzzard <[EMAIL PROTECTED]> wrote:
> In fact I'm having my first bit of real confusion with these square roots.
> Probably because I know nothing of mathematica/maple and only of pari/magma
>
> sage: 1 == 1
> True
> sage: sqrt(4) == sqrt(4)
> 2 == 2

That's very annoying.  I think sqrt(4) should return
an integer, but it isn't.  I.e., I consider this a bug:

sage: n = 4
sage: type(sqrt(n))

sage: type(n.sqrt())


http://trac.sagemath.org/sage_trac/ticket/4425

> sage: sqrt(5) == sqrt(5)
> sqrt(5) == sqrt(5)

You've created a symbolic equation.   If you use any comparison
operator with either side a symbolic expression then you get
a formal symbolic equation or inequality.  Here's another example
of that sort of thing:

sage: var('x,a,b,c')
(x, a, b, c)
sage: a*x^2 + b*x + c == 0
a*x^2 + b*x + c == 0
sage: solve(a*x^2 + b*x + c == 0, x)
[x == (-sqrt(b^2 - 4*a*c) - b)/(2*a), x == (sqrt(b^2 - 4*a*c) - b)/(2*a)]

Above you might want to do

sage: bool(sqrt(5) == sqrt(5))
True

to get a true or false value.  Note that for some complicated
expressions Sage (actually Maxima) can't determine whether
or not the equation is true, in which case it (annoyingly?)
always returns False.   E.g.,

sage: a = arcsinh(1) == log(sqrt(2) + 1)
sage: bool(a)
False
sage: a.lhs().n(100)
0.88137358701954302523260932498
sage: a.rhs().n(100)
0.88137358701954302523260932498

This can be confusing, but there is little we can do until we
switch to not using Maxima for this symbolic stuff, since
this is a "feature" of maxima:

(%i2) is (arcsinh(1) = log(sqrt(2) + 1) )
;
(%o2)false


I would prefer to get an error message in such cases...

> sage: sqrt(4) == 2
> 2 == 2
>
> Should that make some sort of sense to me?

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



[sage-support] Re: permissions in sage

2008-11-02 Thread William Stein

On Sun, Nov 2, 2008 at 9:32 AM, mabshoff
<[EMAIL PROTECTED]> wrote:
>
>
>
> On Nov 2, 9:24 am, "William Stein" <[EMAIL PROTECTED]> wrote:
>> On Sun, Nov 2, 2008 at 10:23 AM, William Stein <[EMAIL PROTECTED]> wrote:
>> > On Sun, Nov 2, 2008 at 7:38 AM, Kevin Buzzard <[EMAIL PROTECTED]> wrote:
>> >> I'm still unclear about the philosophy of permissions.
>>
>> >> I downloaded sage 3.1.4 source and compiled from source. As root. Into
>> >> /usr/local. Because I wasn't sure how to make the installation global.
>>
>> >> And today I tried (as a non-root user)
>>
>> >> sage: magma('sqrt(2)')
>>
>> >> [yes, I know it should be Sqrt but I'm guessing that isn't the problem]
>>
>> I've made this trac ticket #4424:
>>
>> http://trac.sagemath.org/sage_trac/ticket/4424
>
> Are you talking about the "sig" files? They seem to be ASCII, so the
> issue is easy enough to fix,

Yes, and that's the fix.

> but I consider it ridiculous that a 15+
> year old software package needs write permissions in the same
> directory as a source file to read it.

True.  Fix it and send them a patch...  Oh wait, they currently have a
lame development model that makes that impossible.

> 
>
> Cheers,
>
> Michael
>
>> > William
>>
>> --
>> William Stein
>> Associate Professor of Mathematics
>> University of Washingtonhttp://wstein.org
> >
>



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



[sage-support] Re: permissions in sage

2008-11-02 Thread mabshoff



On Nov 2, 9:45 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Sun, Nov 2, 2008 at 9:32 AM, mabshoff



> > Are you talking about the "sig" files? They seem to be ASCII, so the
> > issue is easy enough to fix,
>
> Yes, and that's the fix.

Ok, I attached each .m file into Magma and then checked all .sig files
into the extcode repo. Patch is up at #4424 for someone's reviewing
pleasure :)

> > but I consider it ridiculous that a 15+
> > year old software package needs write permissions in the same
> > directory as a source file to read it.
>
> True.  Fix it and send them a patch...  Oh wait, they currently have a
> lame development model that makes that impossible.

:)

Cheers,

Michael
--~--~-~--~~~---~--~~
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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: permissions in sage

2008-11-02 Thread William Stein

On Sun, Nov 2, 2008 at 10:02 AM, mabshoff
<[EMAIL PROTECTED]> wrote:
>
>
>
> On Nov 2, 9:45 am, "William Stein" <[EMAIL PROTECTED]> wrote:
>> On Sun, Nov 2, 2008 at 9:32 AM, mabshoff
>
> 
>
>> > Are you talking about the "sig" files? They seem to be ASCII, so the
>> > issue is easy enough to fix,
>>
>> Yes, and that's the fix.
>
> Ok, I attached each .m file into Magma and then checked all .sig files
> into the extcode repo. Patch is up at #4424 for someone's reviewing
> pleasure :)

Unfortunately, this doesn't work.  I have changed it to wontfix, and
posted the following message on the ticket:

Unfortunately, this doesn't work.  Probably the .sig files depend on
the version of Magma.  I tried applying your patch and got then using
it as a different user and got:

{{{
Runtime error in 'AttachSpec': Could not remove the invalid signature
file /Users/wstein/sage/data/extcode//magma/latex/latex.sig
}}}

Since there are dozens of Magma versions out there, and we can't know
which one people are using, there is literally *no possible way* to
solve this problem without the user running a command such as
{{{
sage: magma('2')
}}}
as a user with write permissions to the extcode/magma directory.

Since the error message clearly states that this is a permissions
problem, there is nothing further to do really (i.e., nothing on the
sage side).  This is just the way Magma works.



>
>> > but I consider it ridiculous that a 15+
>> > year old software package needs write permissions in the same
>> > directory as a source file to read it.
>>
>> True.  Fix it and send them a patch...  Oh wait, they currently have a
>> lame development model that makes that impossible.
>
> :)
>
> Cheers,
>
> Michael
> >
>



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



[sage-support] Re: permissions in sage

2008-11-02 Thread mabshoff



On Nov 2, 11:35 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Sun, Nov 2, 2008 at 10:02 AM, mabshoff
>
>
>
> <[EMAIL PROTECTED]> wrote:
>
> > On Nov 2, 9:45 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> >> On Sun, Nov 2, 2008 at 9:32 AM, mabshoff
>
> > 
>
> >> > Are you talking about the "sig" files? They seem to be ASCII, so the
> >> > issue is easy enough to fix,
>
> >> Yes, and that's the fix.
>
> > Ok, I attached each .m file into Magma and then checked all .sig files
> > into the extcode repo. Patch is up at #4424 for someone's reviewing
> > pleasure :)
>
> Unfortunately, this doesn't work.  I have changed it to wontfix, and
> posted the following message on the ticket:
>
> Unfortunately, this doesn't work.  Probably the .sig files depend on
> the version of Magma.

Sigh, I was afraid that that might happen.

>  I tried applying your patch and got then using
> it as a different user and got:
>
> {{{
> Runtime error in 'AttachSpec': Could not remove the invalid signature
> file /Users/wstein/sage/data/extcode//magma/latex/latex.sig
>
> }}}
>
> Since there are dozens of Magma versions out there, and we can't know
> which one people are using, there is literally *no possible way* to
> solve this problem without the user running a command such as
> {{{
> sage: magma('2')}}}
>
> as a user with write permissions to the extcode/magma directory.
>
> Since the error message clearly states that this is a permissions
> problem, there is nothing further to do really (i.e., nothing on the
> sage side).  This is just the way Magma works.
>

Ok, how about a script for the extcode.spkg that attaches each file to
a Magma session in case Magma is installed on the system?

>
> >> > but I consider it ridiculous that a 15+
> >> > year old software package needs write permissions in the same
> >> > directory as a source file to read it.
>
> >> True.  Fix it and send them a patch...  Oh wait, they currently have a
> >> lame development model that makes that impossible.
>
> > :)
>
> > Cheers,
>
> > Michael
>
> --
> 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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: permissions in sage

2008-11-02 Thread William Stein

On Sun, Nov 2, 2008 at 11:39 AM, mabshoff
<[EMAIL PROTECTED]> wrote:
>
>
>
> On Nov 2, 11:35 am, "William Stein" <[EMAIL PROTECTED]> wrote:
>> On Sun, Nov 2, 2008 at 10:02 AM, mabshoff
>>
>>
>>
>> <[EMAIL PROTECTED]> wrote:
>>
>> > On Nov 2, 9:45 am, "William Stein" <[EMAIL PROTECTED]> wrote:
>> >> On Sun, Nov 2, 2008 at 9:32 AM, mabshoff
>>
>> > 
>>
>> >> > Are you talking about the "sig" files? They seem to be ASCII, so the
>> >> > issue is easy enough to fix,
>>
>> >> Yes, and that's the fix.
>>
>> > Ok, I attached each .m file into Magma and then checked all .sig files
>> > into the extcode repo. Patch is up at #4424 for someone's reviewing
>> > pleasure :)
>>
>> Unfortunately, this doesn't work.  I have changed it to wontfix, and
>> posted the following message on the ticket:
>>
>> Unfortunately, this doesn't work.  Probably the .sig files depend on
>> the version of Magma.
>
> Sigh, I was afraid that that might happen.
>
>>  I tried applying your patch and got then using
>> it as a different user and got:
>>
>> {{{
>> Runtime error in 'AttachSpec': Could not remove the invalid signature
>> file /Users/wstein/sage/data/extcode//magma/latex/latex.sig
>>
>> }}}
>>
>> Since there are dozens of Magma versions out there, and we can't know
>> which one people are using, there is literally *no possible way* to
>> solve this problem without the user running a command such as
>> {{{
>> sage: magma('2')}}}
>>
>> as a user with write permissions to the extcode/magma directory.
>>
>> Since the error message clearly states that this is a permissions
>> problem, there is nothing further to do really (i.e., nothing on the
>> sage side).  This is just the way Magma works.
>>
>
> Ok, how about a script for the extcode.spkg that attaches each file to
> a Magma session in case Magma is installed on the system?

If we do that, somebody else will complain just as much or more
about Sage starting up and running Magma as root, or something.
It could be done though.  And it wouldn't require attaching each file -- all
you have to do is put this line in the spkg-install:

  sage -c "magma('1')"

That will run magma, which automatically attaches *all* of the
magma code and generates the sig files, or it will go boom
and give an error if there is no magma installed.

I'm not sure if we should do this though, since I recall getting numerous
complaints over the years from people about Sage starting up and
running as root "do stuff" during the install process, but I've never
once before seen the complaint about magma and permissions that
resulted in #4424.  I'm guessing that people typically know precisely
what to do in the situation of #4424 so that's what it isn't a problem
(in fact, the reporter of #4424 knew precisely what to do).

It's your call whether to add

 sage -c "magma('1')"

to the spkg-install for extcode.

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



[sage-support] Re: permissions in sage

2008-11-02 Thread mabshoff



On Nov 2, 11:46 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Sun, Nov 2, 2008 at 11:39 AM, mabshoff



> > Ok, how about a script for the extcode.spkg that attaches each file to
> > a Magma session in case Magma is installed on the system?
>
> If we do that, somebody else will complain just as much or more
> about Sage starting up and running Magma as root, or something.

We can't make everybody happy I guess :)

> It could be done though.  And it wouldn't require attaching each file -- all
> you have to do is put this line in the spkg-install:
>
>   sage -c "magma('1')"
>
> That will run magma, which automatically attaches *all* of the
> magma code and generates the sig files, or it will go boom
> and give an error if there is no magma installed.

Nope, it doesn't:

[EMAIL PROTECTED]:/scratch/mabshoff/release-cycle/sage-3.2.alpha3$ ./sage -
c "magma('1')"
[EMAIL PROTECTED]:/scratch/mabshoff/release-cycle/sage-3.2.alpha3$ find
data/extcode/ -name "*.sig"
data/extcode/magma/sage/basic.sig
data/extcode/magma/latex/latex.sig
[EMAIL PROTECTED]:/scratch/mabshoff/release-cycle/sage-3.2.alpha3

Only two out of the 12 Magma files in the data/extcode/magma directory
were loaded. Even when running all optional doctest only four or five
Magma files out of 12 are loaded.

> I'm not sure if we should do this though, since I recall getting numerous
> complaints over the years from people about Sage starting up and
> running as root "do stuff" during the install process, but I've never
> once before seen the complaint about magma and permissions that
> resulted in #4424.  I'm guessing that people typically know precisely
> what to do in the situation of #4424 so that's what it isn't a problem
> (in fact, the reporter of #4424 knew precisely what to do).
>
> It's your call whether to add
>
>      sage -c "magma('1')"
>
> to the spkg-install for extcode.

I don't care either way. Easiest would probably be to add an entry in
the FAQ for now and if people hit this problem regularly maybe we
should attempt to solve this problem again.

>  -- William

Cheers,

Michael
--~--~-~--~~~---~--~~
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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: !

2008-11-02 Thread William Stein

On Sun, Nov 2, 2008 at 11:58 AM, Kevin Buzzard <[EMAIL PROTECTED]> wrote:
>> That would be inconsistent with the choice made by every other
>> math software system ever written and with common mathematical
>> usage as well.  It would thus cause excessive confusion, and likely
>> not be very useful.
>
> I can believe this. And yet if there's an "IsPositive" command in sage, what
> does IsPositive(Sqrt(5)) give?

There is no IsPositive (or is_positive) command in Sage.  If there
were it would definitely give True because

sage: float(sqrt(5))
2.2360679774997898

>
> I think that my main problem is that I am not used to maths packages that
> think sqrt(5) is anything other than a positive real.

Sage does think it is a positive real.  You're used to math packages like Pari
and Magma that both think sqrt(5) is a "positive rational", by which I somewhat
sarcastically mean a finite-precision floating point number.  Also, I
bet you're also used
to Magma, which thinks of sqrt(5) alternatively as a number field element which
doesn't have a choice of sign.  In Sage, sqrt(5) is the exact positive
sqrt of 5.

sage: a = sqrt(5)
sage: a
sqrt(5)
sage: a^2
5
sage: expand((a+1)^2)
2*sqrt(5) + 6
sage: float(a)
2.2360679774997898
sage: numerical_approx(a, digits=40)
2.236067977499789696409173668731276235441
sage: QQ[a]
Number Field in sqrt5 with defining polynomial x^2 - 5

Actually, at the point when I do QQ[a] and get a number field, a looses
the choice of sign.  That's changing in the next version of Sage though,
due to work of Robert Bradshaw.

> I'm just getting my
> head around the consequences of the decision that it be an abstract object.
> I can totally envisage someone writing some loop for m=1 to 10, n=crazy
> function of m, t=sqrt(n), blah blah computations with t, and the loop
> bombing out because for some random big value of m, n turned out to be an
> exact square.

True.  One big problem right now is the exact sqrt(5) in Sage is computed with
behind the scenes using a pexpect interface to a slow lisp-based version
of Maxima.  This will change soon (we're moving to a C++ based backend
for symbolic manipulation).  There's a first version of the new backed
in sage-3.2.

> But I'll get used to it over time!
>
> Kevin

If things are truly sufficiently annoying, they can be changed.  (1) you can put
a customization file $HOME/.sage/init.sage and it gets run when sage starts
up, and (2) Sage is open source -- any compelling argument for changes is
seriously considered (especially when the person making the argument is
willing to do all the work).

You can also do n.sqrt(prec=bits_of_precision) and n.isqrt() for the
integer floor of
the sqrt, quickly computed directly by gmp.

sage: n = 9239082304
sage: n.sqrt(prec=30)
96120.145
sage: n.isqrt()
96120

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



[sage-support] Re: permissions in sage

2008-11-02 Thread William Stein

On Sun, Nov 2, 2008 at 11:52 AM, mabshoff
<[EMAIL PROTECTED]> wrote:
>
>
>
> On Nov 2, 11:46 am, "William Stein" <[EMAIL PROTECTED]> wrote:
>> On Sun, Nov 2, 2008 at 11:39 AM, mabshoff
>
> 
>
>> > Ok, how about a script for the extcode.spkg that attaches each file to
>> > a Magma session in case Magma is installed on the system?
>>
>> If we do that, somebody else will complain just as much or more
>> about Sage starting up and running Magma as root, or something.
>
> We can't make everybody happy I guess :)
>
>> It could be done though.  And it wouldn't require attaching each file -- all
>> you have to do is put this line in the spkg-install:
>>
>>   sage -c "magma('1')"
>>
>> That will run magma, which automatically attaches *all* of the
>> magma code and generates the sig files, or it will go boom
>> and give an error if there is no magma installed.
>
> Nope, it doesn't:

Argh.  -1 to me :-(

> [EMAIL PROTECTED]:/scratch/mabshoff/release-cycle/sage-3.2.alpha3$ ./sage -
> c "magma('1')"
> [EMAIL PROTECTED]:/scratch/mabshoff/release-cycle/sage-3.2.alpha3$ find
> data/extcode/ -name "*.sig"
> data/extcode/magma/sage/basic.sig
> data/extcode/magma/latex/latex.sig
> [EMAIL PROTECTED]:/scratch/mabshoff/release-cycle/sage-3.2.alpha3
>
> Only two out of the 12 Magma files in the data/extcode/magma directory
> were loaded. Even when running all optional doctest only four or five
> Magma files out of 12 are loaded.

Intriguing. So there must be a lot of cruft in data/extcode/magma.
I'll look into it.

>> I'm not sure if we should do this though, since I recall getting numerous
>> complaints over the years from people about Sage starting up and
>> running as root "do stuff" during the install process, but I've never
>> once before seen the complaint about magma and permissions that
>> resulted in #4424.  I'm guessing that people typically know precisely
>> what to do in the situation of #4424 so that's what it isn't a problem
>> (in fact, the reporter of #4424 knew precisely what to do).
>>
>> It's your call whether to add
>>
>>  sage -c "magma('1')"
>>
>> to the spkg-install for extcode.
>
> I don't care either way. Easiest would probably be to add an entry in
> the FAQ for now and if people hit this problem regularly maybe we
> should attempt to solve this problem again.

That's an excellent suggestion.  If it comes up more, we'll make the
change you suggested.

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



[sage-support] Re: permissions in sage

2008-11-02 Thread mabshoff



On Nov 2, 12:03 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Sun, Nov 2, 2008 at 11:52 AM, mabshoff



> > Only two out of the 12 Magma files in the data/extcode/magma directory
> > were loaded. Even when running all optional doctest only four or five
> > Magma files out of 12 are loaded.
>
> Intriguing. So there must be a lot of cruft in data/extcode/magma.
> I'll look into it.

I guess we are then in for a crapectomy:

data/extcode/magma/ell_padic/padic_height.m
data/extcode/magma/ell_padic/gl2.m
data/extcode/magma/ell_padic/examples.m
data/extcode/magma/ell_padic/kedlaya.m
data/extcode/magma/ell_padic/shark.m
data/extcode/magma/ell_padic/myl.m
data/extcode/magma/padic_height/padic_height.m
data/extcode/magma/padic_height/kedlaya.m
data/extcode/magma/stoll/3descent.m
data/extcode/magma/sage/basic.m
data/extcode/magma/user/foo.m
data/extcode/magma/latex/latex.m


> > I don't care either way. Easiest would probably be to add an entry in
> > the FAQ for now and if people hit this problem regularly maybe we
> > should attempt to solve this problem again.
>
> That's an excellent suggestion.  If it comes up more, we'll make the
> change you suggested.

+1

> William

Since we are talking about Magma and Sage: I am still waiting on the
mistakenly not attached patch for #4395 - it fixes two file when
optional doctests are run :)

Cheers,

Michael
--~--~-~--~~~---~--~~
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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: permissions in sage

2008-11-02 Thread William Stein

On Sun, Nov 2, 2008 at 12:10 PM, mabshoff
<[EMAIL PROTECTED]> wrote:
>
>
>
> On Nov 2, 12:03 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
>> On Sun, Nov 2, 2008 at 11:52 AM, mabshoff
>
> 
>
>> > Only two out of the 12 Magma files in the data/extcode/magma directory
>> > were loaded. Even when running all optional doctest only four or five
>> > Magma files out of 12 are loaded.
>>
>> Intriguing. So there must be a lot of cruft in data/extcode/magma.
>> I'll look into it.
>
> I guess we are then in for a crapectomy:
>
> data/extcode/magma/ell_padic/padic_height.m
> data/extcode/magma/ell_padic/gl2.m
> data/extcode/magma/ell_padic/examples.m
> data/extcode/magma/ell_padic/kedlaya.m
> data/extcode/magma/ell_padic/shark.m
> data/extcode/magma/ell_padic/myl.m
> data/extcode/magma/padic_height/padic_height.m
> data/extcode/magma/padic_height/kedlaya.m

I think all the ell_padic stuff can go, since it was mainly there
to implement an old crappy algorithm for computing p-adic heights,
which is now done much better natively in Sage.

> data/extcode/magma/stoll/3descent.m

That's an important file (3descent.m).  It should get doctested.

> data/extcode/magma/sage/basic.m
> data/extcode/magma/user/foo.m
> data/extcode/magma/latex/latex.m

basic.m is important for conversions.

foo.m ??

latex.m is important and should get optional doctested. It's for
latexing magma objects.  It's pretty nice code that Jennifer
Balakrishnan wrote.

>> > I don't care either way. Easiest would probably be to add an entry in
>> > the FAQ for now and if people hit this problem regularly maybe we
>> > should attempt to solve this problem again.
>>
>> That's an excellent suggestion.  If it comes up more, we'll make the
>> change you suggested.
>
> +1
>
>> William
>
> Since we are talking about Magma and Sage: I am still waiting on the
> mistakenly not attached patch for #4395 - it fixes two file when
> optional doctests are run :)
>

Fixed.

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



[sage-support] sage 3.1.4 ...can't get notebook to run...

2008-11-02 Thread madison . michael

I have installed VMplayer and sage-vmware-3.1.4 on a windows XP
notebook.  I start it with sage_vm.  I then get "sage login:" .  If I
type notebook I get the start up screen again telling me to type
notebook, sage ect..   I can start sage, and it runs however, I can
not plot.  From within Sage if t I type notebook() it runs a series of
command that end with

"http://localhost:8000/?startup_token=a80b60aa4d.: no such file or
directory

from windows I can not connect to http://localhost:8000/

Mike

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



[sage-support] Re: sage 3.1.4 ...can't get notebook to run...

2008-11-02 Thread William Stein

On Sun, Nov 2, 2008 at 1:40 PM,  <[EMAIL PROTECTED]> wrote:
>
> I have installed VMplayer and sage-vmware-3.1.4 on a windows XP
> notebook.  I start it with sage_vm.  I then get "sage login:" .  If I
> type notebook I get the start up screen again telling me to type
> notebook, sage ect..   I can start sage, and it runs however, I can
> not plot.

Just to clarify, you can use the sage notebook fine from windows,
e.g., to do arithmetic,
and the one problem is "I can not plot"?Could you be dramatically
more precise in
describing what you mean by "I can not plot"?  E.g., post a screen
shot.  Thanks.

> From within Sage if t I type notebook() it runs a series of
> command that end with
>
> "http://localhost:8000/?startup_token=a80b60aa4d.: no such file or
> directory
>
> from windows I can not connect to http://localhost:8000/
>

That should definitely *not* work from windows.  Only typing


   sage: notebook

at the login prompt makes it so that the notebook starts a server
that can be used from windows.From within sage you could do

   sage: 
notebook(address="whatever.the.address.was.above.when.you.typed.notebook.at.the.sage.prompt")

Cheers,

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



[sage-support] Memory overflow workaround?

2008-11-02 Thread Daniel Allcock

Hi all, just got started with SAGE and I hope someone has a suggestion
for me.  I have a .sage file defining a big list of approx 170,000 4x4
matrices with rational number entries, which I will want SAGE to do
various things to.  It takes SAGE 4-5 minutes to read in the file
(which was produced by a C++ program), and surely this can be
improved.

I assumed that loading it into memory and then writing it to a .sobj
file would give me something more manageable.  But I get memory
allocation errors:

python(2102) malloc: *** vm_allocate(size=8421376) failed (error
code=3)
python(2102) malloc: *** error: can't allocate region
python(2102) malloc: *** set a breakpoint in szone_error to debug

Presumably the system has just run out of memory.  This surprises me
since the .sage file is only 12MB, and the .py file it creates is
37MB.  The matrix entries are all small, numerators <10,000 and
denominators < 200 or so. I'm working on a MacBook Pro with 2GB RAM,
and the machine didn't have any other substantial load.

I will need only one matrix at a time, so there should be no need to
load in all of them at once.  But poking around in SAGE and python
docs hasn't shown me any simple way to, say, read in and execute a
single line from some file.

Thanks for your help,
Daniel

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



[sage-support] Re: sage 3.1.4 ...can't get notebook to run...

2008-11-02 Thread madison . michael

William, The screen looks like:

Welcome to Sage: http://www.sagemath.org

Type one of the following.

   notebook -- start the SAGE notebook server

   off-- turn this machine off



On Nov 2, 2:04 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Sun, Nov 2, 2008 at 1:40 PM,  <[EMAIL PROTECTED]> wrote:
>
> > I have installed VMplayer and sage-vmware-3.1.4 on a windows XP
> > notebook.  I start it with sage_vm.  I then get "sage login:" .  If I
> > type notebook I get the start up screen again telling me to type
> > notebook, sage ect..   I can start sage, and it runs however, I can
> > not plot.
>
> Just to clarify, you can use the sage notebook fine from windows,
> e.g., to do arithmetic,
> and the one problem is "I can not plot"?    Could you be dramatically
> more precise in
> describing what you mean by "I can not plot"?  E.g., post a screen
> shot.  Thanks.
>
> > From within Sage if t I type notebook() it runs a series of
> > command that end with
>
> > "http://localhost:8000/?startup_token=a80b60aa4d.:no such file or
> > directory
>
> > from windows I can not connect tohttp://localhost:8000/
>
> That should definitely *not* work from windows.  Only typing
>
>    sage: notebook
>
> at the login prompt makes it so that the notebook starts a server
> that can be used from windows.    From within sage you could do
>
>    sage: 
> notebook(address="whatever.the.address.was.above.when.you.typed.notebook.at­.the.sage.prompt")
>
> Cheers,
>
> 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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: sage 3.1.4 ...can't get notebook to run...

2008-11-02 Thread madison . michael

William,  Sorry having problems first I can't seem to cut and past
from VMware to windows

The screen looks like.

Welcome to Sage: http://www.sagemath.org

Type one of the following.

   notebook -- start the Sage notebook server
   off  -- turn this machine off
   manage --- ect
  sage  --  run the sage command line

sage login:

If I type "notebook" it just reprints the above message.  It does not
seem to start a server.  Do I need to set an option in VMplayer?

My second point was that I can run the tutorial from the Sage command
line.  However, if I try "show" or "plot" from the command line
version of sage I get no graphics.

I also tried to run notebook from the command line sage, and It did
not work.  As you pointed it without the server running in vmplayer it
should not have worked.

So I think I have two questions.  1. Why does the notebook command not
work from the above screen?  Do I need to set up network connections
options in VMplayer?

2.  Should I be able to run graphics from the command line version of
sage?

Thanks Mike


On Nov 2, 2:04 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Sun, Nov 2, 2008 at 1:40 PM,  <[EMAIL PROTECTED]> wrote:
>
> > I have installed VMplayer and sage-vmware-3.1.4 on a windows XP
> > notebook.  I start it with sage_vm.  I then get "sage login:" .  If I
> > type notebook I get the start up screen again telling me to type
> > notebook, sage ect..   I can start sage, and it runs however, I can
> > not plot.
>
> Just to clarify, you can use the sage notebook fine from windows,
> e.g., to do arithmetic,
> and the one problem is "I can not plot"?    Could you be dramatically
> more precise in
> describing what you mean by "I can not plot"?  E.g., post a screen
> shot.  Thanks.
>
> > From within Sage if t I type notebook() it runs a series of
> > command that end with
>
> > "http://localhost:8000/?startup_token=a80b60aa4d.:no such file or
> > directory
>
> > from windows I can not connect tohttp://localhost:8000/
>
> That should definitely *not* work from windows.  Only typing
>
>    sage: notebook
>
> at the login prompt makes it so that the notebook starts a server
> that can be used from windows.    From within sage you could do
>
>    sage: 
> notebook(address="whatever.the.address.was.above.when.you.typed.notebook.at­.the.sage.prompt")
>
> Cheers,
>
> 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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: sage 3.1.4 ...can't get notebook to run...

2008-11-02 Thread William Stein

On Sun, Nov 2, 2008 at 2:37 PM,  <[EMAIL PROTECTED]> wrote:
>
> William,  Sorry having problems first I can't seem to cut and past
> from VMware to windows
>
> The screen looks like.
>
> Welcome to Sage: http://www.sagemath.org
>
> Type one of the following.
>
>   notebook -- start the Sage notebook server
>   off  -- turn this machine off
>   manage --- ect
>  sage  --  run the sage command line
>
> sage login:
>
> If I type "notebook" it just reprints the above message.  It does not
> seem to start a server.  Do I need to set an option in VMplayer?

This sounds very much like unfortnately the sage-vmware image that we posted is
completely broken.  I check if this is the case tomorrow when I go to
my office (actually,
I will also check at home, which will take an hour or two).  I recommend
that you use

   http://sagenb.org

until then or do the following:

login: sage

at the sage prompt type

sage: !ifconfig

In the output there should be a line that looks like this:

eth0  Link encap:Ethernet  HWaddr 00:0c:29:ed:81:58
  inet addr:192.168.243.129  Bcast:192.168.243.255  Mask:255.255.255.0

If not, then the problem is with your vmware player setup and windows.
If there is such a line, do this:

sage: notebook(address="192.168.243.129")

where the number in quotes is after "inet addr".

Then try using Sage via a browser from windows.

 -- William

> My second point was that I can run the tutorial from the Sage command
> line.  However, if I try "show" or "plot" from the command line
> version of sage I get no graphics.
>
> I also tried to run notebook from the command line sage, and It did
> not work.  As you pointed it without the server running in vmplayer it
> should not have worked.
>
> So I think I have two questions.  1. Why does the notebook command not
> work from the above screen?  Do I need to set up network connections
> options in VMplayer?
>
> 2.  Should I be able to run graphics from the command line version of
> sage?
>
> Thanks Mike
>
>
> On Nov 2, 2:04 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
>> On Sun, Nov 2, 2008 at 1:40 PM,  <[EMAIL PROTECTED]> wrote:
>>
>> > I have installed VMplayer and sage-vmware-3.1.4 on a windows XP
>> > notebook.  I start it with sage_vm.  I then get "sage login:" .  If I
>> > type notebook I get the start up screen again telling me to type
>> > notebook, sage ect..   I can start sage, and it runs however, I can
>> > not plot.
>>
>> Just to clarify, you can use the sage notebook fine from windows,
>> e.g., to do arithmetic,
>> and the one problem is "I can not plot"?Could you be dramatically
>> more precise in
>> describing what you mean by "I can not plot"?  E.g., post a screen
>> shot.  Thanks.
>>
>> > From within Sage if t I type notebook() it runs a series of
>> > command that end with
>>
>> > "http://localhost:8000/?startup_token=a80b60aa4d.:no such file or
>> > directory
>>
>> > from windows I can not connect tohttp://localhost:8000/
>>
>> That should definitely *not* work from windows.  Only typing
>>
>>sage: notebook
>>
>> at the login prompt makes it so that the notebook starts a server
>> that can be used from windows.From within sage you could do
>>
>>sage: 
>> notebook(address="whatever.the.address.was.above.when.you.typed.notebook.at­.the.sage.prompt")
>>
>> Cheers,
>>
>> 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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Memory overflow workaround?

2008-11-02 Thread mabshoff

On Nov 2, 2:12 pm, Daniel Allcock <[EMAIL PROTECTED]> wrote:

Hi Daniel,

> Hi all, just got started with SAGE and I hope someone has a suggestion
> for me.  I have a .sage file defining a big list of approx 170,000 4x4
> matrices with rational number entries, which I will want SAGE to do
> various things to.  It takes SAGE 4-5 minutes to read in the file
> (which was produced by a C++ program), and surely this can be
> improved.

Probably.

> I assumed that loading it into memory and then writing it to a .sobj
> file would give me something more manageable.  But I get memory
> allocation errors:
>
> python(2102) malloc: *** vm_allocate(size=8421376) failed (error
> code=3)
> python(2102) malloc: *** error: can't allocate region
> python(2102) malloc: *** set a breakpoint in szone_error to debug
>
> Presumably the system has just run out of memory.  This surprises me
> since the .sage file is only 12MB, and the .py file it creates is
> 37MB.  The matrix entries are all small, numerators <10,000 and
> denominators < 200 or so. I'm working on a MacBook Pro with 2GB RAM,
> and the machine didn't have any other substantial load.
>
> I will need only one matrix at a time, so there should be no need to
> load in all of them at once.  But poking around in SAGE and python
> docs hasn't shown me any simple way to, say, read in and execute a
> single line from some file.
>
> Thanks for your help,
> Daniel

Which version of Sage do you run?

Can you post the code so I can attempt to reproduce the problem?

Cheers,

Michael
--~--~-~--~~~---~--~~
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://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Memory overflow workaround?

2008-11-02 Thread William Stein

On Sun, Nov 2, 2008 at 4:35 PM, mabshoff
<[EMAIL PROTECTED]> wrote:
>
> On Nov 2, 2:12 pm, Daniel Allcock <[EMAIL PROTECTED]> wrote:
>
> Hi Daniel,
>
>> Hi all, just got started with SAGE and I hope someone has a suggestion
>> for me.  I have a .sage file defining a big list of approx 170,000 4x4
>> matrices with rational number entries, which I will want SAGE to do
>> various things to.  It takes SAGE 4-5 minutes to read in the file
>> (which was produced by a C++ program), and surely this can be
>> improved.

How are you reading it in?

>
> Probably.
>
>> I assumed that loading it into memory and then writing it to a .sobj
>> file would give me something more manageable.

Good idea.

>>  But I get memory
>> allocation errors:
>>
>> python(2102) malloc: *** vm_allocate(size=8421376) failed (error
>> code=3)
>> python(2102) malloc: *** error: can't allocate region
>> python(2102) malloc: *** set a breakpoint in szone_error to debug
>>
>> Presumably the system has just run out of memory.

That's what the above error message says.  But it could be caused
by some bug...

>  This surprises me
>> since the .sage file is only 12MB, and the .py file it creates is
>> 37MB.  The matrix entries are all small, numerators <10,000 and
>> denominators < 200 or so. I'm working on a MacBook Pro with 2GB RAM,
>> and the machine didn't have any other substantial load.

That doesn't sound so hard.

>> I will need only one matrix at a time, so there should be no need to
>> load in all of them at once.  But poking around in SAGE and python
>> docs hasn't shown me any simple way to, say, read in and execute a
>> single line from some file.
>>
>> Thanks for your help,
>> Daniel
>
> Which version of Sage do you run?
>
> Can you post the code so I can attempt to reproduce the problem?
>
> Cheers,
>
> Michael
> >
>



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



[sage-support] Re: Memory overflow workaround?

2008-11-02 Thread William Stein

On Sun, Nov 2, 2008 at 2:12 PM, Daniel Allcock <[EMAIL PROTECTED]> wrote:
>
> Hi all, just got started with SAGE and I hope someone has a suggestion
> for me.  I have a .sage file defining a big list of approx 170,000 4x4
> matrices with rational number entries, which I will want SAGE to do
> various things to.  It takes SAGE 4-5 minutes to read in the file
...
> Thanks for your help,
> Daniel

Dan,

By the way, did you know that Sage Days 11 is at UT Austin (where you presumably
are) next Friday - Monday?  See

   http://wiki.sagemath.org/days11

If you're going to be around, you might want to add your name to the
wiki (or let
me know, and I'll add it).  And of course we can help you with your question in
person then.

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