วันจันทร์ที่ 28 กุมภาพันธ์ พ.ศ. 2554

Re: [sage-devel] Re: Documentation of prcedures with decorator

On Mon, Feb 28, 2011 at 11:39 PM, Simon King <simon.king@uni-jena.de> wrote:
> Hi Robert,
>
> On 1 Mrz., 00:15, Robert Bradshaw <rober...@math.washington.edu>
> wrote:
>> ...
>> > Namely, cached_method tries to obtain certain attributes common to
>> > python functions from its argument. func_defaults is just one among
>> > others.
>>
>> We don't have as much freedom here, as C-defined and python-defined
>> functions are quite different (standard library) objects. In this
>> case, cached_method should recognize
>> method_descriptors/builtin_function_or_method types and handle them
>> differently (if possible).
>
> Where is the source code for method_descriptor or
> builtin_function_or_method? What is needed to be cimported from where,
> in order to access the attributes corresponding to func_defaults and
> friends?

The source code is in the Python library itself, e.g.
http://svn.python.org/projects/python/trunk/Objects/methodobject.c
There's no direct analogue to many of these fields...

- 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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

[sage-devel] Re: Documentation of prcedures with decorator

Hi Robert,

On 1 Mrz., 00:15, Robert Bradshaw <rober...@math.washington.edu>
wrote:
> ...
> > Namely, cached_method tries to obtain certain attributes common to
> > python functions from its argument. func_defaults is just one among
> > others.
>
> We don't have as much freedom here, as C-defined and python-defined
> functions are quite different (standard library) objects. In this
> case, cached_method should recognize
> method_descriptors/builtin_function_or_method types and handle them
> differently (if possible).

Where is the source code for method_descriptor or
builtin_function_or_method? What is needed to be cimported from where,
in order to access the attributes corresponding to func_defaults and
friends?

Cheers,
Simon

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

Re: [sage-devel] mpmath and plot incompatibility

> On Mon, 28 Feb 2011 at 01:26PM -0800, jtyard wrote:
> > I'm running sage 4.6.1 and cannot use plot after loading mpmath.
> > Namely, running
> >
> > > from mpmath import *
> > > plot(lambda t: sin(2*pi*t), [1, 4])
> >
> > produces no output in the notebook.  I'm loading mpmath because I need
> > to make plots of theta functions, and the page
> >
> > http://mpmath.googlecode.com/svn/trunk/doc/build/functions/elliptic.html#
> > jacobi-theta-functions
> >
> > tells me to first run "from mpmath import *" to gain access to jtheta.
>
> I'm not 100% sure what's going on, but I do see that mpmath has its own
> plot function, and your "from mpmath import *" line overwrites Sage's
> usual plot function with mpmath's.
>
> This works:
>
> sage: import mpmath
> sage: plot(lambda t: mpmath.sin(2*pi*t), (1,4))
>
> So I guess the question is, why isn't mpmath's plot function working?
>
Interestingly mpmath-0.16 and 0.17 have support for matplotlib so presumably
those can use matplotlib for plot.

Francois

Re: [sage-devel] mpmath and plot incompatibility

On Mon, 28 Feb 2011 at 01:26PM -0800, jtyard wrote:
> I'm running sage 4.6.1 and cannot use plot after loading mpmath.
> Namely, running
>
> > from mpmath import *
> > plot(lambda t: sin(2*pi*t), [1, 4])
>
> produces no output in the notebook. I'm loading mpmath because I need
> to make plots of theta functions, and the page
>
> http://mpmath.googlecode.com/svn/trunk/doc/build/functions/elliptic.html#jacobi-theta-functions
>
> tells me to first run "from mpmath import *" to gain access to jtheta.

I'm not 100% sure what's going on, but I do see that mpmath has its own
plot function, and your "from mpmath import *" line overwrites Sage's
usual plot function with mpmath's.

This works:

sage: import mpmath
sage: plot(lambda t: mpmath.sin(2*pi*t), (1,4))

So I guess the question is, why isn't mpmath's plot function working?

Dan

--
--- Dan Drake
----- http://mathsci.kaist.ac.kr/~drake
-------

[sage-devel] Re: mpmath and plot incompatibility

On 2/28/11 3:26 PM, jtyard wrote:
> Hi,
>
> I'm running sage 4.6.1 and cannot use plot after loading mpmath.
> Namely, running
>
>> from mpmath import *
>> plot(lambda t: sin(2*pi*t), [1, 4])
>
> produces no output in the notebook. I'm loading mpmath because I need
> to make plots of theta functions, and the page
>
> http://mpmath.googlecode.com/svn/trunk/doc/build/functions/elliptic.html#jacobi-theta-functions
>
> tells me to first run "from mpmath import *" to gain access to jtheta.
>
> Presumably this is a bug?

It's working exactly according to design. The problem here is that the
mpmath plot overwrote the Sage plot. In general, it's discouraged to do
an "import *". Instead, try doing this:

sage: import mpmath

then prefix each mpmath command with "mpmath":

sage: mpmath.jtheta(1, 0.25, '0.2')
mpf('0.29451207986273')

Thanks,

Jason


--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to sage-devel+unsubscribe@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: Documentation of prcedures with decorator

On Mon, Feb 28, 2011 at 2:35 PM, Simon King <simon.king@uni-jena.de> wrote:
> Hi Robert!
>
> On 28 Feb., 21:00, Robert Bradshaw <rober...@math.washington.edu>
> wrote:
>> ...
>> Sorry, I forgot to mention that it must be declared as "cdef public
>> object __doc__". Otherwise it doesn't create a Python-visible wrapper,
>> so you're still (from Python) accessing the class-level __doc__.
>
> So, is there a difference between "cpdef" and "cdef public"? I wasn't
> aware of that.

Currently, cpdef is only for methods (not attributes), though there is
talk of changing that. It's probably a bug that we let it through
silently.

> But that's great, and naturally suggests a patch for coerce_binary.

Yep, should be a rather easy one. Is there a ticket yet?

> While we are at it: Are similar solutions available for the
> cached_method decorators?
>
> Currently, it fails as follows:
> sage: cython('''from sage.all import cached_method
> cdef class C:
>    @cached_method
>    def f(self,x):
>        return x
>    ''')
> Traceback (most recent call last):
> ...
> AttributeError: 'method_descriptor' object has no attribute
> 'func_defaults'
>
> Namely, cached_method tries to obtain certain attributes common to
> python functions from its argument. func_defaults is just one among
> others.

We don't have as much freedom here, as C-defined and python-defined
functions are quite different (standard library) objects. In this
case, cached_method should recognize
method_descriptors/builtin_function_or_method types and handle them
differently (if possible).

- 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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

[sage-devel] Re: Documentation of prcedures with decorator

Hi Robert!

On 28 Feb., 21:00, Robert Bradshaw <rober...@math.washington.edu>
wrote:
> ...
> Sorry, I forgot to mention that it must be declared as "cdef public
> object __doc__". Otherwise it doesn't create a Python-visible wrapper,
> so you're still (from Python) accessing the class-level __doc__.

So, is there a difference between "cpdef" and "cdef public"? I wasn't
aware of that.

But that's great, and naturally suggests a patch for coerce_binary.

While we are at it: Are similar solutions available for the
cached_method decorators?

Currently, it fails as follows:
sage: cython('''from sage.all import cached_method
cdef class C:
@cached_method
def f(self,x):
return x
''')
Traceback (most recent call last):
...
AttributeError: 'method_descriptor' object has no attribute
'func_defaults'

Namely, cached_method tries to obtain certain attributes common to
python functions from its argument. func_defaults is just one among
others.

Best regards,
Simon

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

[sage-devel] mpmath and plot incompatibility

Hi,

I'm running sage 4.6.1 and cannot use plot after loading mpmath.
Namely, running

> from mpmath import *
> plot(lambda t: sin(2*pi*t), [1, 4])

