[sage-devel] Re: Sorting vertices of a graph

2010-07-24 Thread Rob Beezer
Hi Carl,

Thanks for the heads-up, its been so long since I read the Python 3
changes and that one hadn't stuck.  Will do.

Rob

On Jul 24, 1:20 pm, Carl Witty  wrote:
> On Sat, Jul 24, 2010 at 11:54 AM, Rob Beezer  wrote:
> > So it is a verb.  ;-)
>
> > Looks like similar comments apply to   edges().
>
> > I'm thinking that optionally passing in a comparison function would be
> > a nice thing to add - a minor convenience, but also it would drive
> > home the point that the sorting is somewhat the caller's
> > responsibility in non-trivial situations (ie for not most users).
>
> > I'll get a ticket started soon.
>
> Note that Python 3 has removed the comparison function argument for
> List.sort() and similar functions, in favor of a "key" argument giving
> a function that transforms a list element into a sortable element.
> For example, if you want to sort by string representations, currently
> you could do:
>
>   verts.sort(cmp=lambda a, b: cmp(str(a), str(b)))
>
> but in Python 3 you would have to do:
>
>   verts.sort(key=str)
>
> The idea is to discourage inefficient programming; the Python 3
> version is better, because it calls str() on each element only once,
> whereas the old version calls str() on each element O(log(N)) times.
>
> Our current Python also has a key= argument for sort().
>
> I suggest that we should follow Python 3 here for such APIs, and
> optionally pass in a key= function rather than a cmp= comparison
> function.
>
> Carl

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


[sage-devel] Re: arithmetic with True and False

2010-07-24 Thread mda_

On Jul 24, 2:29 pm, Burcin Erocal  wrote:
> [...]
> At Sage Days 24, I learned that Python allows the user to do arithmetic
> with bools:
>
> In [1]: 5+True
> Out[1]: 6
> [...]
> Any comments?

Preface: Python is my favorite language.  These are just comments, no
flames please.

However, for the uninitiated, duck-typing does not always follow the
principle of least surprise (and of course, any software system gets
revised over time, so there are no silver bullet, just choices).
Luckily, Python 3.X is working on giving more leeway to the programmer
oh so ever slightly inclined to do a teensy tiny bit of type-
checking.  For example:

http://www.python.org/dev/peps/pep-3119/

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


[sage-devel] Re: new keywords for limit()

2010-07-24 Thread Rob Beezer
Hi Burcin,

As Dana Ernst has now mentioned on the ticket, this an outgrowth of
the professional development workshop that Jason Grout, Karl-Dieter
Crisman and myself have been running this summer on Sage through the
Mathematical Association of America.  Dana is one of our top
students.  ;-)  But seriously, he is interested in contributing to
Sage and I've been helping him along with the process.

Another one of the "students" (faculty at mostly undergraduate
colleges) wondered about why these keywords were not present (I think
they may be in some other of the M's, but obviously not Maple, and I
can't recall exactly).  So we all suggested they could be added, and
Dana took the bait.

So three developers thought this would be useful in their teaching.
Which is not to say it shouldn't be discussed here in the open.  I'm
all for avoiding clutter, but also thought these keywords would be
valuable (and IMHO opinion, preferable to "above" and "below" when we
tend to draw the axis for the domain horizontally!).

Thanks for bringing the discussion here.

Rob

On Jul 24, 2:30 pm, Burcin Erocal  wrote:
> Hi,
>
> Trac #9200 [1] adds new keywords from_left and from_right to the top
> level limit() function. We already have above, below, minus, plus as
> keywords. I wonder if a new one is necessary, and if it should be
> "from_left/from_right".
>
> [1]http://trac.sagemath.org/sage_trac/ticket/9200
>
> For reference, Maple only support 4 keywords [2], left, right, real,
> complex.
>
> [2]http://www.maplesoft.com/support/help/Maple/view.aspx?path=limit
>
> IMHO, we should also try to keep the interface simple, and not clutter
> things up by supporting many different ways of doing the same thing.
>
> Any comments?
>
> Cheers,
> Burcin

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


[sage-devel] Re: arithmetic with True and False

2010-07-24 Thread rjf
if True means 1,  then can you use

1 as a truth value in a conditional expression?
In which case 0 would be false.
What would 2 or 3 mean?

Lisp distinguishes numbers from nil. Usually nil means false, (though
in Scheme, there is
another "false" value and nil means the empty list.

However, anything non-nil is true.

When you say "most languages"  I think you are mistaken unless you
count C as "most languages".



RJF

On Jul 24, 5:00 pm, David Kirkby  wrote:
> On 24 July 2010 22:29, Burcin Erocal  wrote:
>
> > Hi,
>
> > At Sage Days 24, I learned that Python allows the user to do arithmetic
> > with bools:
>
> > In [1]: 5+True
> > Out[1]: 6
>
> I personally don't see anything wrong with that - True has long since
> been defined as 1 in most languages, and False as 0.
>
> I just checked Mathematica 7
>
> In[1]:= 12==12
>
> Out[1]= True
>
> In[2]:= 1+%
>
> Out[2]= 1 + True
>
> In[3]:= 1+False
>
> Out[3]= 1 + False
>
> So it handles True and False differently from integers.
>
> Dave

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


Re: [sage-devel] arithmetic with True and False

2010-07-24 Thread David Kirkby
On 24 July 2010 22:29, Burcin Erocal  wrote:
> Hi,
>
> At Sage Days 24, I learned that Python allows the user to do arithmetic
> with bools:
>
> In [1]: 5+True
> Out[1]: 6

I personally don't see anything wrong with that - True has long since
been defined as 1 in most languages, and False as 0.

I just checked Mathematica 7

In[1]:= 12==12

Out[1]= True

In[2]:= 1+%

Out[2]= 1 + True

In[3]:= 1+False

Out[3]= 1 + False

So it handles True and False differently from integers.

Dave

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


Re: [sage-devel] arithmetic with True and False

2010-07-24 Thread Robert Bradshaw
On Sat, Jul 24, 2010 at 2:29 PM, Burcin Erocal  wrote:
> Hi,
>
> At Sage Days 24, I learned that Python allows the user to do arithmetic
> with bools:
>
> In [1]: 5+True
> Out[1]: 6
>
> In [2]: True + False
> Out[2]: 1
>
> In [3]: 5+False
> Out[3]: 5
>
> Sage seems to follow this convention as well:
>
> sage: 5 + True
> 6
> sage: 5. - True
> 4.00
>
> I can't see any use cases for this convention. I believe all these
> examples should just raise a TypeError. IMHO, code relying on this
> feature is very likely to be buggy.
>
> Apparently the symbolic ring doesn't handle things so well [1], but I'm
> not decided what the "fix" should be. :)
>
> [1] http://trac.sagemath.org/sage_trac/ticket/9560
>
> Any comments?

For whatever reason, bools subclass int,

sage: isinstance(True, int)
True

so to accept ints and reject bools, we'd have to do a lot of special
casing. This is useful, for example

sage: sum(is_prime(p) for p in range(100))
25

- Robert

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


Re: [sage-devel] arithmetic with True and False

2010-07-24 Thread Carl Witty
On Sat, Jul 24, 2010 at 2:29 PM, Burcin Erocal  wrote:
> Hi,
>
> At Sage Days 24, I learned that Python allows the user to do arithmetic
> with bools:
>
> In [1]: 5+True
> Out[1]: 6
>
> In [2]: True + False
> Out[2]: 1
>
> In [3]: 5+False
> Out[3]: 5
>
> Sage seems to follow this convention as well:
>
> sage: 5 + True
> 6
> sage: 5. - True
> 4.00
>
> I can't see any use cases for this convention. I believe all these
> examples should just raise a TypeError. IMHO, code relying on this
> feature is very likely to be buggy.
>
> Apparently the symbolic ring doesn't handle things so well [1], but I'm
> not decided what the "fix" should be. :)
>
> [1] http://trac.sagemath.org/sage_trac/ticket/9560
>
> Any comments?

I do think that Sage symbolics should (eventually) support symbolic
booleans where True maps to 1 and False maps to 0.

See http://en.wikipedia.org/wiki/Iverson_bracket for use cases and prior art.

However, I would slightly prefer an explicit rather than implicit conversion.

Implicit:

  sgn(x) = (x > 0) - (x < 0)

Explicit:

  sgn(x) = iverson(x > 0) - iverson(x < 0)

So I wouldn't mind if the implicit conversions from bools to SR became
an error instead.

