[sage-support] bug in plot ('e' becomes undefined)

2008-10-16 Thread Stan Schymanski

Dear all,

For some strange reason plot loses its understanding of the system
variable 'e' if I try to plot an exponential function and do
a .subs(locals()) within the plot command. The meaning of 'e' is not
modified in the name space, but its value becomes unavailable to plot
only. See below for an example. Am I doing something wrong, or is it a
bug?

Cheers
Stan

--
| SAGE Version 3.1.2, Release Date: 2008-09-19   |
| Type notebook() for the GUI, and license() for information.|
--

sage: var('d')
d

sage: plot(exp(x-1),0,1)

sage: d=1
sage: plot(exp(x-d).subs(locals()),0,1)
---
ValueErrorTraceback (most recent call
last)

/Users/sschym/ipython console in module()

/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
plot/plot.py in plot(funcs, *args, **kwds)
   3561 do_show = kwds.pop('show',False)
   3562 if hasattr(funcs, 'plot'):
- 3563 G = funcs.plot(*args, **kwds)
   3564 # if we are using the generic plotting method
   3565 else:

/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
calculus/calculus.py in plot(self, *args, **kwds)
952 param = A[0]
953 try:
-- 954 f = F._fast_float_(param)
955 except NotImplementedError:
956 return self.function(param)

/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
calculus/calculus.py in _fast_float_(self, *vars)
   4738 if vars == ():
   4739 vars = self.arguments()
- 4740 fops = [op._fast_float_(*vars) for op in
self._operands]
   4741 return self._operator(*fops)
   4742

/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
calculus/calculus.py in _fast_float_(self, *vars)
   4738 if vars == ():
   4739 vars = self.arguments()
- 4740 fops = [op._fast_float_(*vars) for op in
self._operands]
   4741 return self._operator(*fops)
   4742

/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
calculus/calculus.py in _fast_float_(self, *vars)
   5275 return fast_float.fast_float_constant(float(self))
   5276 except TypeError:
- 5277 raise ValueError, free variable: %s % self._name
   5278
   5279 def _recursive_sub(self, kwds):

ValueError: free variable: x
sage: plot(exp(x),0,1)
---
ValueErrorTraceback (most recent call
last)

/Users/sschym/ipython console in module()

/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
plot/plot.py in plot(funcs, *args, **kwds)
   3561 do_show = kwds.pop('show',False)
   3562 if hasattr(funcs, 'plot'):
- 3563 G = funcs.plot(*args, **kwds)
   3564 # if we are using the generic plotting method
   3565 else:

/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
calculus/calculus.py in plot(self, *args, **kwds)
952 param = A[0]
953 try:
-- 954 f = F._fast_float_(param)
955 except NotImplementedError:
956 return self.function(param)

/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
calculus/calculus.py in _fast_float_(self, *vars)
   4738 if vars == ():
   4739 vars = self.arguments()
- 4740 fops = [op._fast_float_(*vars) for op in
self._operands]
   4741 return self._operator(*fops)
   4742

/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
calculus/calculus.py in _fast_float_(self, *vars)
   5275 return fast_float.fast_float_constant(float(self))
   5276 except TypeError:
- 5277 raise ValueError, free variable: %s % self._name
   5278
   5279 def _recursive_sub(self, kwds):

ValueError: free variable: x
--~--~-~--~~~---~--~~
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] substituting nested variable definitions

2008-10-16 Thread Stan Schymanski

Dear all,

I have learned to substitute variables into equations
using .subs(locals()) or .subs(globals()). However, if variables are
defined in a nested way, this has to be done again and again. Is there
a command to substitute all variables into each other? Here is an
example:

sage: var ('a b c')
(a, b, c)
sage: f = x^a
sage: a = b^2
sage: b = 1/c
sage: c = 3
sage: f.subs(globals())
x^b^2
sage: f.subs(globals()).subs(globals())
x^(1/c^2)
sage: f.subs(globals()).subs(globals()).subs(globals())
x^(1/9)