produces no output in the notebook. I'm loading mpmath because I need
to make plots of theta functions, and the page

http://mpmath.googlecode.com/svn/trunk/doc/build/functions/elliptic.html#jacobi-theta-functions

tells me to first run "from mpmath import *" to gain access to jtheta.

Presumably this is a bug?

Jon

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to sage-devel+unsubscribe@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: Documentation of prcedures with decorator

On Mon, Feb 28, 2011 at 11:38 AM, Simon King <simon.king@uni-jena.de> wrote:
> Hi Robert,
>
> On 28 Feb., 19:56, Robert Bradshaw <rober...@math.washington.edu>
> wrote:
>> If you add a "cdef object __doc__" member to that class, you should be
>> able to assign to it.
>
> I am afraid this is not true.
>
> One is not able to assign it. __doc__ is read only, even if you define
> it cpdef or :
>
> sage: cython('''cdef class C:
> ....:     "Documentation of C"
> ....:     cpdef object __doc__
> ....:     ''')
> sage: c = C()
> sage: c?
> ...
>    File: _mnt_local_king__sage_temp_mpc622_11271_tmp_0_spyx_0.pyx
>    (starting at line 6) Documentation of C
> sage: c.__doc__='other documentation'
> Traceback (most recent call last)
> ...
> AttributeError: '_mnt_local_king__sage_temp_mpc622_11271_tmp_0_spyx'
> object attribute '__doc__' is read-only

Sorry, I forgot to mention that it must be declared as "cdef public
object __doc__". Otherwise it doesn't create a Python-visible wrapper,
so you're still (from Python) accessing the class-level __doc__.

sage: cython("""cdef class C:
...: cdef public object __doc__""")
sage: c = C()
sage: c.__doc__ = "my doc"
sage: c.__doc__
'my doc'

- 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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

[sage-devel] Re: Documentation of prcedures with decorator

Hi Robert,

On 28 Feb., 19:56, Robert Bradshaw <rober...@math.washington.edu>
wrote:
> If you add a "cdef object __doc__" member to that class, you should be
> able to assign to it.

I am afraid this is not true.

One is not able to assign it. __doc__ is read only, even if you define
it cpdef or :

sage: cython('''cdef class C:
....: "Documentation of C"
....: cpdef object __doc__
....: ''')
sage: c = C()
sage: c?
...
File: _mnt_local_king__sage_temp_mpc622_11271_tmp_0_spyx_0.pyx
(starting at line 6) Documentation of C
sage: c.__doc__='other documentation'
Traceback (most recent call last)
...
AttributeError: '_mnt_local_king__sage_temp_mpc622_11271_tmp_0_spyx'
object attribute '__doc__' is read-only