At any rate, the current behavior is definitely wrong :)

Carl

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


[sage-devel] new keywords for limit()

2010-07-24 Thread Burcin Erocal
Hi,

Trac #9200 [1] adds new keywords from_left and from_right to the top
level limit() function. We already have above, below, minus, plus as
keywords. I wonder if a new one is necessary, and if it should be
"from_left/from_right".

[1] http://trac.sagemath.org/sage_trac/ticket/9200

For reference, Maple only support 4 keywords [2], left, right, real,
complex.

[2] http://www.maplesoft.com/support/help/Maple/view.aspx?path=limit

IMHO, we should also try to keep the interface simple, and not clutter
things up by supporting many different ways of doing the same thing.

Any comments?


Cheers,
Burcin

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


[sage-devel] arithmetic with True and False

2010-07-24 Thread Burcin Erocal
Hi,

At Sage Days 24, I learned that Python allows the user to do arithmetic
with bools:

In [1]: 5+True
Out[1]: 6

In [2]: True + False
Out[2]: 1

In [3]: 5+False
Out[3]: 5

Sage seems to follow this convention as well:

sage: 5 + True
6
sage: 5. - True
4.00

I can't see any use cases for this convention. I believe all these
examples should just raise a TypeError. IMHO, code relying on this
feature is very likely to be buggy.

Apparently the symbolic ring doesn't handle things so well [1], but I'm
not decided what the "fix" should be. :)

[1] http://trac.sagemath.org/sage_trac/ticket/9560

Any comments?


Cheers,
Burcin

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


Re: [sage-devel] Re: Sorting vertices of a graph

2010-07-24 Thread Carl Witty
On Sat, Jul 24, 2010 at 11:54 AM, Rob Beezer  wrote:
> So it is a verb.  ;-)
>
> Looks like similar comments apply to   edges().
>
> I'm thinking that optionally passing in a comparison function would be
> a nice thing to add - a minor convenience, but also it would drive
> home the point that the sorting is somewhat the caller's
> responsibility in non-trivial situations (ie for not most users).
>
> I'll get a ticket started soon.

Note that Python 3 has removed the comparison function argument for
List.sort() and similar functions, in favor of a "key" argument giving
a function that transforms a list element into a sortable element.
For example, if you want to sort by string representations, currently
you could do:

  verts.sort(cmp=lambda a, b: cmp(str(a), str(b)))

but in Python 3 you would have to do:

  verts.sort(key=str)

The idea is to discourage inefficient programming; the Python 3
version is better, because it calls str() on each element only once,
whereas the old version calls str() on each element O(log(N)) times.

Our current Python also has a key= argument for sort().

I suggest that we should follow Python 3 here for such APIs, and
optionally pass in a key= function rather than a cmp= comparison
function.

Carl

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


Re: [sage-devel] Re: Python, Sage, categories

2010-07-24 Thread Tim Daly

You might find this interesting...
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.110.7221&rep=rep1&type=pdf
Taivalsaari, Antero "On the Notion of Inheritance"
ACM Computing Surveys, Vol 28 No 3 Sept 1996

Robert Bradshaw wrote:

On Sat, Jul 24, 2010 at 10:46 AM, Harald Schilly
 wrote:
  

On Jul 24, 8:10 am, Robert Bradshaw 
wrote:


We should do this as part of the tests, collect timing data on each
test block (and perhaps even each line?).
  

I don't think this would work for all lines because completing all the
tests would take too long (if we want to use "timeit", each line is
repeated several times)
I rather suggest to add something to the doctest infrastructure, that
executes those lines in timeit(..) that are tagged via "# timeit"
appended to the line.
e.g.
sage: x = 1
sage: _ = x*x # timeit
Data for these timings are collected in a key-value dictionary that is
pickled into a file named after the current date+time (maybe also
revision number?) ... The key should also be something useful, e.g. a
3-tuple consisting of the relative path and name to the file, the line
number and the string literal of the exectued line.
Based on that it should be straightforward to write some code that
analyzes execution time regressions.



+1 to the idea of a timeit decorator, which would be useful for
microbenchmarking. I think timing whole blocks would be useful as well
to make sure there's no macro regressions. Though any one datapoint
isn't as useful, if everyone was consistently getting a slowdown for a
given doctest, that would be an indicator that something is going on.

- Robert

  


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


[sage-devel] Re: Sorting vertices of a graph

2010-07-24 Thread Rob Beezer
So it is a verb.  ;-)

Looks like similar comments apply to   edges().

I'm thinking that optionally passing in a comparison function would be
a nice thing to add - a minor convenience, but also it would drive
home the point that the sorting is somewhat the caller's
responsibility in non-trivial situations (ie for not most users).

I'll get a ticket started soon.

Rob

On Jul 24, 4:27 am, Robert Miller  wrote:
> I would simply add a caveat to the documentation. Most users use
> either integers for vertices, or a set of certain kinds of objects. It
> should be noted that "<" should implement a total ordering for this to
> be consistent, e.g. not just a poset. This is related to a debate
> about whether "<" should give an ordering of poset elements for
> computer science reasons (like binary search in a list) or for
> mathematicians...
>
>
>
> On Sat, Jul 24, 2010 at 9:20 AM, Rob Beezer  wrote:
> > The vertices() method for graphs says the resulting list is always
> > sorted.  But while you can use a variety of objects as the vertices of
> > a graph (very nice), they do not always compare cleanly (not so
> > nice).  So I got bit tonight on a doctest where one vertex was an
> > integer and one was a symbolic expression.  With a randomized order
> > for the tests, the results would vary.
>
> > Do we need to be more careful about the vertices() method, either in
> > action or in claims?  When the documentation says the list is sorted,
> > is "sorted" a verb or an adjective?
>
> > I presume it is expecting too much that any two objects can be
> > comparable somehow?
>
> > Rob
>
> > sage: var('x')
> > x
> > sage: G=Graph({0:[x]})
> > sage: vert = G.vertices()
> > sage: vert
> > [0, x]
> > sage: sorted(vert)
> > [0, x]
> > sage: vert.reverse()
> > sage: vert
> > [x, 0]
> > sage: sorted(vert)
> > [x, 0]
> > sage: G.vertices?
> > 
> > Note that the output of the vertices() function is always sorted.
> > 
>
> > --
> > To post to this group, send an email to sage-devel@googlegroups.com
> > To unsubscribe from this group, send an email to 
> > sage-devel+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://groups.google.com/group/sage-devel
> > URL:http://www.sagemath.org
>
> --
> Robert L. Millerhttp://www.rlmiller.org/

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


[sage-devel] Interesting project: Assimulo

2010-07-24 Thread Hazem

http://www.jmodelica.org/page/199


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


Re: [sage-devel] Re: Python, Sage, categories

2010-07-24 Thread William Stein
On Sat, Jul 24, 2010 at 11:21 AM, Robert Bradshaw
 wrote:
> On Sat, Jul 24, 2010 at 10:46 AM, Harald Schilly
>  wrote:
>> On Jul 24, 8:10 am, Robert Bradshaw 
>> wrote:
>>> We should do this as part of the tests, collect timing data on each
>>> test block (and perhaps even each line?).
>>
>> I don't think this would work for all lines because completing all the
>> tests would take too long (if we want to use "timeit", each line is
>> repeated several times)
>> I rather suggest to add something to the doctest infrastructure, that
>> executes those lines in timeit(..) that are tagged via "# timeit"
>> appended to the line.
>> e.g.
>> sage: x = 1
>> sage: _ = x*x # timeit
>> Data for these timings are collected in a key-value dictionary that is
>> pickled into a file named after the current date+time (maybe also
>> revision number?) ... The key should also be something useful, e.g. a
>> 3-tuple consisting of the relative path and name to the file, the line
>> number and the string literal of the exectued line.
>> Based on that it should be straightforward to write some code that
>> analyzes execution time regressions.
>
> +1 to the idea of a timeit decorator, which would be useful for
> microbenchmarking. I think timing whole blocks would be useful as well
> to make sure there's no macro regressions. Though any one datapoint
> isn't as useful, if everyone was consistently getting a slowdown for a
> given doctest, that would be an indicator that something is going on.
>
> - Robert

In additional to all the above being good ideas, there is something
else I'm going
to start doing, which is to add a new function to sage called "timeit.test".

   sage: timeit.test('some expression', 7, '2+2', ... arguments as to timeit )
   True

It's a function that will return True only if the result of timing
evaluation of the expression is at most 7 times the time to evaluate
the third expression (in this case "2+2").