It should be easy to write a function repeating the .subs(globals())
command until f does not change any more, but before I do this, I
thought I'd better ask if something like this already exists.

Thanks for your help!

Regards,
Stan

--~--~-~--~~~---~--~~
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 public notebook servers

2008-10-16 Thread Harald Schilly



On Oct 16, 1:55 am, Dan Drake [EMAIL PROTECTED] wrote:
 runs `kill -9' on the guest -- which
 is about the same as pulling the plug -- ...

Uhm, since virtual box has a python scripting interface, a more humane
reset to snapshot functionality could be possible :) But how are the
accounts managed? If they are just deleted everytime and there is no
datastore across all virtual box instances, there isn't much fun. Is
it possible to mount a shared homedirectory with multiple virtual box
instances? At least, mounting one external share r/w works ...

H
--~--~-~--~~~---~--~~
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: Final Sage 3.1.3 sources are out

2008-10-16 Thread mabshoff

Note that a critical bug when using init.sage has been fixed in Sage
3.1.4 available in

http://sage.math.washington.edu/home/mabshoff/release-cycles-3.1.4/

Upgrades are not yet working and binaries are being build.

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: Sage public notebook servers

2008-10-16 Thread Robert Bradshaw

On Oct 16, 2008, at 2:21 AM, Harald Schilly wrote:

 On Oct 16, 1:55 am, Dan Drake [EMAIL PROTECTED] wrote:
 runs `kill -9' on the guest -- which
 is about the same as pulling the plug -- ...

 Uhm, since virtual box has a python scripting interface, a more humane
 reset to snapshot functionality could be possible :)

With a fallback to kill -9 just in case...

 But how are the
 accounts managed? If they are just deleted everytime and there is no
 datastore across all virtual box instances, there isn't much fun. Is
 it possible to mount a shared homedirectory with multiple virtual box
 instances? At least, mounting one external share r/w works ...

Yes, but of course this opens up vulnerabilities. Actually, if it's  
being reset, is there a need to even create an account?

- Robert


--~--~-~--~~~---~--~~
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 public notebook servers

2008-10-16 Thread Jason Grout