Other attempt: We cdef (or cpdef, that doesn't matter here [I tested])
__doc__ and use methods to write to and read from it. Still, it
doesn't work.

sage: cython('''cdef class C:
....: "Documentation of C"
....: cpdef object __doc__
....: def set_doc(self,s):
....: self.__doc__=s
....: def get_doc(self):
....: return self.__doc__
....: ''')
sage: c = C()
sage: c?
...
File: _mnt_local_king__sage_temp_mpc622_11271_tmp_1_spyx_0.pyx
(starting at line 6) Documentation of C
sage: c.set_doc('New documentation')
sage: c.get_doc()
'New documentation'
sage: c.__doc__
'File: _mnt_local_king__sage_temp_mpc622_11271_tmp_3_spyx_0.pyx
(starting at line 6)\nDocumentation of C'
sage: c?
...
File: _mnt_local_king__sage_temp_mpc622_11271_tmp_1_spyx_0.pyx
(starting at line 6) Documentation of C


So, even if you cdef (or cpdef) __doc__ and use a method to assign to
it, you would still not be able to use it for introspection.

Cheers,
Simon

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to sage-devel+unsubscribe@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: Documentation of prcedures with decorator

On Mon, Feb 28, 2011 at 3:32 AM, Simon King <simon.king@uni-jena.de> wrote:
> On 28 Feb., 12:18, Simon King <simon.k...@uni-jena.de> wrote:
>> ...
>> I recall that it is impossible
>> to modifiy __doc__ in Cython - could this be a related problem?
>
> That could very well be: cached_method is defined in sage/misc/
> cachefunc.py, whereas coerce_binop is an alias for a cdef-class
> NamedBinopMethod from sage/structure/element.pyx
>
> So, IIRC, it would be impossible to assign __doc__ to an instance of
> coerce_binop.

If you add a "cdef object __doc__" member to that class, you should be
able to assign to it.

- 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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

[sage-devel] Re: Documentation of prcedures with decorator

On 28 Feb., 12:18, Simon King <simon.k...@uni-jena.de> wrote:
> ...
> I recall that it is impossible
> to modifiy __doc__ in Cython - could this be a related problem?

That could very well be: cached_method is defined in sage/misc/
cachefunc.py, whereas coerce_binop is an alias for a cdef-class
NamedBinopMethod from sage/structure/element.pyx

So, IIRC, it would be impossible to assign __doc__ to an instance of
coerce_binop.

Cheers,
Simon

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

[sage-devel] Re: Documentation of prcedures with decorator

Hi Marco,

On 28 Feb., 11:00, mmarco <mma...@unizar.es> wrote:
> I think that it is because of the @coerce_binop decorator before the
> definition of the procedure. So i wonder if it is a general problem
> (that is, when you build the html documentation of a procedure which
> is defined after a decorator, you get the help of the decorator) or if
> there is something more specific going on here.

At least it is not a general problem for all decorators. For example,
the @cached_method seems fine. It is, e.g., used for the
groebner_basis method of multivariate polynomial ideals, see
http://www.sagemath.org/doc/reference/sage/rings/polynomial/multi_polynomial_ideal.html?highlight=groebner_basis#sage.rings.polynomial.multi_polynomial_ideal.MPolynomialIdeal.groebner_basis

I don't know if the @coerce_binop decorator "forgot" to insert the
proper doc string in the proper place. I recall that it is impossible
to modifiy __doc__ in Cython - could this be a related problem?

Best regards,
Simon

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

[sage-devel] Documentation of prcedures with decorator

I have been making some patch to the .resultant() procedure in /sage/
rings/polynomial/polynomial_element.pyx, and i have noticed something
strange when building the documentation.

If you ask for help both in the notebook or the command line, it shows
fine. But when you build the html help, what you get is this:

http://www.sagemath.org/doc/reference/sage/rings/polynomial/polynomial_element.html?highlight=resultant#sage.rings.polynomial.polynomial_element.Polynomial.resultant

I think that it is because of the @coerce_binop decorator before the
definition of the procedure. So i wonder if it is a general problem
(that is, when you build the html documentation of a procedure which
is defined after a decorator, you get the help of the decorator) or if
there is something more specific going on here.

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

วันอาทิตย์ที่ 27 กุมภาพันธ์ พ.ศ. 2554

Re: [sage-devel] Assignment of matrix to a matrix slice fails in the 1x1 case

On Sun, Feb 27, 2011 at 10:32 PM, D. S. McNeil <dsm054@gmail.com> wrote:
I think this has changed very recently.  Your code seems to work in
4.6.2.rc0, but not in 4.6.1.  

Doug,

Thanks for the response!  I am using Sage 4.6.  This bug was reported in trac #9747 and the patch by Philipp Schneider was merged in sage-4.6.2.alpha0.  Time to upgrade!

Best wishes,
Stephen


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

[sage-devel] Re: Gram-Schmidt

On Feb 24, 9:46 pm, Rob Beezer <goo...@beezer.cotse.net> wrote:
> when you feed it a linearly dependent set, so I'm wondering if it gets
> used very much (or maybe all it ever sees is a linearly independent
> set).

Answering my own post - the entries of the matrix were being used to
check if a basis is LLL-reduced and the 1's on the diagonal just get
in the way.

Results at: http://trac.sagemath.org/sage_trac/ticket/10791

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

Re: [sage-devel] Assignment of matrix to a matrix slice fails in the 1x1 case

On Mon, Feb 28, 2011 at 11:12 AM, Stephen Hartke <hartke@gmail.com> wrote:
> Assignment of a matrix to a matrix slice works as expected except for when
> the slice is 1x1; in that case, Sage expects a scalar instead of a 1x1
> matrix.

I think this has changed very recently. Your code seems to work in
4.6.2.rc0, but not in 4.6.1. You can actually crash Sage 4.6.1 pretty
hard doing this -- most fields simply return an error, but SR doesn't,
and that leads to trouble, at least for me:

sage: A = matrix(SR, 2, 2, range(4))
sage: A[0:1, 0:1] = A[0:1, 0:1] # takes several seconds but finally agrees
sage: A
[[0] 1]
[ 2 3]
sage: A[0,0], type(A[0,0]), parent(A[0,0])
([0], <type 'sage.symbolic.expression.Expression'>, Symbolic Ring)
sage: A[0,0] in SR
terminate called after throwing an instance of 'std::runtime_error'
what(): Number_T::hash() python function (__hash__) raised exception
/Applications/sage/local/bin/sage-sage: line 300: 41613 Abort trap
sage-ipython "$@" -i


Doug

--
Department of Earth Sciences
University of Hong Kong

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

[sage-devel] Re: Assignment of matrix to a matrix slice fails in the 1x1 case

The slice assignment does work as expected for numpy arrays:

import numpy
k=5
A=numpy.array([range(i,i+k) for i in range(k)])
for i in range(A.shape[1]):
    print i,
    try:
        A[0:i,0:i]=A[0:i,0:i]
        print
    except TypeError as e:
        print "This slice assignment failed:",e
        pass
A[2:3,3:4]=37  # a scalar works
A[2:3,4:5]=numpy.array([[53]])  # a 1x1 array also works

Best wishes,
Stephen

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

[sage-devel] Assignment of matrix to a matrix slice fails in the 1x1 case

Assignment of a matrix to a matrix slice works as expected except for when the slice is 1x1; in that case, Sage expects a scalar instead of a 1x1 matrix.  The following code demonstrates the problem:

k=5
A=matrix(RDF,k,k,range(k^2))
for i in range(A.ncols()):
    print i,
    try:
        A[0:i,0:i]=A[0:i,0:i]
        print
    except TypeError as e:
        print "This slice assignment failed:",e
        pass
A[2:3,3:4]=5  # a scalar is expected

Output:
0
1 This slice assignment failed: float() argument must be a string or a number
2
3
4
The fact that assignment to matrix slices fails in this cases is an annoyance in algorithms (such as Householder orthogonalization) that assign to submatrices the result of matrix calculations.  Currently, the 1x1 cases need to be handled separately.

Is there any reason why such an assignment cannot do the appropriate thing when passed a 1x1 matrix or a scalar?  If this seems a reasonable thing to do, I'll open a bug report on the trac.

Best wishes,
Stephen




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

[sage-devel] Re: Maxima library mode nearing completion

On Feb 27, 1:30 pm, rjf <fate...@gmail.com> wrote:
> That's great.  I was concerned that stdio was getting lost in the
> shuffle.

Actually, presently we have a
(setf *standard-output* (make-broadcast-stream))
i.e., effectively a global redirect to /dev/null, because maxima has
quite a bit of output that is impossible to turn off. Obviously, for
any debugging, one should turn this back on. It also means that ecllib
is now somewhat less useful for tasks other than serving as a calculus
back-end (which is the only use of ecl in sage at the moment anyway).
This could be improved by making the output redirection part of our
maxima execution wrapper via a
(let ((*standard-output* *dev-null*)) ...)

> There are still cases which need to be caught like Lisp running out of stack
> space or memory, and the user deciding that Lisp has been running too
> long. Lisp provides some help via handler-case.

Yes it does. See, e.g., http://hg.sagemath.org/sage-main/file/f24ce048fa66/sage/libs/ecl.pyx#l154
Any serious condition that arises in Lisp gets rethrown as a python
exception.
In addition, to catch most maxima-specific errors, we need to run the
code inside a (catch 'macsyma-quit ...).

Getting Ctrl-C to work as desired was one of the more finicky bits
(and the present solution is still subject to a slight race condition
- but very few programs seem to handle SIGINT properly in absolutely
100% of the cases). See http://trac.sagemath.org/sage_trac/ticket/10818
. However, once ECLs own signal handlers are in place, the
corresponding conditions nicely come out and get rethrown as
exceptions.

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

[sage-devel] Re: Maxima library mode nearing completion

On Feb 27, 1:17 pm, Mike Hansen <mhan...@gmail.com> wrote:
> On Sun, Feb 27, 2011 at 10:07 PM, rjf <fate...@gmail.com> wrote:
> > One way around this is for the maxima/lisp function ASKSIGN
> > to get back to Sage.
>
> This happens naturally since Maxima and Sage are in the same process.
> It will sit and wait for an answer on standard input.

That's great. I was concerned that stdio was getting lost in the
shuffle.
I misinterpreted some of the messages.
I assume the other (current) solution (to throw an exception) .. is
going to be
replaced by this.

There are still cases which need to be caught like Lisp running out of
stack
space or memory, and the user deciding that Lisp has been running too
long.
Lisp provides some help via handler-case.

RJF

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to sage-devel+unsubscribe@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: Maxima library mode nearing completion

On Sun, Feb 27, 2011 at 10:07 PM, rjf <fateman@gmail.com> wrote:
> One way around this is for the maxima/lisp function ASKSIGN
> to get back to Sage.

This happens naturally since Maxima and Sage are in the same process.
It will sit and wait for an answer on standard input.

> Another is to
> give an error and quit.

This is what is done -- an exception is thrown with the text from
Maxima. See http://trac.sagemath.org/sage_trac/attachment/ticket/7377/trac_7377-better-ask-error.patch

--Mike

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

[sage-devel] Re: Maxima library mode nearing completion

I have only glanced at the material here, but having
an interface that can pass structures other than
strings seems like a big plus, generally.

What happens to the questions and answers, though?

for example, in a new maxima (no assumptions etc),
integrate(x^n,x)
PRINTS "Is n+1 zero or non-zero"
and WAITS FOR AN ANSWER.

One way around this is for the maxima/lisp function ASKSIGN
to get back to Sage. Another is to answer both ways and combine
them (potentially nasty and inefficient). Another is to
give an error and quit. Do you do one of these, or perhaps
something else?
RJF

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

Re: [sage-devel] Maxima library mode nearing completion

On Sun, Feb 27, 2011 at 11:38 AM, Nils Bruin <nbruin@sfu.ca> wrote:
> In an unexpected flurry of activity, thanks to JP, the maxima library
> interface has developed surprisingly well. There is a whole stack of

Bravo!!!

> patches and dependencies on http://trac.sagemath.org/sage_trac/ticket/7377
> which enables the use of maxima as a library for calculus purposes.
> Built on 4.6.2.alpha4, there is only one real doctest failure - a
> pickling problem (there are other failures but those are just a matter
> of updating the expected output).
>
> Given that the change is a rather invasive one, I'd expect issues to
> arise independent of doctests. So:
>  - this might be a good time for symbolic and calculus people to start
> looking at this change and comment on its design and point out issues,
> and help solve them
>  - the help from someone familiar with the pickling machinery in
> diagnosing the problem in the one remaining test would by highly
> appreciated
>  - the invasiveness of the patches means that they rot rather quickly,
> so it would be nice if we could use the present momentum to actually
> push this to completion rather than let it slip for another year
> again.
>
> There is a copy of 4.6.2.alpha4+patches on
> http://sage.math.washington.edu/home/nbruin/4.6.2.alpha4/ (symlink to
> scratch) if people want to test it quickly.
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to sage-devel+unsubscribe@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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

[sage-devel] Maxima library mode nearing completion

In an unexpected flurry of activity, thanks to JP, the maxima library
interface has developed surprisingly well. There is a whole stack of
patches and dependencies on http://trac.sagemath.org/sage_trac/ticket/7377
which enables the use of maxima as a library for calculus purposes.
Built on 4.6.2.alpha4, there is only one real doctest failure - a
pickling problem (there are other failures but those are just a matter
of updating the expected output).

Given that the change is a rather invasive one, I'd expect issues to
arise independent of doctests. So:
- this might be a good time for symbolic and calculus people to start
looking at this change and comment on its design and point out issues,
and help solve them
- the help from someone familiar with the pickling machinery in
diagnosing the problem in the one remaining test would by highly
appreciated
- the invasiveness of the patches means that they rot rather quickly,
so it would be nice if we could use the present momentum to actually
push this to completion rather than let it slip for another year
again.

There is a copy of 4.6.2.alpha4+patches on
http://sage.math.washington.edu/home/nbruin/4.6.2.alpha4/ (symlink to
scratch) if people want to test it quickly.

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to sage-devel+unsubscribe@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: Support contracts for commercial customers.