For example, this could be used as follows:

sage: R. = ZZ[]
sage: timeit.test('x*x', 10, '2*2')
True

to ensure that somebody doesn't screw up polynomial arithmetic so that
it suddenly takes much longer than it used to.

I'm not 100% sure that this test suite will be in Sage, but there's no
question I'm going to make it.  I can always run it myself outside of
Sage if I so desire.

 -- William

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


Re: [sage-devel] Re: Python, Sage, categories

2010-07-24 Thread Robert Bradshaw
On Sat, Jul 24, 2010 at 10:46 AM, Harald Schilly
 wrote:
> On Jul 24, 8:10 am, Robert Bradshaw 
> wrote:
>> We should do this as part of the tests, collect timing data on each
>> test block (and perhaps even each line?).
>
> I don't think this would work for all lines because completing all the
> tests would take too long (if we want to use "timeit", each line is
> repeated several times)
> I rather suggest to add something to the doctest infrastructure, that
> executes those lines in timeit(..) that are tagged via "# timeit"
> appended to the line.
> e.g.
> sage: x = 1
> sage: _ = x*x # timeit
> Data for these timings are collected in a key-value dictionary that is
> pickled into a file named after the current date+time (maybe also
> revision number?) ... The key should also be something useful, e.g. a
> 3-tuple consisting of the relative path and name to the file, the line
> number and the string literal of the exectued line.
> Based on that it should be straightforward to write some code that
> analyzes execution time regressions.

+1 to the idea of a timeit decorator, which would be useful for
microbenchmarking. I think timing whole blocks would be useful as well
to make sure there's no macro regressions. Though any one datapoint
isn't as useful, if everyone was consistently getting a slowdown for a
given doctest, that would be an indicator that something is going on.

- Robert

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


[sage-devel] Re: Python, Sage, categories

2010-07-24 Thread Harald Schilly
On Jul 24, 8:10 am, Robert Bradshaw 
wrote:
> We should do this as part of the tests, collect timing data on each
> test block (and perhaps even each line?).

I don't think this would work for all lines because completing all the
tests would take too long (if we want to use "timeit", each line is
repeated several times)
I rather suggest to add something to the doctest infrastructure, that
executes those lines in timeit(..) that are tagged via "# timeit"
appended to the line.
e.g.
sage: x = 1
sage: _ = x*x # timeit
Data for these timings are collected in a key-value dictionary that is
pickled into a file named after the current date+time (maybe also
revision number?) ... The key should also be something useful, e.g. a
3-tuple consisting of the relative path and name to the file, the line
number and the string literal of the exectued line.
Based on that it should be straightforward to write some code that
analyzes execution time regressions.

H

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


Re: [sage-devel] Re: Error compiling Sage 4.5.1 in OpenSuse 11.3

2010-07-24 Thread William Stein
Install the system-wide readline-dev package for your linux distro.

William

