[sage-support] Re: Why are these finite field elements not equal?

2007-04-03 Thread Martin Albrecht

On Monday 02 April 2007 22:53, Kate Minola wrote:
 Would a kind person explain to me why element 1 and element 2
 are not equal?  And what I need to do to test if element 1 is zero
 in K?

 # setup
 f = conway_polynomial(2,63)
 K.a = GF(2**63, name='a', modulus=f)
 n = f.degree()
 m = 3;
 e = (2^n - 1) / (2^m - 1)
 c = a^e
 conway = conway_polynomial(2,m)

 # element 1
 print conway(c)   # says 0
 print type(c)
 print parent(c)
 print c in K  # says True

 # element 2
 print K(0)  # says 0
 print type(K(0))
 print parent(K(0))

 print conway(c) == K(0)# says False???

This seems to be a bug in the pari.gen.gen class:

sage: e1 = conway(c)
sage: e2 = K(0)

When compare is called on them, their pari values are compared, these differ 
in their representation.

sage: e1._FiniteField_ext_pariElement__value
0

sage: e2._FiniteField_ext_pariElement__value

Mod(Mod(0, 2), Mod(1, 2)*a^63 + Mod(1, 2)*a^24 + Mod(1, 2)*a^23 + Mod(1, 
2)*a^22 + Mod(1, 2)*a^17 + Mod(1, 2)*a^16 + Mod(1, 2)*a^15 + Mod(1, 2)*a^11 + 
Mod(1, 2)*a^9 + Mod(1, 2)*a^8 + Mod(1, 2)*a^4 + Mod(1, 2)*a^3 + Mod(1, 2)*a^2 
+ Mod(1, 2)*a + Mod(1, 2))

Their comparison fails as follows:

e2._FiniteField_ext_pariElement__value._cmp(e1._FiniteField_ext_pariElement__value
  )
---
class 'gen.PariError'   Traceback (most recent call last)

/home/malb/ipython console in module()

/home/malb/gen.pyx in gen._pari_trap()

class 'gen.PariError': incorrect type (20)

I openend a ticket on Trac for this.

Martin

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


--~--~-~--~~~---~--~~
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] Safari problem with sage notebook

2007-04-03 Thread Nikos Apostolakis

Hi, even though safari is listed as supported the sage notebook
doesn't really work properly with it.  The arrow keys do not work 
-- hittin up (or down) at the top (or bottom) of a cell does not
take the cursor to the previous (next) cell.  Also sometimes it is
impossible for a cell to get the focus.  For example with the
following notebook

http://www.sagenb.com/TAexmpl 

in Safari I can not focus in any cell beyond the 3rd answer.  When
I click on one of them the cursor moves to the top of the page. 

--
Nikos


--~--~-~--~~~---~--~~
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] somewhat secure notebook server

2007-04-03 Thread Marshall Hampton

Hi,

I would like students in a class to have access to a sage notebook
server.  My current setup is: I've created the most locked-down user I
can in OS X, and from that account (lets call it 'weakuser'), I
started up a notebook with a username and password; the notebook files
are located at something like /Users/weakuser/NotebookName.  I was
thinking of giving the username and password for the notebook to my
students (these would be different from guest and its password).

My question is: is there anything else I can easily do to make this
secure?   I use the server machine as a  desktop a lot, but I back up
my work every day.  Is this setup reasonably secure?

Thanks,
Marshall


--~--~-~--~~~---~--~~
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: somewhat secure notebook server

2007-04-03 Thread Timothy Clemans

sagenb.com and sagenb.org are public servers
There should be enough security soon that they should be appropriate
for your class soon.

On 4/3/07, Marshall Hampton [EMAIL PROTECTED] wrote:

 Hi,

 I would like students in a class to have access to a sage notebook
 server.  My current setup is: I've created the most locked-down user I
 can in OS X, and from that account (lets call it 'weakuser'), I
 started up a notebook with a username and password; the notebook files
 are located at something like /Users/weakuser/NotebookName.  I was
 thinking of giving the username and password for the notebook to my
 students (these would be different from guest and its password).

 My question is: is there anything else I can easily do to make this
 secure?   I use the server machine as a  desktop a lot, but I back up
 my work every day.  Is this setup reasonably secure?

 Thanks,
 Marshall


 


--~--~-~--~~~---~--~~
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: somewhat secure notebook server

2007-04-03 Thread William Stein

On 4/3/07, Timothy Clemans [EMAIL PROTECTED] wrote:
 sagenb.com and sagenb.org are public servers
 There should be enough security soon that they should be appropriate
 for your class soon.

No -- these are not appropriate for a class, since they could easily go down for
a number of reasons, and they aren't that robust.  They are only meant for
people to do some temporary testing sharing of SAGE worksheets -- but shouldn't
be the main way a person makes SAGE available to a class.

 On 4/3/07, Marshall Hampton [EMAIL PROTECTED] wrote:
  I would like students in a class to have access to a sage notebook
  server.  My current setup is: I've created the most locked-down user I
  can in OS X, and from that account (lets call it 'weakuser'), I
  started up a notebook with a username and password; the notebook files
  are located at something like /Users/weakuser/NotebookName.  I was
  thinking of giving the username and password for the notebook to my
  students (these would be different from guest and its password).
 
  My question is: is there anything else I can easily do to make this
  secure?   I use the server machine as a  desktop a lot, but I back up
  my work every day.  Is this setup reasonably secure?

It is just as secure as giving out a guest login/password to your machine
for logging into that account, i.e., it's back to the question of how secure
OS X itself is against a local exploit, which is I guess a standard question.
In fact, you may want to have a guest account for your students, to allow
students with ssh to connect and use the command-line version of SAGE,
which some might like.

Regarding how you actually start the notebook server, I use this script (with
the notebook line having no line break):

[EMAIL PROTECTED]:~$ more notebook.py
from sage.all import *
notebook(port=8101, address=sage.math.washington.edu, jsmath=True,
color='gmail', restart_on_crash=True, username=, password=,
auto_restart=800)

---

Then to actually start the server, I type
sage notebook.py

Note that auto_restart=800 line, which will completely restart the
notebook server
every 800 seconds -- this prevents people accidentally (or on purpose) running
long-running calculations, which would slow down the machine for your use or
other people's use, and helps defend against memory leaks.

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