On 02/27/11 03:37 PM, rjf wrote:
> There seem to be two separate questions here.

Yes, and they should be kept separate, on different threads really.

> 1. Should there be commercial support for Sage, whatever that might
> be.
>
> Anyone can announce he/(she_ is available for consulting work on the
> Sage
> collection of programs. He may be paid to enhance Sage for a client.
> The work he does may or may not be redistributed with Sage. GPL does
> not restrict what one can write for one's own use or one's client. It
> affects distribution only. If you have no intention of distributing
> it
> at all, you can keep your add-ons and fixes secret. Or not.
> So there is already the potential for support of some sort.

Yes, that's true. Though it would be almost impossible for any one individual to
do this, as there are too many diverse parts of Sage. If you contact Wolfram
Reserach for support, and it's a non-trivial issue, it will probably be passed
to someone more suitably qualified to handle that area.

As such, I think the only realistic model for support is where someone pay UW
for a support contract, and William or some member of a support team selects the
individual best able to deal with it.

Whereas an expert in Apache, Wireshark, python may well be able to set
themselves up to offer support on that project, it's doubtful that's practical
with Sage.

> 2. Should you (advertise, etc.) to increase the number of people aware
> of Sage.
>
>
> You seem to have combined them in some way so that you are kind of
> trying to advertise for people to send money to Sage Central
> essentially
> as a research grant but with the explicit promise of help or support
> and
> with Sage Central distributing the money to things like salaries of
> friends of Sage, overhead in running computers, etc.

No, I don't think that was anyones intension. The question was rather what do
you do with the money if you get it. Advertising to make more people aware of
Sage is one of many possible uses the funds could be put to.

> If the Sage research project cannot be sustained with research grants,

But nobody has said that's the case.

> but has to do sales, marketing, advertising, ..., then there are at
> least two models, "for profit" and "non profit". Sheltering under the
> UW umbrella as a non profit may NOT work simply because UW, as a
> government entity, is not entitled to use its non-profit tax-free
> status to shelter commercial enterprises. Thus, WRI could sue UW
> for sheltering Sage, a commercial competitor, as a tax-free business.

But who suggested a profit needs to be made? I was certainly not suggesting
selling support contracts with the aim of making a profit. Simply put that money
to good use, such as buying hardware, advertising Sage etc. I don't think that
would be termed making a profit, though I'm not a lawyer, and live in the UK
anyway.

> I am not a lawyer, though UW undoubted employees a few.
>
> The transition from research project to commercial enterprise is a
> well-trod
> path, e.g. Matlab, Macsyma, Maple, Axiom, SMP(at Caltech) then
> Mathematica, Mupad,
>
> Sometimes it works. Sometimes it fails.

IMHO, Sage would struggle.

> Maintaining a flow of research grant money indefinitely to do what may
> eventually evolve to being mostly the maintenance of a software
> collection, is difficult.

I don't think anyone intended that.

> There are a few models that work.
> If it is small enough, and can be hidden inside other projects, that
> sometimes works. Reduce kind of fit that model. Some companies
> support
> pet projects this way, e.g. they support a version of lisp but only
> within CAD
> (computer aided design), which is their money-maker. Or as part of
> selling hardware. Or the way William Stein probably does it,
> by writing a proposal to do Math research on Modular Forms, and
> use it to improve software. (This is an extremely common tactic,
> but usually peters out for various reasons.)
>
> If I got a research grant (say from NSF) to do
> some math research and I used Sage, I could not write into that budget
> "send a donation to UW for Sage support" when Sage is free. I
> could buy a matlab license, though.

But you could use the money to buy a Sage support contract - that's a completely
different issue to making a donation. Buying support contracts is a pretty
standard thing on research grants.

> How could I help Sage?

You mean you want to help!!!!

> I could write a line in the budget
> for paying specific consultants, etc. But I think this
> wouldn't really fit the model which I think you are reaching for,
> which
> is to collect money for Sage and re-purpose it from time to time as
> appropriate by some mechanism, perhaps dictated by WS?
>
> Looking at the RedHat model, I think the utility of Linux far exceeds
> that of Sage, and so goes the willingness of people to pay for
> support.

Yes, I agree. Linux has far more to offer commerical companies, and could easily
form a very major part of their business. In which case, buying support
contracts would expected.

I doubt many support contracts would be sold for Sage. But having the ability to
buy one, could make Sage more attractive to commercial companies. It would
remove a hurdle that currently exists.

I've no idea if any support contracts could be sold, but I doubt it would be
many. At the moment it seems Sage is very much aimed at maths research, and not
the sort of thing that would interest most commercial companies.

Clearly William has some commercial interest. He had a company that paid for one
of his "Sage days" where the purpose was to track bugs. He paid for
accommodation and travel for those attending. I had the chance to go myself, but
decided not to in the end, which was pretty lucky as my father died when I might
well have still been in the USA.

> The Sage situation may differ in some other respects, so not all these
> observations
> may be relevant.
>
> RJF
>
Dave

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

[sage-devel] Re: Support contracts for commercial customers.

There seem to be two separate questions here.

1. Should there be commercial support for Sage, whatever that might
be.

Anyone can announce he/(she_ is available for consulting work on the
Sage
collection of programs. He may be paid to enhance Sage for a client.
The work he does may or may not be redistributed with Sage. GPL does
not restrict what one can write for one's own use or one's client. It
affects distribution only. If you have no intention of distributing
it
at all, you can keep your add-ons and fixes secret. Or not.
So there is already the potential for support of some sort.

2. Should you (advertise, etc.) to increase the number of people aware
of Sage.


You seem to have combined them in some way so that you are kind of
trying to advertise for people to send money to Sage Central
essentially
as a research grant but with the explicit promise of help or support
and
with Sage Central distributing the money to things like salaries of
friends of Sage, overhead in running computers, etc.

If the Sage research project cannot be sustained with research grants,
but has to do sales, marketing, advertising, ..., then there are at
least two models, "for profit" and "non profit". Sheltering under the
UW umbrella as a non profit may NOT work simply because UW, as a
government entity, is not entitled to use its non-profit tax-free
status to shelter commercial enterprises. Thus, WRI could sue UW
for sheltering Sage, a commercial competitor, as a tax-free business.

I am not a lawyer, though UW undoubted employees a few.

The transition from research project to commercial enterprise is a
well-trod
path, e.g. Matlab, Macsyma, Maple, Axiom, SMP(at Caltech) then
Mathematica, Mupad,

Sometimes it works. Sometimes it fails.

Maintaining a flow of research grant money indefinitely to do what may
eventually evolve to being mostly the maintenance of a software
collection, is difficult.

There are a few models that work.
If it is small enough, and can be hidden inside other projects, that
sometimes works. Reduce kind of fit that model. Some companies
support
pet projects this way, e.g. they support a version of lisp but only
within CAD
(computer aided design), which is their money-maker. Or as part of
selling hardware. Or the way William Stein probably does it,
by writing a proposal to do Math research on Modular Forms, and
use it to improve software. (This is an extremely common tactic,
but usually peters out for various reasons.)

If I got a research grant (say from NSF) to do
some math research and I used Sage, I could not write into that budget
"send a donation to UW for Sage support" when Sage is free. I
could buy a matlab license, though.

How could I help Sage? I could write a line in the budget
for paying specific consultants, etc. But I think this
wouldn't really fit the model which I think you are reaching for,
which
is to collect money for Sage and re-purpose it from time to time as
appropriate by some mechanism, perhaps dictated by WS?

Looking at the RedHat model, I think the utility of Linux far exceeds
that of Sage, and so goes the willingness of people to pay for
support.

The Sage situation may differ in some other respects, so not all these
observations
may be relevant.


RJF

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

[sage-devel] Making Google Analytics Public

I propose analytics for sagemath.org be publicly viewable by anyone
without signing in. Unfortunately Google Analytics requires the
webmaster to authorize individual users. However an open source clone
of Analytics, Piwik http://piwik.org/ allows anonymous access, see an
example at http://stats.emsencyclopedia.org/ IP addresses are hidden
from anonymous visitors.

The only issue I've found is I have to install a plugin called GeoIP
for location tracking and during several installs I've forgotten to
install the location database thus preventing all tracking.

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to sage-devel+unsubscribe@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: How to target Mathematica on Google - I'll pay !!!

On 02/27/11 04:25 AM, Robert Bradshaw wrote:

>>> http://jameswharris.wordpress.com/2010/08/01/mathematica-versus-sage/

> Interestingly, his only significant complaint about Sage is that it
> isn't easy to use as a Windows user. Which is a totally valid
> complaint given the state of using Sage on Windows right now, but that
> was the main obstruction.
>
> - Robert
>

That's not quite true. He does have a valid point about Mathematica being more
consistent in its use, though he does not elaborate much on that. He also
apparently has a point about the slowness of the Sage server.

But overall, the article is not well written. I particularly like this bit.

"Also, there is the problem of binary to decimal accuracy. Often computer
programs will produce 3.99999999 when I need 4.000. Programs like Sage and
Mathematic have already solved those problems with custom formula editors and
built in subroutines that are time tested."

I'm not sure if he thinks Sage or Mathematica has any magic to get around this
issue. If he means they can use arbitrary precision mathematics, then at least
say so, but WTF are "custom formula editors" to solve the issue of numerical
errors?

But this Windows issue will not go away until the Cygwin port is completed at
least.

Overall, it is not well written.
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

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+unsubscribe@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: Support contracts for commercial customers.

On 02/27/11 08:00 AM, William Stein wrote:
> On Sat, Feb 26, 2011 at 9:34 PM, daly<daly@axiom-developer.org> wrote:
>> Are you advertising to a particular niche market? For instance,
>> Mathcad is very engineering oriented and has a lot of special
>> purpose packages such as a way to get GPIB data off your spiffy
>> HP equipment. Lab guys love it and will pay for this ability.
>> Sage has no GPIB support.
>
> I have no clue what GPIB even is, but Googling for "gpib" and "python"
> immediately yields:
>
> http://pyvisa.sourceforge.net/
>
> "The PyVISA package enables you to control all kinds of measurement
> equipment through various busses (GPIB, RS232, USB) with Python
> programs. "
>
> -- William

I know a fair amount about this, having written countless bits of GPIB code over
the years

Two bits of my code are on Sourceforge for GPIB and numerous other code I've
never put anywhere.

http://sourceforge.net/projects/hp8970/ (for noise figure meter)
http://sourceforge.net/projects/dawm/ (for DVM)

GPIB (General Purpose Interface Bus)

http://en.wikipedia.org/wiki/IEEE-488

was first invented by Hewlett Packard and called HPIB (Hewlett-Packard Interface
Bus). It is a big connector, which has both a male and female side, so you can
stack them.

You need a GPIB board in a computer (National Instruments are the defacto
standard) and connect that to an instrument. But another cable can be hooked on
the back of the first, to connect to a second instrument. I don't know the limit
on instruments, but it is quite high.

It's used on high-quality test equipment. It pre-dates USB and firewall, but is
still the standard on high-quality equipment. USB is replacing it at the low-end.

Let's say the instrument is a digital volt meter (DVM). You probably want to set
the measurement unit (Volts, Amps, Ohms) and the range (say 1 mV max, or 100 V
max). You use two commands to do this.

ibwrt(some_data) /* write data */
ibrd(some_data) /* read data */

The problem is, each instrument is different. The code needed to do anything
useful with a DVM is different to that for an oscilloscope. Almost all DVMs are
different, though from the same manufacturer the code will sometime have similar
code.

Sure you read and write to them all with ibrd/ibwrt, but what you read, and what
you write, needs to very different for each instrument. I've written code to do

* Anritsu spectrum analyser
* HP noise figure meter
* HP relay
* HP DVM
* HP 5370B time-interval-counter
* HP 7000 series spectrum analyser
* Standard Research Devices lock-in amplifier.
* probably some other!

To be honest, what most engineers need is a driver for their instrument. They
don't want to mess around writing the software for their instrument, which means
consulting the programmers reference manual for their instrument and spending
some time finding out exactly what they need to read and write. Time is money,
and why spend time writing the drivers when you can buy software with them?

LabVIEW is really the standard in this area, though MATLAB has good support for
GPIB.

The problem Sage would have, is that even if one paid someone to write the
drivers, they need the hardware to check them. So whilst I could write the
drivers for the instruments I have, that would be it. There's no practical way
for me to create a driver for a bit of kit I don't have access to. Even if I
could get the programmers reference manual, it's pointless writing code and not
being able to test it. The chances of it working would be close to zero.

This could however form the basis of a project with an electrical engineering
department in the university. Get someone to add GPIB support to Sage, and write
code for as much instrumentation as they can get their hands on.

One could buy a cheap used DVM on eBay and just set it up in a server room and
measure the mains voltage. The actual instrument would use very little power,
and just spit out the data and display it on a web page in real-time. (If you
wanted to buy the DVM, and cover the nominal electricity costs, I would not mind
adding it here as an example. I have a server with a GPIB board in it.)

Another issue is writing code for the driver for the actual GPIB board. There is
code for the National Instruments card available for FreeBSD and Linux, but I'm
not aware of anything free for Solaris or OS X. For Solaris, the driver from
National Instruments cost more than the card.

So there are quite a few practical problems in adding useful GPIB support to
Sage. Adding the code would be relatively easy on Linux at least, but making the
drivers available for a useful range of instruments would be next to impossible.
You would have to rely on someone writing the drivers for their instruments.

Despite all this said, I've been paid to write the drivers for an HP 7000 series
spectrum analyser. But my code only did a small subset of the thing the
instrument could do - I just needed it to collect data for a specific task, and
so only needed to bother with the functions I needed.

I think for most engineers, using code where the drivers are already written is
quite attractive, as the time to write them can be quite significant, making the
purchase of commercial software attractive.

Dave
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

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

[sage-devel] Re: How to target Mathematica on Google - I'll pay !!!

> Interestingly, his only significant complaint about Sage is that it
> isn't easy to use as a Windows user. Which is a totally valid
> complaint given the state of using Sage on Windows right now, but that
> was the main obstruction.
>
> - Robert

Concerning an easy windows version:
I recently did some work with a colinux/andLinux/windows install. I
got it to work, the missing step would be to package it to an exe
installer.
However due to other commitments I couldn't invest the time to do the
necessary investigations to finish this,
I am also unsure how long this would take, maybe just some days, but
if you want to give it some polish then I would rather estimate 2
weeks.
I also missed the last motivation to invest that time because they are
to weak points:
a) this is just working for 32-bit windows
b) In the end there is a performance hit of maybe 15%-20% compared to
the vm solution (refering to google, speed is similar to Cygwin).