Robert Bradshaw wrote:
 On Oct 16, 2008, at 2:21 AM, Harald Schilly wrote:
 
 On Oct 16, 1:55 am, Dan Drake [EMAIL PROTECTED] wrote:
 runs `kill -9' on the guest -- which
 is about the same as pulling the plug -- ...
 Uhm, since virtual box has a python scripting interface, a more humane
 reset to snapshot functionality could be possible :)
 
 With a fallback to kill -9 just in case...
 

Or you can use (with virtualbox):

VBoxManage snapshot discardcurrent -state

from the commandline (I think I have the parameters right).

And then fall back to kill -9 and running the command again, of course.


 But how are the
 accounts managed? If they are just deleted everytime and there is no
 datastore across all virtual box instances, there isn't much fun. Is
 it possible to mount a shared homedirectory with multiple virtual box
 instances? At least, mounting one external share r/w works ...
 
 Yes, but of course this opens up vulnerabilities. Actually, if it's  
 being reset, is there a need to even create an account?
 


Creating accounts makes a barrier to entry, but it also makes it so that 
people don't mess with other people's worksheets (i.e., if I'm playing 
with Sage, someone else won't come in and start changing my worksheet 
around under me).  So I vote for accounts.

Jason


--~--~-~--~~~---~--~~
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 public notebook servers

2008-10-16 Thread Robert Bradshaw

On Oct 16, 2008, at 7:41 AM, Jason Grout wrote:

 Creating accounts makes a barrier to entry, but it also makes it so  
 that
 people don't mess with other people's worksheets (i.e., if I'm playing
 with Sage, someone else won't come in and start changing my worksheet
 around under me).  So I vote for accounts.

Good point. Maybe it takes an account to publish a worksheet, but if  
I just come to the site I can start trying it out right away with a  
blank worksheet and a randomly-generated one-time account (i.e. it  
would never take you to the worksheets list

- Robert



--~--~-~--~~~---~--~~
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 public notebook servers

2008-10-16 Thread Jason Grout

Robert Bradshaw wrote:
 On Oct 16, 2008, at 7:41 AM, Jason Grout wrote:
 
 Creating accounts makes a barrier to entry, but it also makes it so  
 that
 people don't mess with other people's worksheets (i.e., if I'm playing
 with Sage, someone else won't come in and start changing my worksheet
 around under me).  So I vote for accounts.
 
 Good point. Maybe it takes an account to publish a worksheet, but if  
 I just come to the site I can start trying it out right away with a  
 blank worksheet and a randomly-generated one-time account (i.e. it  
 would never take you to the worksheets list


Good point as well.  Yes, I think that would work out really nicely.

I click a link on the sage website, and am immediately presented with a 
worksheet that I can start typing stuff into.

Jason


--~--~-~--~~~---~--~~
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] german keybord in vmware image

2008-10-16 Thread Martin Rubey

Some of my students complain that the vmware image of sage seems to use english
keyboard.  Is there a way to configure this?

(I do not own a windows machine, so I cannot try it...)

Martin


--~--~-~--~~~---~--~~
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] calling a C program in sage with terminal output

2008-10-16 Thread David Joyner

Hi:

I want to call a C program in Sage which is included with Sage (wtdist).
What is the easiest way to do this? The line I'd like to execute looks like

wtdist filename::code  output.txt

(Then I'll use python to parse the file output.txt. ) I'm guessing there is a
one-liner.

Also, what is the proper way to do this? I'm guessing one should
write wrapper classes as in the interfaces directory but is swig better?

- David Joyner

--~--~-~--~~~---~--~~
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 public notebook servers

2008-10-16 Thread pong

Yes, it will be nice to bypass the login process.

Hum... should people be able to download (not upload) their worksheets
onto their local machines? I guess it won't post any security threats,
right?

On Oct 16, 10:11 am, Jason Grout [EMAIL PROTECTED] wrote:
 Robert Bradshaw wrote:
  On Oct 16, 2008, at 7:41 AM, Jason Grout wrote:

  Creating accounts makes a barrier to entry, but it also makes it so  
  that
  people don't mess with other people's worksheets (i.e., if I'm playing
  with Sage, someone else won't come in and start changing my worksheet
  around under me).  So I vote for accounts.

  Good point. Maybe it takes an account to publish a worksheet, but if  
  I just come to the site I can start trying it out right away with a  
  blank worksheet and a randomly-generated one-time account (i.e. it  
  would never take you to the worksheets list

 Good point as well.  Yes, I think that would work out really nicely.

 I click a link on the sage website, and am immediately presented with a
 worksheet that I can start typing stuff into.

 Jason
--~--~-~--~~~---~--~~
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: calling a C program in sage with terminal output

2008-10-16 Thread Jason Grout

David Philp wrote:
 
 On 17/10/2008, at 10:51 AM, David Joyner wrote:
 
 Hi:

 I want to call a C program in Sage which is included with Sage  
 (wtdist).
 What is the easiest way to do this? The line I'd like to execute  
 looks like

 wtdist filename::code  output.txt
 
 output_txt = os.popen('wtdist filename::code').readlines()
 
 I think that's all you need.  I don't see anything improper with it.

Except that, for me, that code returns an error that it can't find the 
program.

In searching for the program, I see the following files:

sage/local/lib/gap-4.4.10/pkg/guava3.4/bin/i686-pc-linux-gnu-gcc/wtdist
sage/local/lib/gap-4.4.10/pkg/guava3.4/bin/wtdist
sage/local/lib/gap-4.4.10/pkg/guava3.4/bin/leon/wtdist

You might try one of those, or if you want to find the commands on your 
own system, just go to the sage directory and type:

find . -name wtdist

Jason


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