2010/7/24 Jae :
> Hi,
>
>  I did
>rm (SAGE_ROOT)/local/lib/*readline*
> but still get the following error.
>
> 
> Machine: Linux linux-zvbz.site 2.6.34-12-desktop #1 SMP PREEMPT
> 2010-06-29 02:39:08 +0200 x86_64 x86_64 x86_64 GNU/Linux
> =
> .
> =
> checking for dlopen in -ldl... yes
> checking readline/history.h usability... yes
> checking readline/history.h presence... yes
> checking for readline/history.h... yes
> checking readline/readline.h usability... yes
> checking readline/readline.h presence... yes
> checking for readline/readline.h... yes
> checking for rl_callback_read_char in -lreadline... no
> checking for main in -lncurses... no
> checking for main in -ltermcap... yes
> checking for rl_callback_read_char in -lreadline... no
> checking for history_truncate_file... no
> configure: error: --with-readline=yes (default) and headers/libs are
> not available
> Error configuring R.
>
> real0m9.815s
> user0m4.207s
> sys 0m3.239s
> sage: An error occurred while installing r-2.10.1.p2
> Please email sage-devel http://groups.google.com/group/sage-devel
> explaining the problem and send the relevant part of
> of /home/champs/sage-4.5.1/install.log.  Describe your computer,
> operating system, etc.
> If you want to try to fix the problem yourself, *don't* just cd to
> /home/champs/sage-4.5.1/spkg/build/r-2.10.1.p2 and type 'make check'
> or whatever is appropriate.
> Instead, the following commands setup all environment variables
> correctly and load a subshell for you to debug the error:
> (cd '/home/champs/sage-4.5.1/spkg/build/r-2.10.1.p2' && '/home/champs/
> sage-4.5.1/sage' -sh)
> When you are done debugging, you can type "exit" to leave the
> subshell.
> make[1]: *** [installed/r-2.10.1.p2] Error 1
> make[1]: Leaving directory `/home/champs/sage-4.5.1/spkg'
>
> real0m16.363s
> user0m10.554s
> sys 0m3.748s
> Error building Sage.
>
>
> Thank you for your attentions
> Jae
>
> On 7월24일, 오전8시28분, Shing  wrote:
>> Hi,
>>After
>> rm (SAGE_ROOT)/local/lib/*readline*
>>
>>sage compiles  successfully in Opensue 11.3.
>>
>> Thanks!
>> Shing
>>
>> On Jul 23, 9:06 pm, William Stein  wrote:
>>
>> > On Fri, Jul 23, 2010 at 12:52 PM, Shing  wrote:
>> > > Hi,
>> > >   When I compile Sage 4.5.1 in Opensue 11.3, I get the following
>> > > error.
>> > > My cpu is an AMD  Athlon 1700XP.
>>
>> > I think this is due to an incompatibility between your systemwide
>> > readline and the one included in sage.You might try
>> > cd SAGE_ROOT
>> > rm local/lib/*readline*
>>
>> > > Machine:
>> > > Linux hilbert 2.6.34-12-default #1 SMP 2010-06-29 02:39:08 +0200 i686
>> > > athlon i386 GNU/Linux
>> > > Deleting directories from past builds of previous/current versions of
>> > > sqlite-3.6.22
>> > > Extracting package /usr/local/lib/sages/sage-4.5.1/spkg/standard/
>> > > sqlite-3.6.22.spkg ...
>> > > -rw-r--r-- 1 1060 1060 1080534 2010-06-28 17:36 /usr/local/lib/sages/
>> > > sage-4.5.1/spkg/standard/sqlite-3.6.22.spkg
>> > > sqlite-3.6.22/
>> > > sqlite-3.6.22/SPKG.txt
>> > > sqlite-3.6.22/.hg/
>> > > sqlite-3.6.22/.hg/00changelog.i
>> > > sqlite-3.6.22/.hg/requires
>> > > sqlite-3.6.22/.hg/undo.dirstate
>> > > sqlite-3.6.22/.hg/store/
>> > > sqlite-3.6.22/.hg/store/00changelog.i
>> > > sqlite-3.6.22/.hg/store/00manifest.i
>> > > sqlite-3.6.22/.hg/store/data/
>> > > sqlite-3.6.22/.hg/store/data/_s_p_k_g.txt.i
>> > > sqlite-3.6.22/.hg/store/data/spkg-install.i
>> > > sqlite-3.6.22/.hg/store/data/.hgignore.i
>> > > sqlite-3.6.22/.hg/store/data/patches/
>> > > sqlite-3.6.22/.hg/store/data/patches/_makefile.in.i
>> > > sqlite-3.6.22/.hg/store/undo
>> > > sqlite-3.6.22/.hg/attic/
>> > > sqlite-3.6.22/.hg/dirstate
>> > > sqlite-3.6.22/.hg/undo.branch
>> > > sqlite-3.6.22/src/
>> > > sqlite-3.6.22/src/depcomp
>> > > sqlite-3.6.22/src/sqlite3.pc
>> > > sqlite-3.6.22/src/aclocal.m4
>> > > sqlite-3.6.22/src/README
>> > > sqlite-3.6.22/src/ltmain.sh
>> > > sqlite-3.6.22/src/configure
>> > > sqlite-3.6.22/src/shell.c
>> > > sqlite-3.6.22/src/configure.ac
>> > > sqlite-3.6.22/src/config.guess
>> > > sqlite-3.6.22/src/install-sh
>> > > sqlite-3.6.22/src/config.sub
>> > > sqlite-3.6.22/src/missing
>> > > sqlite-3.6.22/src/sqlite3.1
>> > > sqlite-3.6.22/src/sqlite3.c
>> > > sqlite-3.6.22/src/sqlite3.h
>> > > sqlite-3.6.22/src/Makefile.am
>> > > sqlite-3.6.22/src/Makefile.in
>> > > sqlite-3.6.22/src/sqlite3ext.h
>> > > sqlite-3.6.22/src/INSTALL
>> > > sqlite-3.6.22/src/sqlite3.pc.in
>> > > sqlite-3.6.22/patches/
>> > > sqlite-3.6.22/spkg-install
>> > > sqlite-3.6.22/.hgignore
>> > > Finished extraction
>> > > 
>> > > Host system
>> > > uname -a:
>> > > Linux hilbert 2.6.34-12-default #1 SMP 2010-06-29 02:39:08 +0200 i686
>> > > athlon i386 GNU/Linux
>> > > 
>> > > **

Re: [sage-devel] Re: Error compiling Sage 4.5.1 in OpenSuse 11.3

2010-07-24 Thread Dr. David Kirkby

On 07/24/10 05:58 PM, Jae wrote:

Hi,

  I did
 rm (SAGE_ROOT)/local/lib/*readline*
but still get the following error.


Try copying the following to the directory sage-4.5.1/spkg/standard

http://boxen.math.washington.edu/home/kirkby/patches/readline-6.1.spkg

It is the latest readline. I removed all the Sage patches, and anything else. I 
have not checked it on any Linux system, OS X system. All I did was a very quick 
check on an OpenSolaris system. It seems to build ok.


Give it a try

Dave

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


[sage-devel] Re: Error compiling Sage 4.5.1 in OpenSuse 11.3

2010-07-24 Thread Jae
Hi,

 I did
rm (SAGE_ROOT)/local/lib/*readline*
but still get the following error.


Machine: Linux linux-zvbz.site 2.6.34-12-desktop #1 SMP PREEMPT
2010-06-29 02:39:08 +0200 x86_64 x86_64 x86_64 GNU/Linux
=
.
=
checking for dlopen in -ldl... yes
checking readline/history.h usability... yes
checking readline/history.h presence... yes
checking for readline/history.h... yes
checking readline/readline.h usability... yes
checking readline/readline.h presence... yes
checking for readline/readline.h... yes
checking for rl_callback_read_char in -lreadline... no
checking for main in -lncurses... no
checking for main in -ltermcap... yes
checking for rl_callback_read_char in -lreadline... no
checking for history_truncate_file... no
configure: error: --with-readline=yes (default) and headers/libs are
not available
Error configuring R.

real0m9.815s
user0m4.207s
sys 0m3.239s
sage: An error occurred while installing r-2.10.1.p2
Please email sage-devel http://groups.google.com/group/sage-devel
explaining the problem and send the relevant part of
of /home/champs/sage-4.5.1/install.log.  Describe your computer,
operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/home/champs/sage-4.5.1/spkg/build/r-2.10.1.p2 and type 'make check'
or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
(cd '/home/champs/sage-4.5.1/spkg/build/r-2.10.1.p2' && '/home/champs/
sage-4.5.1/sage' -sh)
When you are done debugging, you can type "exit" to leave the
subshell.
make[1]: *** [installed/r-2.10.1.p2] Error 1
make[1]: Leaving directory `/home/champs/sage-4.5.1/spkg'

real0m16.363s
user0m10.554s
sys 0m3.748s
Error building Sage.


Thank you for your attentions
Jae

On 7월24일, 오전8시28분, Shing  wrote:
> Hi,
>After
> rm (SAGE_ROOT)/local/lib/*readline*
>
>sage compiles  successfully in Opensue 11.3.
>
> Thanks!
> Shing
>
> On Jul 23, 9:06 pm, William Stein  wrote:
>
> > On Fri, Jul 23, 2010 at 12:52 PM, Shing  wrote:
> > > Hi,
> > >   When I compile Sage 4.5.1 in Opensue 11.3, I get the following
> > > error.
> > > My cpu is an AMD  Athlon 1700XP.
>
> > I think this is due to an incompatibility between your systemwide
> > readline and the one included in sage.You might try
> > cd SAGE_ROOT
> > rm local/lib/*readline*
>
> > > Machine:
> > > Linux hilbert 2.6.34-12-default #1 SMP 2010-06-29 02:39:08 +0200 i686
> > > athlon i386 GNU/Linux
> > > Deleting directories from past builds of previous/current versions of
> > > sqlite-3.6.22
> > > Extracting package /usr/local/lib/sages/sage-4.5.1/spkg/standard/
> > > sqlite-3.6.22.spkg ...
> > > -rw-r--r-- 1 1060 1060 1080534 2010-06-28 17:36 /usr/local/lib/sages/
> > > sage-4.5.1/spkg/standard/sqlite-3.6.22.spkg
> > > sqlite-3.6.22/
> > > sqlite-3.6.22/SPKG.txt
> > > sqlite-3.6.22/.hg/
> > > sqlite-3.6.22/.hg/00changelog.i
> > > sqlite-3.6.22/.hg/requires
> > > sqlite-3.6.22/.hg/undo.dirstate
> > > sqlite-3.6.22/.hg/store/
> > > sqlite-3.6.22/.hg/store/00changelog.i
> > > sqlite-3.6.22/.hg/store/00manifest.i
> > > sqlite-3.6.22/.hg/store/data/
> > > sqlite-3.6.22/.hg/store/data/_s_p_k_g.txt.i
> > > sqlite-3.6.22/.hg/store/data/spkg-install.i
> > > sqlite-3.6.22/.hg/store/data/.hgignore.i
> > > sqlite-3.6.22/.hg/store/data/patches/
> > > sqlite-3.6.22/.hg/store/data/patches/_makefile.in.i
> > > sqlite-3.6.22/.hg/store/undo
> > > sqlite-3.6.22/.hg/attic/
> > > sqlite-3.6.22/.hg/dirstate
> > > sqlite-3.6.22/.hg/undo.branch
> > > sqlite-3.6.22/src/
> > > sqlite-3.6.22/src/depcomp
> > > sqlite-3.6.22/src/sqlite3.pc
> > > sqlite-3.6.22/src/aclocal.m4
> > > sqlite-3.6.22/src/README
> > > sqlite-3.6.22/src/ltmain.sh
> > > sqlite-3.6.22/src/configure
> > > sqlite-3.6.22/src/shell.c
> > > sqlite-3.6.22/src/configure.ac
> > > sqlite-3.6.22/src/config.guess
> > > sqlite-3.6.22/src/install-sh
> > > sqlite-3.6.22/src/config.sub
> > > sqlite-3.6.22/src/missing
> > > sqlite-3.6.22/src/sqlite3.1
> > > sqlite-3.6.22/src/sqlite3.c
> > > sqlite-3.6.22/src/sqlite3.h
> > > sqlite-3.6.22/src/Makefile.am
> > > sqlite-3.6.22/src/Makefile.in
> > > sqlite-3.6.22/src/sqlite3ext.h
> > > sqlite-3.6.22/src/INSTALL
> > > sqlite-3.6.22/src/sqlite3.pc.in
> > > sqlite-3.6.22/patches/
> > > sqlite-3.6.22/spkg-install
> > > sqlite-3.6.22/.hgignore
> > > Finished extraction
> > > 
> > > Host system
> > > uname -a:
> > > Linux hilbert 2.6.34-12-default #1 SMP 2010-06-29 02:39:08 +0200 i686
> > > athlon i386 GNU/Linux
> > > 
> > > 
> > > CC Version
> > > gcc -v
> > > Using built-in specs.
> > > COLLECT_GCC=gcc
> > > COLLECT_LTO_WRAPPER=/usr/lib/gcc/i586-suse-linux/4.5/lto-wrapper
> > > Target: i586-suse-linux
> > > Configured with: ../configure --prefix=/usr --info

Re: [sage-devel] Should there be some *good* examples on notebook?

2010-07-24 Thread Robert Bradshaw
On Sat, Jul 24, 2010 at 4:02 AM, Dr. David Kirkby
 wrote:
> On 07/24/10 10:41 AM, Robert Bradshaw wrote:
>>
>> On Sat, Jul 24, 2010 at 2:24 AM, David Kirkby
>>  wrote:
>>>
>>> On 24 July 2010 09:38, Robert Bradshaw
>>>  wrote:
>
 I like "Published" and "Shared" better.
>>>
>>> I think the issue I have with "published", which someone else in this
>>> thread first mentioned months ago, is that in academic circles one
>>> associates "published" with high quality.
>>>
>>> I can't think of any normal use of the word "published" to mean making
>>> available a set of documents like this.
>>
>> I guess I'd say one publishes a web page, or blog, or photo album,
>> etc. to share it with the world.
>
> But one normally does not aim to publish error messages on a web page. If I
> get to a web page which shows a PHP error, it does not give one a good
> impression.
>
> One does not normally publish out-of-focus photos, but selectively publishes
> good ones.
>
> For one reason or another, people often publish error messages on Sage
> documents.
>
>
>>> Looking at http://www.sagenb.org/pub/
>>
>> Right now I can't even get to that page :(. Clearly not what we want
>> for a first impression :).
>
> Agreed.
>
>>> less than 10% of the worksheets have a rating. At that level, I don't
>>> think its achieving much myself.
>>>
>>> Perhaps changing "Rate this" to "Please rate this" might increase the
>>> percentage of people that rate worksheets. Clearly there is not much
>>> interest in rating them now.
>>
>> Are we sorting by rating? If so, it doesn't matter if the bottom 90%
>> that probably aren't even worth rating are at the bottom. The problem
>> is that the random first-time-user's ugly code littered with
>> tracebacks risks being the first thing anyone sees.
>
> Exactly. Though once you have a rating, if things get sorted by that, people
> can easily make their items appear at the top. (I'm not sure if Sage lets
> you rate your own documents, but even if it does not, you can easily set up
> an account to do it).

There is little motivation for people to make "bad" worksheets, the
kind we're talking about, sort to the top. Mostly it'll be pages
people are proud of. I'm all for some kind of a superuser ranking
ability as well--doesn't have to be 100% peer to peer.

>> The demonstrations could be good pages as well, the question is who is
>> going to create the content, and ensure that it doesn't go out of
>> date?
>
> There are good examples around on the servers. It's just hit and miss
> whether you find them.
>
> I don't think going out of date will be a major problem. If they could form
> part of a doctest, then they would be tested that they at least work. It
> would be good if a 'depreciate' warning could be raised if the code is
> depreciated.
>
> In any case, if they were in the form
>
> http://www.sagenb.org/demonstations/number_theory/
> http://www.sagenb.org/demonstations/numerical_methods/
>
> or something like that, someone with knowledge of those areas could have a
> look occasionally and flag any problems - if a new largest prime has been
> found, or Goldbach's conjecture proven, the page might need an update.
>
> I think aging is a relatively minor problem compared to the much larger
> problem of finding a large bunch of error messages.
>
>> - Robert
>>
>
> Dave
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>

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


[sage-devel] Re: Error compiling Sage 4.5.1 in OpenSuse 11.3

2010-07-24 Thread Shing
Hi,
   After
rm (SAGE_ROOT)/local/lib/*readline*

   sage compiles  successfully in Opensue 11.3.

Thanks!
Shing

On Jul 23, 9:06 pm, William Stein  wrote:
> On Fri, Jul 23, 2010 at 12:52 PM, Shing  wrote:
> > Hi,
> >   When I compile Sage 4.5.1 in Opensue 11.3, I get the following
> > error.
> > My cpu is an AMD  Athlon 1700XP.
>
> I think this is due to an incompatibility between your systemwide
> readline and the one included in sage.    You might try
>     cd SAGE_ROOT
>     rm local/lib/*readline*
>
>
>
>
>
> > Machine:
> > Linux hilbert 2.6.34-12-default #1 SMP 2010-06-29 02:39:08 +0200 i686
> > athlon i386 GNU/Linux
> > Deleting directories from past builds of previous/current versions of
> > sqlite-3.6.22
> > Extracting package /usr/local/lib/sages/sage-4.5.1/spkg/standard/
> > sqlite-3.6.22.spkg ...
> > -rw-r--r-- 1 1060 1060 1080534 2010-06-28 17:36 /usr/local/lib/sages/
> > sage-4.5.1/spkg/standard/sqlite-3.6.22.spkg
> > sqlite-3.6.22/
> > sqlite-3.6.22/SPKG.txt
> > sqlite-3.6.22/.hg/
> > sqlite-3.6.22/.hg/00changelog.i
> > sqlite-3.6.22/.hg/requires
> > sqlite-3.6.22/.hg/undo.dirstate
> > sqlite-3.6.22/.hg/store/
> > sqlite-3.6.22/.hg/store/00changelog.i
> > sqlite-3.6.22/.hg/store/00manifest.i
> > sqlite-3.6.22/.hg/store/data/
> > sqlite-3.6.22/.hg/store/data/_s_p_k_g.txt.i
> > sqlite-3.6.22/.hg/store/data/spkg-install.i
> > sqlite-3.6.22/.hg/store/data/.hgignore.i
> > sqlite-3.6.22/.hg/store/data/patches/
> > sqlite-3.6.22/.hg/store/data/patches/_makefile.in.i
> > sqlite-3.6.22/.hg/store/undo
> > sqlite-3.6.22/.hg/attic/
> > sqlite-3.6.22/.hg/dirstate
> > sqlite-3.6.22/.hg/undo.branch
> > sqlite-3.6.22/src/
> > sqlite-3.6.22/src/depcomp
> > sqlite-3.6.22/src/sqlite3.pc
> > sqlite-3.6.22/src/aclocal.m4
> > sqlite-3.6.22/src/README
> > sqlite-3.6.22/src/ltmain.sh
> > sqlite-3.6.22/src/configure
> > sqlite-3.6.22/src/shell.c
> > sqlite-3.6.22/src/configure.ac
> > sqlite-3.6.22/src/config.guess
> > sqlite-3.6.22/src/install-sh
> > sqlite-3.6.22/src/config.sub
> > sqlite-3.6.22/src/missing
> > sqlite-3.6.22/src/sqlite3.1
> > sqlite-3.6.22/src/sqlite3.c
> > sqlite-3.6.22/src/sqlite3.h
> > sqlite-3.6.22/src/Makefile.am
> > sqlite-3.6.22/src/Makefile.in
> > sqlite-3.6.22/src/sqlite3ext.h
> > sqlite-3.6.22/src/INSTALL
> > sqlite-3.6.22/src/sqlite3.pc.in
> > sqlite-3.6.22/patches/
> > sqlite-3.6.22/spkg-install
> > sqlite-3.6.22/.hgignore
> > Finished extraction
> > 
> > Host system
> > uname -a:
> > Linux hilbert 2.6.34-12-default #1 SMP 2010-06-29 02:39:08 +0200 i686
> > athlon i386 GNU/Linux
> > 
> > 
> > CC Version
> > gcc -v
> > Using built-in specs.
> > COLLECT_GCC=gcc
> > COLLECT_LTO_WRAPPER=/usr/lib/gcc/i586-suse-linux/4.5/lto-wrapper
> > Target: i586-suse-linux
> > Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
> > --mandir=/usr/share/man --libdir=/usr/lib --libexec
> > dir=/usr/lib --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --
> > enable-checking=release --with-gxx-include-dir=/usr
> > /include/c++/4.5 --enable-ssp --disable-libssp --disable-plugin --with-
> > bugurl=http://bugs.opensuse.org/--with-pkgversion
> > ='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/
> > lib --with-system-zlib --enable-__cxa_atexit --enable
> > -libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-
> > specific-runtime-libs --program-suffix=-4.5 --enable-li
> > nux-futex --without-system-libunwind --enable-gold --with-plugin-ld=/
> > usr/bin/gold --with-arch-32=i586 --with-tune=generic
> >  --build=i586-suse-linux
> > Thread model: posix
> > gcc version 4.5.0 20100604 [gcc-4_5-branch revision 160292] (SUSE
> > Linux)
> > 
> > bash: symbol lookup error: bash: undefined symbol:
> > rl_filename_rewrite_hook
>
> > real    0m0.015s
> > user    0m0.004s
> > sys     0m0.004s
> > sage: An error occurred while installing sqlite-3.6.22
> > Please email sage-develhttp://groups.google.com/group/sage-devel
> > explaining the problem and send the relevant part of
> > of /usr/local/lib/sages/sage-4.5.1/install.log.  Describe your
> > computer, operating system, etc.
> > If you want to try to fix the problem yourself, *don't* just cd to
> > /usr/local/lib/sages/sage-4.5.1/spkg/build/sqlite-3.6.22 and type
> > 'make check' or whatever is appropriate.
> > Instead, the following commands setup all environment variables
> > correctly and load a subshell for you to debug the error:
> > (cd '/usr/local/lib/sages/sage-4.5.1/spkg/build/sqlite-3.6.22' && '/
> > usr/local/lib/sages/sage-4.5.1/sage' -sh)
> > When you are done debugging, you can type "exit" to leave the
> > subshell.
> > make[1]: *** [installed/sqlite-3.6.22] Error 1
> > make[1]: Leaving directory `/usr/local/lib/sages/sage-4.5.1/spkg'
>
> > real    1m51.825s
> > user    1m12.881s
> > sys     0m11.

Re: [sage-devel] complementary problem

2010-07-24 Thread Robert Miller
Chris,

On Mon, Jul 12, 2010 at 7:49 PM, Chris Godsil  wrote:
> ... its the complicated vertices that are causing the problem, I expect.

The problem is that the comparison operators in Python for sets
implement the subset notion, and thus do not provide a proper sorting
of a list of sets:

http://docs.python.org/library/sets.html#set-objects

IMHO, these would be better as .is_subset() methods, etc.

Sage's adjacency matrix command uses vertices(), which uses comparison
operators to give an ordering of the vertices. However, since "subset"
does not define a total ordering, it does not give a good way of
sorting vertices. One good short term solution is to use tuples
instead, which are ordered lexicographically.

Some possible solutions:

1. Sage graphs should have a way of specifying a user-defined
comparison function for sorting vertices. Any time you use sets as
vertices, you would also do something like

sage: def cmp(foo, bar):
...   # some total ordering on foo and bar...
sage: G.set_cmp_verts(cmp)
sage: G.vertices()
[consistently sorted list of vertices]

Or even easier:

sage: G.set_cmp_verts(sets=True)

2. We could be a bit smarter and provide some alternative sort
function in the vertices() command, but it would seem as if no matter
which function we wrote, a user could come up with another object
which would implement < etc in such a way as to still break it.


Thoughts? Python gurus, is there a set object which has the right kind
of __cmp__ for this use?


-- 
Robert L. Miller
http://www.rlmiller.org/

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


Re: [sage-devel] Sorting vertices of a graph

2010-07-24 Thread Robert Miller
I would simply add a caveat to the documentation. Most users use
either integers for vertices, or a set of certain kinds of objects. It
should be noted that "<" should implement a total ordering for this to
be consistent, e.g. not just a poset. This is related to a debate
about whether "<" should give an ordering of poset elements for
computer science reasons (like binary search in a list) or for
mathematicians...

On Sat, Jul 24, 2010 at 9:20 AM, Rob Beezer  wrote:
> The vertices() method for graphs says the resulting list is always
> sorted.  But while you can use a variety of objects as the vertices of
> a graph (very nice), they do not always compare cleanly (not so
> nice).  So I got bit tonight on a doctest where one vertex was an
> integer and one was a symbolic expression.  With a randomized order
> for the tests, the results would vary.
>
> Do we need to be more careful about the vertices() method, either in
> action or in claims?  When the documentation says the list is sorted,
> is "sorted" a verb or an adjective?
>
> I presume it is expecting too much that any two objects can be
> comparable somehow?
>
> Rob
>
> sage: var('x')
> x
> sage: G=Graph({0:[x]})
> sage: vert = G.vertices()
> sage: vert
> [0, x]
> sage: sorted(vert)
> [0, x]
> sage: vert.reverse()
> sage: vert
> [x, 0]
> sage: sorted(vert)
> [x, 0]
> sage: G.vertices?
> 
> Note that the output of the vertices() function is always sorted.
> 
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to 
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>



-- 
Robert L. Miller
http://www.rlmiller.org/

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


Re: [sage-devel] Re: New Networkx spkg

2010-07-24 Thread Robert Miller
On Fri, Jul 23, 2010 at 10:18 PM, Ben Edwards  wrote:
> As I am working on patching this, I wonder if we shouldn't have an API
> change in sage. Currently several functions, namely cliques_number_of
> take a 'with_labels' argument as a Bool to determine whether a
> dictionary of values is returned or a list. In the new networkx
> version, the function always returns a dictionairy, and one can access
> the list of values with a call to .values(). This seems more natural
> and intuitive to me, and I think we should change the sage function to
> be consistent with the networkx method. Thoughts?

I think we should change the API, not in order to stay consistent with
the NetworkX method, but because it is better. Hopefully the NX API is
more stable than it has been in the past, but it has been a moving
target before. In general the Sage API is distinct from the NX one...


-- 
Robert L. Miller
http://www.rlmiller.org/

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


Re: [sage-devel] Should there be some *good* examples on notebook?

2010-07-24 Thread Dr. David Kirkby

On 07/24/10 10:41 AM, Robert Bradshaw wrote:

On Sat, Jul 24, 2010 at 2:24 AM, David Kirkby  wrote:

On 24 July 2010 09:38, Robert Bradshaw  wrote:



I like "Published" and "Shared" better.


I think the issue I have with "published", which someone else in this
thread first mentioned months ago, is that in academic circles one
associates "published" with high quality.

I can't think of any normal use of the word "published" to mean making
available a set of documents like this.


I guess I'd say one publishes a web page, or blog, or photo album,
etc. to share it with the world.


But one normally does not aim to publish error messages on a web page. If I get 
to a web page which shows a PHP error, it does not give one a good impression.


One does not normally publish out-of-focus photos, but selectively publishes 
good ones.


For one reason or another, people often publish error messages on Sage 
documents.



Looking at http://www.sagenb.org/pub/


Right now I can't even get to that page :(. Clearly not what we want
for a first impression :).


Agreed.


less than 10% of the worksheets have a rating. At that level, I don't
think its achieving much myself.

Perhaps changing "Rate this" to "Please rate this" might increase the
percentage of people that rate worksheets. Clearly there is not much
interest in rating them now.


Are we sorting by rating? If so, it doesn't matter if the bottom 90%
that probably aren't even worth rating are at the bottom. The problem
is that the random first-time-user's ugly code littered with
tracebacks risks being the first thing anyone sees.


Exactly. Though once you have a rating, if things get sorted by that, people can 
easily make their items appear at the top. (I'm not sure if Sage lets you rate 
your own documents, but even if it does not, you can easily set up an account to 
do it).



The demonstrations could be good pages as well, the question is who is
going to create the content, and ensure that it doesn't go out of
date?


There are good examples around on the servers. It's just hit and miss whether 
you find them.


I don't think going out of date will be a major problem. If they could form part 
of a doctest, then they would be tested that they at least work. It would be 
good if a 'depreciate' warning could be raised if the code is depreciated.


In any case, if they were in the form

http://www.sagenb.org/demonstations/number_theory/
http://www.sagenb.org/demonstations/numerical_methods/

or something like that, someone with knowledge of those areas could have a look 
occasionally and flag any problems - if a new largest prime has been found, or 
Goldbach's conjecture proven, the page might need an update.


I think aging is a relatively minor problem compared to the much larger problem 
of finding a large bunch of error messages.



- Robert



Dave

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


[sage-devel] plot scale has wrongly truncated numbers

2010-07-24 Thread Henryk Trappmann
Take for example the following code:
sage: f = {0:1}
sage: for n in range(100): f[n+1] = sqrt(2.0)**f[n]
sage: line([(n,f[n]) for n in range(50,100)])

Then on the y-Axis every tick number is "2e" except the topmost is
"2".
One can not distinguish y values by their displayed numbers.

Another plot issue:
If you change the aspect ratio, then the displayed numbers (i.e. the
font) get also scaled, and makes it often unreadable.
This can be seen with this code:
sage: l=line([(1,0.5),(2,0.6)])
sage: l.set_aspect_ratio(1)
sage: l

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


Re: [sage-devel] Should there be some *good* examples on notebook?

2010-07-24 Thread Robert Bradshaw
On Sat, Jul 24, 2010 at 2:24 AM, David Kirkby  wrote:
> On 24 July 2010 09:38, Robert Bradshaw  wrote:
>> On Sat, Jul 24, 2010 at 1:20 AM, David Kirkby  
>> wrote:
>
>>>  http://server/demonstations/number_theory
>>>  http://server/demonstations/linear_algebra
>>>  http://server/demonstations/plotting
>>>
>>> in a similar way to what you suggested above with
>>>
>>> http://server/pub/stein
>>
>> Demonstrations would be a good idea. Also, we could do a "worksheet of
>> the month" or something like that the same way wikipedia does a
>> photo/article/etc. of the month that's deemed to be of high quality.
>
> That sounds a good idea
>
>>> 2) Rename Published -> "Globally Shared"
>>> 3) Rename Shared -> "Privately Shared"
>>
>> I like "Published" and "Shared" better.
>
> I think the issue I have with "published", which someone else in this
> thread first mentioned months ago, is that in academic circles one
> associates "published" with high quality.
>
> I can't think of any normal use of the word "published" to mean making
> available a set of documents like this.

I guess I'd say one publishes a web page, or blog, or photo album,
etc. to share it with the world.

> But I don't have strong views on this. I do however have a strong view
> that there should be some good examples, and that a casual observer
> can not get the wrong impression by their first encounter with Sage
> being a lot of junk.
>
>>> If someone comes along to a Sage server and sees a bunch of tracebacks
>>> and other error messages, it does not exactly inspire interest.
>>
>> And they should ideally be tested too. I think *any* kind of rating
>> system would also help the random, poor quality stuff sink to the
>> bottom.
>>
>> - Robert
>
> Looking at http://www.sagenb.org/pub/

Right now I can't even get to that page :(. Clearly not what we want
for a first impression :).

> less than 10% of the worksheets have a rating. At that level, I don't
> think its achieving much myself.
>
> Perhaps changing "Rate this" to "Please rate this" might increase the
> percentage of people that rate worksheets. Clearly there is not much
> interest in rating them now.

Are we sorting by rating? If so, it doesn't matter if the bottom 90%
that probably aren't even worth rating are at the bottom. The problem
is that the random first-time-user's ugly code littered with
tracebacks risks being the first thing anyone sees.

The demonstrations could be good pages as well, the question is who is
going to create the content, and ensure that it doesn't go out of
date?

- Robert

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


Re: [sage-devel] Should there be some *good* examples on notebook?

2010-07-24 Thread David Kirkby
On 24 July 2010 09:38, Robert Bradshaw  wrote:
> On Sat, Jul 24, 2010 at 1:20 AM, David Kirkby  wrote:

>>  http://server/demonstations/number_theory
>>  http://server/demonstations/linear_algebra
>>  http://server/demonstations/plotting
>>
>> in a similar way to what you suggested above with
>>
>> http://server/pub/stein
>
> Demonstrations would be a good idea. Also, we could do a "worksheet of
> the month" or something like that the same way wikipedia does a
> photo/article/etc. of the month that's deemed to be of high quality.

That sounds a good idea

>> 2) Rename Published -> "Globally Shared"
>> 3) Rename Shared -> "Privately Shared"
>
> I like "Published" and "Shared" better.

I think the issue I have with "published", which someone else in this
thread first mentioned months ago, is that in academic circles one
associates "published" with high quality.

I can't think of any normal use of the word "published" to mean making
available a set of documents like this.

But I don't have strong views on this. I do however have a strong view
that there should be some good examples, and that a casual observer
can not get the wrong impression by their first encounter with Sage
being a lot of junk.

>> If someone comes along to a Sage server and sees a bunch of tracebacks
>> and other error messages, it does not exactly inspire interest.
>
> And they should ideally be tested too. I think *any* kind of rating
> system would also help the random, poor quality stuff sink to the
> bottom.
>
> - Robert

Looking at http://www.sagenb.org/pub/

less than 10% of the worksheets have a rating. At that level, I don't
think its achieving much myself.

Perhaps changing "Rate this" to "Please rate this" might increase the
percentage of people that rate worksheets. Clearly there is not much
interest in rating them now.

Dave

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


Re: [sage-devel] Re: Python, Sage, categories

2010-07-24 Thread David Kirkby
On 24 July 2010 07:13, Mike Hansen  wrote:
> On Fri, Jul 23, 2010 at 11:10 PM, Robert Bradshaw
>  wrote:
>> We should do this as part of the tests, collect timing data on each
>> test block (and perhaps even each line?). There have been vague plans
>> to do this for a while, and I thought about waiting for it before
>> getting this in, but no one's produced code.
>
> I think Craig may actually have some code for this.
>
> --Mike

I created this ticket long ago, but don't know how to go about writing
it myself

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

That was aimed at having a more direct comparison with Mathematica.

I agree with Robert, doing something as part of the doctests would be
useful. Clearly one would need a way to separate CPU time from wall
time. If the CPU time used by a test changes a lot, it should be
flagged as a possible source of problem. One could also say the same
about memory usage.



Dave

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


Re: [sage-devel] Should there be some *good* examples on notebook?

2010-07-24 Thread Robert Bradshaw
On Sat, Jul 24, 2010 at 1:20 AM, David Kirkby  wrote:
> On 24 July 2010 08:04, William Stein  wrote:
>
>> The design of this "publish/share" aspect of the Sage notebook is
>> nearly an exact clone of Google docs "publish/share", at least circa
>> 2007.   The one difference is that google docs doesn't have a way to
>> browse the list of published documents -- the url's it provides for
>> them are stable urls for the users to post elsewhere.
>
> Stable URLs seem sensible to me.
>
> In the context of Google, this publish/share is probably OK, as I
> doubt poorly published documents would been seen by anyone as a
> reflection on Google - no more than poor web sites found with Google
> are seen as a poor reflection on Google.
>
> But with Sage it is quite different.
>
>> Thus we could also just make the list of published worksheet not
>> browsable at all by default, with the one simple change of removing
>> the "Browse published worksheets" link from the front page.
>> Obviously, before doing that, we would need to find some good
>> replacements for the things people do sometimes use that page for,
>> which is:
>>       (1) go into a room full of students, and
>>       (2) point them at http://server/pub
>>       (3) have them click on the worksheets for today.
>>
>> A customized pub per users might work to replace this, e.g.,
>>
>>   http://server/pub/stein
>>
>> would list the worksheets I've selected somehow...
>>
>> Another solution would be to be able to easily publish bundles of
>> several worksheets together.  Then you just tell the students to look
>> at
>>
>>   http://sever/pub/1234
>>
>> for all the workhseets for today.
>>
>> --
>> William Stein
>
> Perhaps have 3 sections.
> 1) Create a new category "Demonstrations" which has high quality
> demonstrations.Include those with Sage, and make them impossible to
> edit directly within Sage. Nice would be URL's like
>
>  http://server/demonstations/number_theory
>  http://server/demonstations/linear_algebra
>  http://server/demonstations/plotting
>
> in a similar way to what you suggested above with
>
> http://server/pub/stein

Demonstrations would be a good idea. Also, we could do a "worksheet of
the month" or something like that the same way wikipedia does a
photo/article/etc. of the month that's deemed to be of high quality.

> 2) Rename Published -> "Globally Shared"
> 3) Rename Shared -> "Privately Shared"

I like "Published" and "Shared" better.

> I don't see anything particularly wrong with "Globally shared"  being
> publicly viewable without logging in, but as long as the front page
> makes it clear these might not be good examples.
>
> So have the front page look like
>
> * Sign up for a new Sage Notebook account
>
> * Browse Sage demonstrations
> (no login required)
>
> * Browse Globally Shared worksheets
> (Warnings, these may be bad examples)
>
> If someone comes along to a Sage server and sees a bunch of tracebacks
> and other error messages, it does not exactly inspire interest.

And they should ideally be tested too. I think *any* kind of rating
system would also help the random, poor quality stuff sink to the
bottom.

- Robert

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


Re: [sage-devel] Re: Sage and Python(x,y)

2010-07-24 Thread William Stein
On Fri, Jul 23, 2010 at 8:54 PM, Afif  wrote:
> In the discussion I linked to, they actually discuss how the source
> wasn't easily available initially due to hosting issues-- the project
> head would send it to whoever asked for it. It's still not very easy
> to find (they mentioned working on that), but if you go to the mirror
> link on their download page, you can find the source code.

Thanks for the clarification.  I've changed
http://windows.sagemath.org accordingly.

William

>
> Here's the link again, and here's the relevant part of the discussion:
>
> http://groups.google.com/group/pythonxy/browse_thread/thread/f1842694bf899d81/9a169cbadf2e32c7?lnk=gst&q=sage#9a169cbadf2e32c7
>
>  That's right, the source have not always been available online
> (because of my old web hosting provider limitations) but that's not a
> requirement of the GPL license. The source code must be made available
> on demand, that's all and that's what I've been doing every time
> someone was interesting in them (my only reluctance to send the code
> was related to its very bad quality ;-) ).  >>>
>
> Afif
>
> On Jul 23, 6:44 pm, William Stein  wrote:
>> On Fri, Jul 23, 2010 at 6:40 PM, William Stein  wrote:
>> > On Thu, Jul 22, 2010 at 10:05 PM, Jason Grout
>> >  wrote:
>> >> On 7/22/10 9:53 PM, Afif Elghraoui wrote:
>>
>> >> I just read on their website
>>
>> >>> dedicated to Sage for Windows: "[...] Provide an alternative to
>> >>> Enthought's EPD, Python(x,y), and ActiveState Python: 100% free and
>> >>> open source, unlike any of the above systems [...]"... I wonder why
>> >>> they are accusing Python(x,y) to not be 100% free and open source...
>> >>> very disapointing and how outrageous!
>>
>> >> After looking at their website, it does seem like Python(x,y) is 100% free
>> >> and open source.  It seems like we should change
>> >>http://windows.sagemath.org/to reflect that.
>>
>> > Show me how to build the binaries like "Python(x,y)-2.6.5.1.exe"
>> > listed athttp://www.pythonxy.com/.
>> > For at least the first 6 months or so of the Python(x,y) project,
>> > there were binaries, but the code needed
>> > to create them was not released.    I don't know if this has changed.
>> > I won't changehttp://windows.sagemath.org
>> > so long as the build and distribution system of Python(x,y) remains closed.
>>
>> >  -- William
>>
>> On second thought, it is probably worth at least 
>> changinghttp://windows.sagemath.org/to point out that at least I've given up
>> completely on that project.    We're instead porting to Cygwin, which
>> is a very different goal than the one listed athttp://windows.sagemath.org/.
>>
>>  -- William
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to 
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>



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

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


Re: [sage-devel] Should there be some *good* examples on notebook?

2010-07-24 Thread David Kirkby
On 24 July 2010 08:04, William Stein  wrote:

> The design of this "publish/share" aspect of the Sage notebook is
> nearly an exact clone of Google docs "publish/share", at least circa
> 2007.   The one difference is that google docs doesn't have a way to
> browse the list of published documents -- the url's it provides for
> them are stable urls for the users to post elsewhere.

Stable URLs seem sensible to me.

In the context of Google, this publish/share is probably OK, as I
doubt poorly published documents would been seen by anyone as a
reflection on Google - no more than poor web sites found with Google
are seen as a poor reflection on Google.

But with Sage it is quite different.

> Thus we could also just make the list of published worksheet not
> browsable at all by default, with the one simple change of removing
> the "Browse published worksheets" link from the front page.
> Obviously, before doing that, we would need to find some good
> replacements for the things people do sometimes use that page for,
> which is:
>       (1) go into a room full of students, and
>       (2) point them at http://server/pub
>       (3) have them click on the worksheets for today.
>
> A customized pub per users might work to replace this, e.g.,
>
>   http://server/pub/stein
>
> would list the worksheets I've selected somehow...
>
> Another solution would be to be able to easily publish bundles of
> several worksheets together.  Then you just tell the students to look
> at
>
>   http://sever/pub/1234
>
> for all the workhseets for today.
>
> --
> William Stein

Perhaps have 3 sections.
1) Create a new category "Demonstrations" which has high quality
demonstrations.Include those with Sage, and make them impossible to
edit directly within Sage. Nice would be URL's like

 http://server/demonstations/number_theory
 http://server/demonstations/linear_algebra
 http://server/demonstations/plotting

in a similar way to what you suggested above with

http://server/pub/stein


2) Rename Published -> "Globally Shared"
3) Rename Shared -> "Privately Shared"

I don't see anything particularly wrong with "Globally shared"  being
publicly viewable without logging in, but as long as the front page
makes it clear these might not be good examples.

So have the front page look like

* Sign up for a new Sage Notebook account

* Browse Sage demonstrations
(no login required)

* Browse Globally Shared worksheets
(Warnings, these may be bad examples)

If someone comes along to a Sage server and sees a bunch of tracebacks
and other error messages, it does not exactly inspire interest.

Dave

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


[sage-devel] Sorting vertices of a graph

2010-07-24 Thread Rob Beezer
The vertices() method for graphs says the resulting list is always
sorted.  But while you can use a variety of objects as the vertices of
a graph (very nice), they do not always compare cleanly (not so
nice).  So I got bit tonight on a doctest where one vertex was an
integer and one was a symbolic expression.  With a randomized order
for the tests, the results would vary.

Do we need to be more careful about the vertices() method, either in
action or in claims?  When the documentation says the list is sorted,
is "sorted" a verb or an adjective?

I presume it is expecting too much that any two objects can be
comparable somehow?

Rob

sage: var('x')
x
sage: G=Graph({0:[x]})
sage: vert = G.vertices()
sage: vert
[0, x]
sage: sorted(vert)
[0, x]
sage: vert.reverse()
sage: vert
[x, 0]
sage: sorted(vert)
[x, 0]
sage: G.vertices?

Note that the output of the vertices() function is always sorted.


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


Re: [sage-devel] Cython and callbacks. State of the art ?

2010-07-24 Thread Robert Bradshaw
On Fri, Jul 23, 2010 at 11:34 PM, Thierry Dumont
 wrote:
> Hello,
>
> I am not sur to understand if cython can manage callbacks. The documentation
> do not say many things about this (or I  could not find it).
>
> I want to interface ODEs solvers, and I would like to do it with cython.
> o, if I want to solve du/dt=f(t,u), I need to pass f to the solver
>
> solver(..., f,)
>
> And I think that the only way to get acceptable performances if to cythonize
> all: cythonize f, and cythonize the calling sequence.
>
> Can we do this?

Yes, Cython handle callbacks, but if your library takes C functions
then the callback needs to be a C function. You can create a C
function that wraps a Python function, but performance won't be the
best. You could also look into using fast_float or fast_callable,
which have cdef methods for evaluation that can be used in a callback
but are easier to create dynamically and should be plenty fast (way
faster than a pure Python function). We may already do this in some of
the gsl integration stuff.

- Robert

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


Re: [sage-devel] Should there be some *good* examples on notebook?

2010-07-24 Thread William Stein
On Fri, Jul 23, 2010 at 7:21 PM, David Kirkby  wrote:
> On 15 July 2010 22:15, Carl Witty  wrote:
>> On Thu, Jul 15, 2010 at 1:27 PM, Carl Witty  wrote:
>>> One very simple change might be easier to implement/use.  How about if
>>> there were both a "share" button and a "publish" button, and these
>>> went in to separate sections?  I'm guessing that people asking for
>>> help with an error message, etc., would be perfectly happy to choose
>>> "share" rather than "publish".
>>
>> Of course, now that I actually look at the notebook, I see that such
>> buttons already exist.  Sorry for the noise.
>>
>> Carl
>
> They are different though. If you "share" a document you "share" it
> with a number of people, but not the whole world. If you "publish" it,
> anyone with access to the server can see it. The problem I find is
> that many "published" documents are just rubbish. It does not give a
> good impression to see a ton of bad examples of Sage usage published.
>
> I think it would be better i there were some read-only "demonstrations
> of good Sage usage", like there for Mathematica.
>
> http://demonstrations.wolfram.com/
>
> I don't see any poor examples of Mathematica usage on the Wolfram
> Demonstrations pages, but we allow any old junk to be published.
> Perhaps the notebook should have on the front page, something like:
>
> * Demonstrations (examples of good Sage usage)
> * Publicly viewable documents (quality varies considerably).
>
> Put 100 demonstrations in the Sage distribution, and make them read-only.
>
> One tends to equate "published" with good quality, but in practice the
> published documents can be true junk. This looks like an attempt to
> spam, though it was not very effective.
>
> http://t2nb.math.washington.edu:8000/home/pub/20/
>

The design of this "publish/share" aspect of the Sage notebook is
nearly an exact clone of Google docs "publish/share", at least circa
2007.   The one difference is that google docs doesn't have a way to
browse the list of published documents -- the url's it provides for
them are stable urls for the users to post elsewhere.

Thus we could also just make the list of published worksheet not
browsable at all by default, with the one simple change of removing
the "Browse published worksheets" link from the front page.
Obviously, before doing that, we would need to find some good
replacements for the things people do sometimes use that page for,
which is:
   (1) go into a room full of students, and
   (2) point them at http://server/pub
   (3) have them click on the worksheets for today.

A customized pub per users might work to replace this, e.g.,

   http://server/pub/stein

would list the worksheets I've selected somehow...

Another solution would be to be able to easily publish bundles of
several worksheets together.  Then you just tell the students to look
at

   http://sever/pub/1234

for all the workhseets for today.

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

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