the positive is, there is a console and you can do developement, like
in native ubuntu, no real adaptions of the present source code are
needed.
I liked the desktop integration with windows, though it is not
perfect.

An informal report with some screenshots and detailed benchmarking is
here
http://sage.math.washington.edu/home/emil/doc/SageWin/Sage_on_andLinux.html

Thinking twice about it it might be worthwile to offer this andLinus
package, but even better would be to have a preset vm-image, usable
for servers on typical windows school networks so that it could handle
typical numbers of users. I don't know if this is technically possible
though, I just have limited experience with building sage vm-
machines.

A good thing would be to fix the documentation regarding virtualbox/
vmplayer - I guess this is confusing and may be a major annoyance if
you have no previous experience with virtualisation.

kind regards
emil

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to sage-devel+unsubscribe@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: Support contracts for commercial customers.

On 02/27/11 06:32 AM, Rob Beezer wrote:
> On Feb 26, 5:08 pm, "Dr. David Kirkby"<david.kir...@onetel.net>
> wrote:
>> Things like number theory
>> are interesting academically, but don't have a huge interest to industrial users.
>
> I guess RSA public-key cryptography is not very important to banks,
> the military, diplomats wishing to keep "cables" secret from
> WikiLeaks, and little 'ol e-commerce sites like Amazon.com. ;-)

The applications of number theory are useful, but I don't think most industrial
companies need to use number theory software since they are not doing any
research in that area.

They need to plot graphs, do statistics, do FFTs, and depending on the field
read from instrumentation with GPIB as someone pointed out. The GPIB bit is one
thing Sage does lack, and might attract some engineers. However, I don't know of
many people who write their own software for GPIB tools - they get them with
packages like Labview.

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

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+unsubscribe@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: Support contracts for commercial customers.

On Sat, Feb 26, 2011 at 9:34 PM, daly <daly@axiom-developer.org> wrote:
> On Sat, 2011-02-26 at 20:09 -0800, Nils Bruin wrote:
>> On Feb 25, 10:52 pm, William Stein <wst...@gmail.com> wrote:
>> > > 2) Pay for advertising Sage in maths journals, New Scientist, or if
>> > > deemed appropriate, anywhere where the 4 M's are advertised.
>> >
>> > b) Is 2) something that will annoy anybody reading this?  I could see
>> > somebody being annoyed that valuable Sage money is being spent on
>> > advertising.   (I personally think advertising is a good idea.)
>>
>> Do you have good reasons for thinking that? Not that you need them or
>> need to share them. I am just wondering.
>> I would personally like to see sage develop into a platform that I can
>> use for my research needs. When I look at other programs that fit in
>> that category (magma, kant/kash, pari, singular, gap, python, gcc), I
>> notice that none of those feel the need to advertise. Is there
>> something that sage might gain from advertising that those other
>> programs wouldn't? Are those other projects missing opportunities?
>>
>
> Well, "missing opportunities" has a lot to do with project goals.
>
> If you are advertising, what is it you are advertising? Are you
> trying to get more developers? Why not use sourceforge, etc to
> post help requests? Are you trying to get more users?

All of the above would be good in my book. At this point, even just
getting the word out is valuable.

> Why not use
> a direct phone/mail campaign to your likely targets, which for Sage
> would be other schools and peers at other schools.

That would be much more invasive and expensive.

> A table at the
> math conferences is a great idea and you should continue that.

We do that, and I agree that it's money very well spent.

> If you are advertising to attract money then what would your ad
> copy be about? Money only goes where it can grow. Why would someone
> invest in Sage if it is not already a commercial entity? I am a
> little unclear about the financial growth potential of any open
> source computational mathematics package. What is the business
> plan? What is the elevator pitch? What are the 3 year payback
> goals? Is it 1) advertise 2)... 3) profit!

While I can understand where you're coming from given the rest of this
thread, I never got the impression that this advertising campaign's
goal was profit (at least not in the monetary sense). If someone's
looking to spend thousands or millions of dollars of other people's
money expecting a return, then these would be valid concerns, but its
a bit overkill for a single individual spending a couple of bucks to
try to see what intrest it can generate.

- 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+unsubscribe@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: Support contracts for commercial customers.

On Sat, Feb 26, 2011 at 9:34 PM, daly <daly@axiom-developer.org> wrote:
> Are you advertising to a particular niche market? For instance,
> Mathcad is very engineering oriented and has a lot of special
> purpose packages such as a way to get GPIB data off your spiffy
> HP equipment. Lab guys love it and will pay for this ability.
> Sage has no GPIB support.

I have no clue what GPIB even is, but Googling for "gpib" and "python"
immediately yields:

http://pyvisa.sourceforge.net/

"The PyVISA package enables you to control all kinds of measurement
equipment through various busses (GPIB, RS232, USB) with Python
programs. "

-- 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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

วันเสาร์ที่ 26 กุมภาพันธ์ พ.ศ. 2554

[sage-devel] Re: Support contracts for commercial customers.

On Feb 26, 5:08 pm, "Dr. David Kirkby" <david.kir...@onetel.net>
wrote:
> Things like number theory
> are interesting academically, but don't have a huge interest to industrial users.

I guess RSA public-key cryptography is not very important to banks,
the military, diplomats wishing to keep "cables" secret from
WikiLeaks, and little 'ol e-commerce sites like Amazon.com. ;-)

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to sage-devel+unsubscribe@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: Support contracts for commercial customers.

On Sat, 2011-02-26 at 20:09 -0800, Nils Bruin wrote:
> On Feb 25, 10:52 pm, William Stein <wst...@gmail.com> wrote:
> > > 2) Pay for advertising Sage in maths journals, New Scientist, or if
> > > deemed appropriate, anywhere where the 4 M's are advertised.
> >
> > b) Is 2) something that will annoy anybody reading this? I could see
> > somebody being annoyed that valuable Sage money is being spent on
> > advertising. (I personally think advertising is a good idea.)
>
> Do you have good reasons for thinking that? Not that you need them or
> need to share them. I am just wondering.
> I would personally like to see sage develop into a platform that I can
> use for my research needs. When I look at other programs that fit in
> that category (magma, kant/kash, pari, singular, gap, python, gcc), I
> notice that none of those feel the need to advertise. Is there
> something that sage might gain from advertising that those other
> programs wouldn't? Are those other projects missing opportunities?
>

Well, "missing opportunities" has a lot to do with project goals.

If you are advertising, what is it you are advertising? Are you
trying to get more developers? Why not use sourceforge, etc to
post help requests? Are you trying to get more users? Why not use
a direct phone/mail campaign to your likely targets, which for Sage
would be other schools and peers at other schools. A table at the
math conferences is a great idea and you should continue that.

If you are advertising to attract money then what would your ad
copy be about? Money only goes where it can grow. Why would someone
invest in Sage if it is not already a commercial entity? I am a
little unclear about the financial growth potential of any open
source computational mathematics package. What is the business
plan? What is the elevator pitch? What are the 3 year payback
goals? Is it 1) advertise 2)... 3) profit!

If you are advertising to attract attention then Google might not
be the best place. Most universities probably already have MMA and
Maple so professors and students know about them. If they are using
these tools in class they are probably already aware of what is
available. I know that when I taught, say compilers, I reviewed
pretty much every compiler textbook I could find. I doubt that
a professor is going to be swayed by a Google ad. I could be wrong
in an individual instance but less likely to be wrong in the general
case.

Are you advertising to a particular niche market? For instance,
Mathcad is very engineering oriented and has a lot of special
purpose packages such as a way to get GPIB data off your spiffy
HP equipment. Lab guys love it and will pay for this ability.
Sage has no GPIB support.

Some projects, like Axiom, are not "missing opportunities" since
there is nothing about the project goals that would make a Google
ad relevant. What Sage project goals require ads? Is Sage really
ready to compete head-to-head with MMA and Maple? Would Sage know
what to do with ten thousand end-users (students) demanding support?

Personally I would love to see Sage "win big" because I fear the
"dark ages" that will occur when MMA and Maple disappear. You
might not think this could happen but how many companies do you
know that are 50 years old? And what ever happened to Macsyma
(Symbolics died but you can still buy it for DOS). What about
Derive? (TI bought it, rewrote it into C++ but refused to release
the original Lisp code to me). Reduce? (Tony Hearn released the
code as open source but I don't know who is maintaining it).

Axiom was one of "the commercial big three" with MMA and Maple.
When MMA and Maple (recently bought by a company in Japan) go
under where will computational mathematics be? Will MMA and Maple
become open source? Who will maintain them? Who but the original
authors could understand their internals? What happens to all
of those thousands of algorithms?

So I hope that you advertise well. I hope you start a company.
I hope you all get rich and famous. But I also think that there
needs to be a bit more thought about exactly what it is you
would advertise and what you are trying to achieve by it.

Tim Daly


--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to sage-devel+unsubscribe@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: How to target Mathematica on Google - I'll pay !!!

On Sat, Feb 26, 2011 at 6:26 PM, kcrisman <kcrisman@gmail.com> wrote:
>
>> In contrast, when searching for "Mathematica", the first hit with Sage in the
>> name is around #50, which is a comparison of "Mathematica vs Sage" - one where
>> the author clearly considers Mathematica much better.
>>
>> http://jameswharris.wordpress.com/2010/08/01/mathematica-versus-sage/
>
> Though OT to this thread, people should read this.  It's actually very
> poignant, read the right way - almost a love story to computational
> learning of math, and a passionate plea to make this capability easily
> available to anyone who could also be thus inspired.
>
> And it also hits home the points about both cost and things like
> Windows and slickness; these things really do matter - some benefit
> Sage, some Mma, and presumably others other systems.  It reminds me of
> some people in contested elections, who really honestly like both
> candidates, and want to support the underdog, but just can't tear
> themselves away from the one that has the more polished message and
> that they are more familiar with.  (And no, I am making no direct
> comparisons with Sage or Mma and any candidates in any actual election
> - only an analogy with what sometimes happens with individual voters.)

Interestingly, his only significant complaint about Sage is that it
isn't easy to use as a Windows user. Which is a totally valid
complaint given the state of using Sage on Windows right now, but that
was the main obstruction.

- 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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

[sage-devel] Re: Support contracts for commercial customers.

I don't have much of a sense about how much such advertising costs,
but intuitively I'm pretty sure that our booths at the AMS meetings
are extremely cost-effective in comparison. If possible we should try
to have booths at other similar meetings in the future. I'm planning
on going to the ICIAM in Vancouver this year (http://
www.iciam2011.com), but I was not organized enough to think about
getting exhibition space.

-Marshall

On Feb 26, 12:13 pm, John Cremona <john.crem...@gmail.com> wrote:
> Surely advertising in academic places such as AMS Notices, LMS
> newsletter, and similar, would be cheaper than commercial
> publications, and also reach people more likely to use Sage and become
> developers?
>
> John

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

[sage-devel] Re: Support contracts for commercial customers.

On Feb 25, 10:52 pm, William Stein <wst...@gmail.com> wrote:
> > 2) Pay for advertising Sage in maths journals, New Scientist, or if
> > deemed appropriate, anywhere where the 4 M's are advertised.
>
> b) Is 2) something that will annoy anybody reading this?  I could see
> somebody being annoyed that valuable Sage money is being spent on
> advertising.   (I personally think advertising is a good idea.)

Do you have good reasons for thinking that? Not that you need them or
need to share them. I am just wondering.
I would personally like to see sage develop into a platform that I can
use for my research needs. When I look at other programs that fit in
that category (magma, kant/kash, pari, singular, gap, python, gcc), I
notice that none of those feel the need to advertise. Is there
something that sage might gain from advertising that those other
programs wouldn't? Are those other projects missing opportunities?

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

[sage-devel] Re: How to target Mathematica on Google - I'll pay !!!

> In contrast, when searching for "Mathematica", the first hit with Sage in the
> name is around #50, which is a comparison of "Mathematica vs Sage" - one where
> the author clearly considers Mathematica much better.
>
> http://jameswharris.wordpress.com/2010/08/01/mathematica-versus-sage/

Though OT to this thread, people should read this. It's actually very
poignant, read the right way - almost a love story to computational
learning of math, and a passionate plea to make this capability easily
available to anyone who could also be thus inspired.

And it also hits home the points about both cost and things like
Windows and slickness; these things really do matter - some benefit
Sage, some Mma, and presumably others other systems. It reminds me of
some people in contested elections, who really honestly like both
candidates, and want to support the underdog, but just can't tear
themselves away from the one that has the more polished message and
that they are more familiar with. (And no, I am making no direct
comparisons with Sage or Mma and any candidates in any actual election
- only an analogy with what sometimes happens with individual voters.)

- kcrisman

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to sage-devel+unsubscribe@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: Support contracts for commercial customers.

On 02/26/11 09:44 PM, kcrisman wrote:

> But honestly I don't think that the money is to be made for Sage (yet)
> for commercial support, precisely for the reasons that a few people
> stated; R and numpy/Enthought have very targeted audiences, and why
> would someone ask for support for Sage when they could just buy
> support for the piece they actually needed?

I do agree. I don't see there being much (if any) money in supporting Sage.

But I do think a lack of the availability of commercial support would further
reduce the chances of it ever happening.

> For now, the academic
> market has to be the big target, until someone tells us how they need
> Sage's pieces to work together in an industrial setting (as
> presumably, Maple and Mma, and obviously Matlab, are used).

I don't see this happening until there are more tools for industrial users. For
statistics, they would be better just using R alone. Things like number theory
are interesting academically, but don't have a huge interest to industrial users.

Where I think industrial users could be attracted is the opportunity to
collaborate on documents with others in remote locations. I was in the position
once of working with a university in Germany, an aircraft manufacturer in
Germany and a Swiss company.

* German university used MATLAB and Labiew
* Aircraft manufacturer used MATLAB
* Swiss company used Excel
* I used Mathematica.

We shared results, but with different software, it was not as easy as it could
have been.

Sharing data on a web-based interface would have been quite attractive. Being
able to discuss ideas on the phone, and regenerate the data for others to see in
almost real time would have been quite nice. That's something you can't do with
any of the other tools.

It was actually quite useful for two people to analyse the results - one with
Mathematica and another with MATLAB. Had there been *relevant* bugs in the
software we used, comparing results should have highlighted this. In contrast,
when we did get different results, it was always due to someone making a
different assumption about the experimental data than someone else. Of course
there are bugs in MATLAB and Mathematica, but we never uncovered any that
affected our results.

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

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+unsubscribe@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: How to target Mathematica on Google - I'll pay !!!

On 02/26/11 09:33 PM, kcrisman wrote:
>
>> I'm fine with spending a bit of money on advertising, but it does seem
>> odd to me to particularly single out a competitor. Terms like "math
>> software" could be useful.
>

"maths software" seems less useful to me. Sage is already #5 on Google if you
search for that. Hardly worth paying money to advertise if you are already #5.

In contrast, when searching for "Mathematica", the first hit with Sage in the
name is around #50, which is a comparison of "Mathematica vs Sage" - one where
the author clearly considers Mathematica much better.

http://jameswharris.wordpress.com/2010/08/01/mathematica-versus-sage/

However, there are sponsored ads for both Maple & Mathcad if one searches for
Mathematica. (I had to use Mathcad when working at Marconi, and hated it.
Thankfully I had Mathematica at home and could connect via ssh to it, rather
than use Mathcad)

I have set this up, and paid £30.00. Set for English, French and German
languages, and world wide coverage. It will take a bit of time for the payment
to be processed, and since I've set this as "personal" rather than "business",
it has to be approved by Google first.

It should generate 2-4 hits/day and should run for about 30 days, as I've put an
approximate maximum spend of £1.00/day. (The actual spend can be a little higher
or lower than this).

> Yes. Though I suppose in theory Dave can spend his pounds any way he
> wishes :)
>


--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

[sage-devel] Re: Support contracts for commercial customers.

Two comments:

If you're going to advertise, you should look at NCTM and MAA
publications. Not as many will want to use as in research
mathematics, but many will want it for personal use, and most will be
teaching at least some courses where it's a drop-in replacement for
other options. I could see joint advertising with Geogebra as being
useful in NCTM...

With regard to people being paid to work on Sage, I imagine this is
(other than Sage Days, where there is support but not pay) I would
imagine it is almost always with a very specific grant-supported item,
right? Which probably the most qualified or interested person is
doing. If the money isn't there, it's hard to feel hurt. But
perhaps there's more to it than that.

+++

But honestly I don't think that the money is to be made for Sage (yet)
for commercial support, precisely for the reasons that a few people
stated; R and numpy/Enthought have very targeted audiences, and why
would someone ask for support for Sage when they could just buy
support for the piece they actually needed? For now, the academic
market has to be the big target, until someone tells us how they need
Sage's pieces to work together in an industrial setting (as
presumably, Maple and Mma, and obviously Matlab, are used).

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

[sage-devel] Re: How to target Mathematica on Google - I'll pay !!!

> I'm fine with spending a bit of money on advertising, but it does seem
> odd to me to particularly single out a competitor. Terms like "math
> software" could be useful.

Yes. Though I suppose in theory Dave can spend his pounds any way he
wishes :)

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to sage-devel+unsubscribe@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: Support contracts for commercial customers.

Yes, I have an assumption that (at some point)
just about everything "worth" (undefined) exploitation
will be exploited.
Time between invention and exploitation... variable.
Obviously SOMEONE has to be first and it is my opinion
that if nobody has (yet) jumped in to do sage support
then it has been unattractive to those who have
considered it so far.

I have also assumed that you (William in particular, but
others who teach and are close to the development) would
be aware if any of your students are supporting sage
ex-curricular. Undergrads do this sort of thing, post grads too.
Some quit their studies and make their zillions while
the (particular) iron is hot (-:
A few web searches for "sage support" and similar terms might
turn up some moonlighters, or nothing in addition to the forums and docs.

I don't think there is evidence before us, either in support of
or against a market for sage support/service.


-----Original Message-----
>From: William Stein <wstein@gmail.com>
>Sent: Feb 26, 2011 1:55 AM
>To: sage-devel@googlegroups.com
>Cc: RegB <2regburgess@earthlink.net>
>Subject: Re: [sage-devel] Re: Support contracts for commercial customers.
>
>On Fri, Feb 25, 2011 at 6:41 AM, RegB <2regburgess@earthlink.net> wrote:
>> I don't know free market theory at all well - at all for that matter.
>> It would SEEM that if market pull exists it would have shown itself
>> by now, e.g. enterprising (3rd party) individuals would be selling
>> per incident and/or per year contracts to do little more than
>> search the docs and forums for answers to users' questions
>> and difficulties.
>> I know this became a cottage industry with Microsoft Windows
>> somewhen around Win95 and the small ads for Win7 persist.
>>
>> Sage IS much more specialized and a much smaller market,
>> but surely SOMEONE would be offering installation support
>> and 1st tier answers quite independent of the sage group
>> if a market for it existed (?).
>
>Your argument above seems to be that any market worth "exploiting" is
>already being exploited. That makes little sense to me. Sometimes
>(often) companies succeed commercially precisely by being the first to
>enter a new market.
>
>You're also assuming that if somebody is offering Sage support in
>exchange for money, then we would know about it. This isn't
>necessarily the case.
>
>> Perhaps the docs and forums are just too good (-:
>>
>> I understand the "policy" issues of commercial IT groups, but
>> in reality they don't actually get much "fixed" (off-shore or on-
>> shore).
>> Promises of a fix in the next release maybe, but that usually just
>> brings a new batch of bugs and they DO know this.
>
>I don't understand this (I'm not saying it's wrong -- it just doesn't
>make sense to me).
>
> -- William
>
>>
>> On Feb 25, 6:16 am, David Kirkby <david.kir...@onetel.net> wrote:
>>> On 24 February 2011 17:28, William Stein <wst...@gmail.com> wrote:
>>>
>>> > I'm also curious about honest *opinions* about how people in the Sage
>>> > community would feel about a company making potentially gobs of money
>>> > selling support contracts?   What balance between profit and giving
>>> > back to the community would be appropriate?  What services might be
>>> > offensive, and what would be OK?
>>>
>>> People are going to make money from Sage. There is as you know a book
>>> being published on Sage. Both the publisher and the author will make
>>> money from it. Yet personally I see that as the best thing that could
>>> happen to Sage.
>>>
>>> As for the issue I raised as support contracts, then the following
>>> might be a method which would not irritate anyone, so has almost zero
>>> probability of losing any Sage developers. Use the money only to
>>>
>>> 1) Pay for extra hardware. I don't know if you have UPSs, but that
>>> would increase the uptime.
>>> 2) Pay for advertising Sage in maths journals, New Scientist, or if
>>> deemed appropriate, anywhere where the 4 M's are advertised.
>>> 3) Pay for targeted advertisements on Google - Mathematica, MATLAB,
>>> Maple might be nice keywords.
>>>
>>> Do *not* pay any individual Sage developer or a mathematician to work
>>> on some aspect of Sage, as that could potentially cause a bit of bad
>>> feeling.
>>>
>>> One could sink an endless amount of money into advertising.
>>>
>>> Make the "accounts" public. State the number of contracts sold
>>> (obviously not to who), and disclose how the money has been spent - X
>>> to Google, Y for hard disks, Z for UPS's etc.
>>>
>>> Personally, I don't feel the amount of money raised would be huge. But
>>> the fact commercial support was available, could make Sage more
>>> attractive to commercial customers.
>>>
>>> I believe if the money was not payed to any individual developer, then
>>> other developers would not mind providing the support for no cost.
>>> (Count me as one).
>>>
>>> >  * I'm curious if something like sagenb.org, but with Google ads,
>>> > would be offensive.   I could see somebody starting a small business
>>> > that is just public notebook servers that also have ads.
>>>
>>> Personally I have no objection. Even a "Paypal donate" button might be
>>> a good idea.
>>>
>>> > I haven't personally made up my mind about any of this.
>>>
>>> It's not an easy one. You need to be careful not to let it appear one
>>> or two developers are making money from the support contracts, while
>>> others contribute and get zero in return.
>>>
>>> But on the other side of the coin, you should realise that some
>>> companies will never use software that has no commercial support. I've
>>> also met companies that will not use free software, and critise those
>>> that do. They see "free" as "inferior".
>>>
>>> I once had a discussion with a sales rep from National Instruments.
>>> They were willing to give Labview to the university for a very modest
>>> cost. I pointed out to the sales rep that even a small amount of money
>>> was sometimes difficult to raise as the money was already allocated
>>> for something else. When I asked her why they would not simply give it
>>> free, her response was that something that if something is given free,
>>> it is often perceived as having little value, or of low quality.
>>>
>>> Sage remains free, but if commercial support contracts were available,
>>> it might help get Sage into industry.
>>>
>>> It strikes me Sage has many features mathematicians want, but less so
>>> what industrial users might want, so it might be hard to get much
>>> take-up in industry.
>>>
>>> >  -- William
>>>
>>> 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+unsubscribe@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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org