Maple versus Mathematica

1,560 views
Skip to first unread message

William Stein

unread,
Nov 18, 2014, 4:35:21 PM11/18/14
to sage-devel
See this interesting document:

http://www.maplesoft.com/products/maple/compare/HowMapleComparestoMathematica.pdf

It would be valuable to our users (and potential users) if we had a
similar document which explains and *argues* for why we believe our
approach to mathematical software is better than the ones taken by
Mathematica, Magma, Maple, and Matlab.

Some samples from their document: "About 95% of Maple's functionality
is written in the Maple programming language, and every Maple user
can freely inspect the source code for any of these predefined Maple
library routines. [...] In Mathematica, the source code for all the
predefined library routines written in the Mathematica programming
language is hidden from the user." (*)

When arguing for Maple's language over the Mathematica language, they
say "Functional programs are often opaque; most people, even
experienced programmers, find functional-style programs to be
significantly harder to write, read, and debug."

(*) We had a specific situation a few years ago where an academic
wrote a package in maple, and a student at UW wanted to write a
similar open source package in Python. We specifically asked
Maplesoft if the student could look at the source code of Maple, which
is "open" in the sense they list above, then be inspired by it in
writing his own Python code. They came back and clearly said "no
way; absolutely not!"


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

Harald Schilly

unread,
Nov 18, 2014, 5:10:55 PM11/18/14
to sage-...@googlegroups.com
Writing such a comparison for all 4 packages sounds like a huge task, but it could really pay off.

Your episode does ring a bell, it reminds me of the MS-RSL license. This is maybe the same case and is only there to help you to make your code compatible with their product,that's all.
http://referencesource.microsoft.com/license.html

-- Harald

Dan Drake

unread,
Nov 18, 2014, 5:19:42 PM11/18/14
to sage-...@googlegroups.com
On Tue, 18 Nov 2014 at 01:34PM -0800, William Stein wrote:
> When arguing for Maple's language over the Mathematica language, they
> say "Functional programs are often opaque; most people, even
> experienced programmers, find functional-style programs to be
> significantly harder to write, read, and debug."

Perhaps I'm biased because I'm taking the edX functional programming
MOOC right now, but isn't one of the arguments *for* functional
programming style is that it is easier to debug, since you can reason
about each of your functions separately, without tracking the state?


Dan

--
--- Dan Drake
----- www.math.wisc.edu/~ddrake/
-------
signature.asc

William Stein

unread,
Nov 18, 2014, 5:35:46 PM11/18/14
to sage-devel
On Tue, Nov 18, 2014 at 2:17 PM, Dan Drake <ddr...@math.wisc.edu> wrote:
> On Tue, 18 Nov 2014 at 01:34PM -0800, William Stein wrote:
>> When arguing for Maple's language over the Mathematica language, they
>> say "Functional programs are often opaque; most people, even
>> experienced programmers, find functional-style programs to be
>> significantly harder to write, read, and debug."
>
> Perhaps I'm biased because I'm taking the edX functional programming
> MOOC right now, but isn't one of the arguments *for* functional
> programming style is that it is easier to debug, since you can reason
> about each of your functions separately, without tracking the state?

My personal experience with types of programming languages is that
functional/object oriented/etc. is terrible for one
class of problems and awesome for another. You're definitely doing
the right thing by learning several approaches well. The sort of
statement that Maple document makes is really the worst possible
thing, namely to declare an entire style of programming inferior on
general principle.

I'm glad Python supports several different styles, though I do wish
Python had better functional support than it does (e.g., lambda
functions, scoping), since that would make it even more flexible...

I'm really glad that Sage has a fast C-level binding to lisp built in
by default, even if I don't use it so much. (Thanks Nils.)

- William

Stefan

unread,
Nov 18, 2014, 5:37:53 PM11/18/14
to sage-...@googlegroups.com
Problems arise when thinking about more complicated mathematical objects. I don't know if I simply lack the appropriate Mathematica knowledge, but years ago, when I implemented matroids in Mathematica, a matroid was simply a list with 6 elements (groundset, representation matrix, and I forget what else) and head Matroid. To access the elements of that list, you did stuff like this:

lM = Map[If[# == 0, 0, 1] &, M[[2]][[#[[2]] & /@ M[[3]], #[[2]] & /@ M[[4]]]], {2}];

I don't miss that aspect of Mathematica one bit! Python objects are so much nicer, and we still get lambda functions when we need them.

Also, it might be experience, but I spent WAY more time debugging my Mathematica code than debugging my Python code.

Harald Schilly

unread,
Nov 18, 2014, 5:47:24 PM11/18/14
to sage-...@googlegroups.com
On Tue, Nov 18, 2014 at 11:37 PM, Stefan <stefan...@gmail.com> wrote:
> Problems arise when thinking about more complicated mathematical objects.

This is also my main argument ... The core point is, that Python
allows you to define higher-level data-types, which are some
combination of data structures and convey a semantic meaning by the
class name.

I also think Python libs like "toolz"/"cytoolz" show that there is a
lot possible towards functional-stylish programming in Python. And
about functional programming, to my understanding there is a global
state, right? At least that's what I understand from MMA by having
variable assignments and ingredients like "Module". Correct me if I'm
wrong.

William Stein

unread,
Nov 18, 2014, 6:03:27 PM11/18/14
to sage-devel
On Tue, Nov 18, 2014 at 2:37 PM, Stefan <stefan...@gmail.com> wrote:
> Problems arise when thinking about more complicated mathematical objects. I
> don't know if I simply lack the appropriate Mathematica knowledge, but years
> ago, when I implemented matroids in Mathematica, a matroid was simply a list
> with 6 elements (groundset, representation matrix, and I forget what else)
> and head Matroid. To access the elements of that list, you did stuff like
> this:
>
> lM = Map[If[# == 0, 0, 1] &, M[[2]][[#[[2]] & /@ M[[3]], #[[2]] & /@
> M[[4]]]], {2}];

Holy f*2}];ng s&/@!

>
> I don't miss that aspect of Mathematica one bit! Python objects are so much
> nicer, and we still get lambda functions when we need them.
>
> Also, it might be experience, but I spent WAY more time debugging my
> Mathematica code than debugging my Python code.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

kcrisman

unread,
Nov 18, 2014, 9:50:20 PM11/18/14
to sage-...@googlegroups.com
> Problems arise when thinking about more complicated mathematical objects. I 
> don't know if I simply lack the appropriate Mathematica knowledge, but years 
> ago, when I implemented matroids in Mathematica, a matroid was simply a list 
> with 6 elements (groundset, representation matrix, and I forget what else) 
> and head Matroid. To access the elements of that list, you did stuff like 
> this: 

> lM = Map[If[# == 0, 0, 1] &, M[[2]][[#[[2]] & /@ M[[3]], #[[2]] & /@ 
> M[[4]]]], {2}]; 

Holy f*2}];ng s&/@! 



 Let's hope the younger matroid theorists never have to see such obfuscated code again, thanks to your (and others') work!

Jean Bétréma

unread,
Nov 21, 2014, 9:33:04 AM11/21/14
to sage-...@googlegroups.com
Le mercredi 19 novembre 2014 00:03:27 UTC+1, William a écrit :
>
> lM = Map[If[# == 0, 0, 1] &, M[[2]][[#[[2]] & /@ M[[3]], #[[2]] & /@
> M[[4]]]], {2}];

Holy f*2}];ng s&/@!

Sure this answer by Sage is less cryptic:

sage: p=Permutation([4,1,2,5,3])
sage: type(p)
<class 'sage.combinat.permutation.StandardPermutations_all_with_category.element_class'>

but it prevents me (and perhaps others) to do any development in such a system :-(

I think the thread about a pseudo "Code of Conduct" is indeed intended to prevent guys (yes, guys) like Nathann to say simply that in some areas Sage code is a whole mess. Too bad.

William Stein

unread,
Nov 21, 2014, 11:30:29 AM11/21/14
to sage-devel

- William Stein (cell phone)


On Nov 21, 2014 8:27 AM, "Jean Bétréma" <jean.b...@gmail.com> wrote:
>
> Le mercredi 19 novembre 2014 00:03:27 UTC+1, William a écrit :
>>
>> >
>> > lM = Map[If[# == 0, 0, 1] &, M[[2]][[#[[2]] & /@ M[[3]], #[[2]] & /@
>> > M[[4]]]], {2}];
>>
>> Holy f*2}];ng s&/@!
>
>
> Sure this answer by Sage is less cryptic:
>
> sage: p=Permutation([4,1,2,5,3])
> sage: type(p)
> <class 'sage.combinat.permutation.StandardPermutations_all_with_category.element_class'>
>
> but it prevents me (and perhaps others) to do any development in such a system :-(
>

Why?   I certainly wouldn't be deterred by a surprising type name, but maybe I'm more tenacious than some...

> I think the thread about a pseudo "Code of Conduct" is indeed intended to prevent guys (yes, guys) like Nathann to say simply that in some areas Sage code is a whole mess. Too bad.
>

Simon King

unread,
Nov 21, 2014, 1:10:29 PM11/21/14
to sage-...@googlegroups.com
Hi Jean,

On 2014-11-21, Jean Bétréma <jean.b...@gmail.com> wrote:
> Sure this answer by Sage is less cryptic:
>
> sage: p=Permutation([4,1,2,5,3])
> sage: type(p)
><class
> 'sage.combinat.permutation.StandardPermutations_all_with_category.element_class'>
>
> but it prevents me (and perhaps others) to do any development in such a
> system :-(

Just doing
sage: p??
will show you the source code, and doing
sage: edit(p, 'vim') # or another editor instead of vim
will allow you to work on the code.

Hitting "type(p)" is simply not the best approach to find out about
stuff.

Best regards,
Simon


Harald Schilly

unread,
Nov 21, 2014, 2:35:47 PM11/21/14
to sage-...@googlegroups.com


On Nov 21, 2014 5:27 PM, "Jean Bétréma" <jean.b...@gmail.com> wrote:
>
> Le mercredi 19 novembre 2014 00:03:27 UTC+1, William a écrit :
>>
>> >
>> > lM = Map[If[# == 0, 0, 1] &, M[[2]][[#[[2]] & /@ M[[3]], #[[2]] & /@
>> > M[[4]]]], {2}];
>>
>> Holy f*2}];ng s&/@!
>
>
> Sure this answer by Sage is less cryptic:
>
> sage: p=Permutation([4,1,2,5,3])
> sage: type(p)
> <class 'sage.combinat.permutation.StandardPermutations_all_with_category.element_class'>
>
> but it prevents me (and perhaps others) to do any development in such a system :-(
>

Hi, I am quite confused by this. Having a good type system at hand is really helpful, in my opinion. What do you actually expect to get here instead?

Sage already changes some of Python to make it more useful, but I think those basics should stay as they are.

H

Dr. David Kirkby (Kirkby Microwave Ltd)

unread,
Nov 21, 2014, 2:46:27 PM11/21/14
to sage-...@googlegroups.com


On 18 Nov 2014 22:37, "Stefan" <stefan...@gmail.com> wrote:
>
> I don't know if I simply lack the appropriate Mathematica knowledge, but years ago, when I implemented matroids

> lM = Map[If[# == 0, 0, 1] &, M[[2]][[#[[2]] & /@ M[[3]], #[[2]] & /@ M[[4]]]], {2}];

I am no expert on Mathematica, but Mathematica code does not need to be so crytic.

Anyway,  is it any less readable than this code to plot the Mandelbrot set?

http://preshing.com/20110926/high-resolution-mandelbrot-in-obfuscated-python/

Or this C code

http://www.ioccc.org/2013/birken/birken.c

Dave.

William Stein

unread,
Nov 21, 2014, 8:45:05 PM11/21/14
to sage-devel


On Nov 21, 2014 11:46 AM, "Dr. David Kirkby (Kirkby Microwave Ltd)" <drki...@kirkbymicrowave.co.uk> wrote:
>
>
> On 18 Nov 2014 22:37, "Stefan" <stefan...@gmail.com> wrote:
> >
> > I don't know if I simply lack the appropriate Mathematica knowledge, but years ago, when I implemented matroids
> > lM = Map[If[# == 0, 0, 1] &, M[[2]][[#[[2]] & /@ M[[3]], #[[2]] & /@ M[[4]]]], {2}];
>

> I am no expert on Mathematica, but Mathematica code does not need to be so cryptic.
>

Can anybody rewrite the above line of mathematica code so that it does something equivalent, but is less cryptic?

> Anyway,  is it any less readable than this code to plot the Mandelbrot set?
>
> http://preshing.com/20110926/high-resolution-mandelbrot-in-obfuscated-python/
>
> Or this C code
>
> http://www.ioccc.org/2013/birken/birken.c
>
> Dave.
>

Jason Grout

unread,
Nov 21, 2014, 10:17:09 PM11/21/14
to sage-...@googlegroups.com
The ith element of a list is M[[i]]. An expression ending in & is a
lambda function, with # being the first parameter. f /@ B is equivalent
to map(f, B) (f is applied to each element of B). If[# == 0, 0, 1] is
equivalent to lambda x: x==0 ? 0 : 1

So to me, it looks like:

m2 = [m[2][i] for i in [x[2] for x in m[3]]
m3 = [m2[i] for i in [x[2] for x in m[4]]
lM = [[0 if i==0 else 1 for i in x] for x in m3]

There's a decent chance that I missed something, though. It's been a
long while since I did anything in mathematica, and I've realized that
mathematica quickly starts looking like line noise after I've stopped
using it.

Thanks,

Jason

P.S. I was curious about the online mathematica the other night. If I
understood the marketing material correctly, it seems you get
interactive computation included in the base price, and you are charged
for offline computation. I checked the prices, and saw that the credit
system they offer sells computational time for about $10.80/hour (in $15
increments), down to $6.47/hour (if you buy $180 at a time), billed in
100ms chunks [1]. In comparison, the highest price an Amazon Linux EC2
On Demand instance is a 32 processor, 244GB Ram, 8 800GB SSD instance
for $6.82/hour. I realize I didn't count Amazon's bandwidth charges
($0.12/GB after 1GB out from EC2 to internet each month), but
regardless, that seems like relatively expensive computational time.

[1] http://www.wolfram.com/cloud-credits/ (down at the bottom)
[2] http://aws.amazon.com/ec2/pricing/



On 11/21/14, 20:45, William Stein wrote:
>
> On Nov 21, 2014 11:46 AM, "Dr. David Kirkby (Kirkby Microwave Ltd)"
> <drki...@kirkbymicrowave.co.uk <mailto:drki...@kirkbymicrowave.co.uk>>
> wrote:
> >
> >
> > On 18 Nov 2014 22:37, "Stefan" <stefan...@gmail.com
> <mailto:stefan...@gmail.com>> wrote:
> > >
> > > I don't know if I simply lack the appropriate Mathematica
> knowledge, but years ago, when I implemented matroids
> > > lM = Map[If[# == 0, 0, 1] &, M[[2]][[#[[2]] & /@ M[[3]], #[[2]] &
> /@ M[[4]]]], {2}];
> >
> > I am no expert on Mathematica, but Mathematica code does not need to
> be so cryptic.
> >
>
> Can anybody rewrite the above line of mathematica code so that it does
> something equivalent, but is less cryptic?
>
> > Anyway, is it any less readable than this code to plot the
> Mandelbrot set?
> >
> >
> http://preshing.com/20110926/high-resolution-mandelbrot-in-obfuscated-python/
> >
> > Or this C code
> >
> > http://www.ioccc.org/2013/birken/birken.c
> >
> > Dave.
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "sage-devel" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send an email to sage-devel+...@googlegroups.com
> <mailto:sage-devel%2Bunsu...@googlegroups.com>.
> > To post to this group, send email to sage-...@googlegroups.com
> <mailto:sage-...@googlegroups.com>.
> > Visit this group at http://groups.google.com/group/sage-devel.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sage-devel+...@googlegroups.com
> <mailto:sage-devel+...@googlegroups.com>.
> To post to this group, send email to sage-...@googlegroups.com
> <mailto:sage-...@googlegroups.com>.

Jean Bétréma

unread,
Nov 22, 2014, 9:28:33 AM11/22/14
to sage-...@googlegroups.com
Le vendredi 21 novembre 2014 20:35:47 UTC+1, Harald Schilly a écrit :


> Sure this answer by Sage is less cryptic:
>
> sage: p=Permutation([4,1,2,5,3])
> sage: type(p)
> <class 'sage.combinat.permutation.StandardPermutations_all_with_category.element_class'>
>

> but it prevents me (and perhaps others) from doing any development in such a system :-(
>

Hi, I am quite confused by this. Having a good type system at hand is really helpful, in my opinion. What do you actually expect to get here instead?

Oops, imho a permutation is a very elementary object, coding it is not so hard, so it's type should be ... Permutation ! Moreover the construction "Permutation([4,1,2,5,3])" suggests that this is the right way, and indeed:

sage: Permutation
<class 'sage.combinat.permutation.Permutation'>

whereas:

sage: sage.combinat.permutation.StandardPermutations_all_with_category.element_class
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-8-3911cb09e3ce> in <module>()
----> 1 sage.combinat.permutation.StandardPermutations_all_with_category.element_class
AttributeError: 'module' object has no attribute 'StandardPermutations_all_with_category'

I'm somewhat aware of the motivations of those who "categorize" code for combinatorial objects, but yes I'm deterred by such complications, and imho that situation restricts Sage coding to a small circle. Put otherwise, basic *design decisions* about modules in Sage, when not straightforward, should be carefully discussed, in scientific documents. Instead we have cookbooks.

I got other examples, eg trying using graphs, and discovering than building a 100x100 grid was surprinsingly time consuming: I am afraid that it denotes basic flaws in the definition of graphs in Sage.

Amicalement

Nathann Cohen

unread,
Nov 22, 2014, 9:39:40 AM11/22/14
to Sage devel
Hello !


> sage.combinat.permutation.StandardPermutations_all_with_category.element_class
> AttributeError: 'module' object has no attribute
> 'StandardPermutations_all_with_category'
>
> I'm somewhat aware of the motivations of those who "categorize" code for
> combinatorial objects, but yes I'm deterred by such complications, and imho
> that situation restricts Sage coding to a small circle. Put otherwise, basic
> *design decisions* about modules in Sage, when not straightforward, should
> be carefully discussed, in scientific documents. Instead we have cookbooks.

+1 to that. You get classes which are not implemented anywhere as they are created at running time, some functions are implemented in permutation.py and some others in the category files, the 1-based notation (yes, let me insist) leads to errors and the shortcut Permutation((2,5)) makes it very very hard to report errors when the users would need to see one.

Also, in the Poset code we have a problem as some functions appear in the index of Poset functions
http://www.sagemath.org/doc/reference/combinat/sage/combinat/posets/posets.html

... but we do not know what to do with the Poset functions which are implemented in the category/ folder instead of the combinat/poset/ file.

I also believe that if categories are very fine for those who like them, nobody should be forced to use them, especially when it is very hard to understand what exactly is happening behind the scenes.


> I got other examples, eg trying using graphs, and discovering than building
> a 100x100 grid was surprinsingly time consuming: I am afraid that it denotes
> basic flaws in the definition of graphs in Sage.

Now that is a different thing: I cannot do anything about categories but I do understand the graph code. Do you think that this is "surprisingly time consuming" ?

sage: %timeit graphs.Grid2dGraph(100,100)
10 loops, best of 3: 119 ms per loop

Don't hesitate to report anything wrong with the graph code. Usually there are two outcomes:
1) You will be proved wrong; or
2) It will be fixed

Nathann

Harald Schilly

unread,
Nov 22, 2014, 9:42:31 AM11/22/14
to sage-...@googlegroups.com
On Sat, Nov 22, 2014 at 3:28 PM, Jean Bétréma <jean.b...@gmail.com> wrote:
> Oops, imho a permutation is a very elementary object, coding it is not so
> hard,

Why do you come to that conclusion? I'm not so sure.

> Moreover the construction
> "Permutation([4,1,2,5,3])" suggests that this is the right way, and indeed:
>
> sage: Permutation
> <class 'sage.combinat.permutation.Permutation'>

This is the Python class, not the element.

Are you aware of ".parent()" ?

sage: p=Permutation([4,1,2,5,3])
sage: p.parent()
Standard permutations

sage: p.parent().category()
Category of infinite enumerated sets

sage: p.parent().categories()
[Category of infinite enumerated sets,
Category of enumerated sets,
Category of infinite sets,
Category of sets,
Category of sets with partial maps,
Category of objects]

Does this make sense?

I'm not an expert on this, but there is a gap between coding in Python
and how mathematical Objects are defined. For me, seeking for any
solution and implementing it - and hence having concrete examples
which expose all corner cases and invisible problems - is a huge step.
Writing a paper about it (which is IMHO by no means a discussion) just
creates static words of intentions, which cannot cover all the
intricate problems arising in such real-world tests.

-- Harald

Jean Bétréma

unread,
Nov 23, 2014, 3:10:07 PM11/23/14
to sage-...@googlegroups.com
Le samedi 22 novembre 2014 15:39:40 UTC+1, Nathann Cohen a écrit :

> I got other examples, eg trying using graphs, and discovering than building
> a 100x100 grid was surprisingly time consuming: I am afraid that it denotes

> basic flaws in the definition of graphs in Sage.

Don't hesitate to report anything wrong with the graph code. Usually there are two outcomes:
1) You will be proved wrong; or
2) It will be fixed

I sent a precise description of a "surprisingly time consuming" operation (conversion of a dictionary into a graph), and Nathann fixed the corresponding defective code within minutes (http://trac.sagemath.org/ticket/17384) ! Respect ! I apologize, it was not a "basic flaw in the definition of graphs in Sage".

Cordialement   [JB]

maldun

unread,
Nov 27, 2014, 3:51:57 PM11/27/14
to sage-...@googlegroups.com
One of the most important differences between Sage and Mathematica, is that no one of the developers has such a big ego than Stephen Wolfram. It even got it's own music theme: https://mollyrocket.com/11235

And we all know that Python will never decipher the universe like the Wolfram language will *cough**cough*

Back to Topic:

I like that idea very much. But I think instead of simply comparing Sage with one of the other 4M's
we should focus on emphasizing that Sage covers a lot of the functionality for no cost.

I personally a comparison of sage with the other Systems is quite hard, since all of the other 4Ms concentrate more or less
on particular fields of mathematic (e.g. Matlab focus on numerics, Mathematica more on Calculus etc.)
Sage is far from perfect but tries to cover all fields at once.

This is what I love about this project: With the complete power of all Python libraries, one can do calculus, algebra and numerics
equally strong in one box, without transfering forth and back between commercial codes, which try to be incompatible as possible.
This can be quite frustrating if you work on topics where Calculus, Symbolics and Numerics heavily mix (e.g. Continuum mechanics;
From the symbolic expression to the variational formulation, to the finite element matrix)

rjf

unread,
Nov 30, 2014, 11:14:00 PM11/30/14
to sage-...@googlegroups.com


On Tuesday, November 18, 2014 1:35:21 PM UTC-8, William wrote:
See this interesting document:

   http://www.maplesoft.com/products/maple/compare/HowMapleComparestoMathematica.pdf

Thanks for pointing it out.  For a marketing document it is not too bad, but
it is still a marketing document.  Maybe that's what you want, but from a technical
standpoint it has some issues.
 
It would be valuable to our users (and potential users) if we had a
similar document which explains and *argues* for why we believe our
approach to mathematical software is better than the ones taken by
Mathematica, Magma, Maple, and Matlab.

I think it would be totally confusing to present examples from all those programs
and contrast them with Sage, and all the variants available in Sage.



Some samples from their document: "About 95% of Maple's functionality
is written in the  Maple programming language, and every Maple user
can freely inspect the source code for any of these predefined Maple
library routines. [...]

This is true in principle, but the source code so displayed is generally
not readable because it has been stripped of all comments and frankly
is in a crummy language.
 
In Mathematica, the source code for all the
predefined library routines written in the Mathematica  programming
language is hidden from the user." (*)

When arguing for Maple's language over the Mathematica language, they
say "Functional programs are often opaque; most people,  even
experienced programmers, find functional-style  programs to be
significantly harder to write, read, and  debug."

It would be interesting to learn how the (anonymous?) author came to
hold this opinion. The obscurity of the Mathematica code in the example
has rather little to do with it being in a functional mode, and more of
it involving obscure function names and syntax.  For example,
where Lisp would define a function as

(lambda(x)(+ x 1)

Mathematica programmers COULD write it readably as 
Function[{x}, x+1]

Or they COULD write, 
#+1&

and that lends a certain je ne sais quoi to the so-called "functional" version.

HailstoneFP[n_] :=
 Drop[
 FixedPointList[
 If[# != 1,
 Which[Mod[#, 2] == 0,
 #/2,
 True,
 ( 3*# + 1)
 ],
 1
 ] &, n
 ], -1
 ]

and compared to the crappy Maple version

hailstone := proc( N )
 local n := N, HS := Array();
 HS(1) := n;
 while n > 1 do
 if type(n,even) then
 n := n/2;
 else
 n := 3*n+1;
 end if;
 HS(numelems(HS)+1) := n;
 end do;
 HS;
end proc;

< my cut and paste from pdf has removed the indentation...>
and in lisp it is posted as ..

(defun hailstone (n)
(cond ((= n 1) '(1))
((evenp n) (cons n (hailstone (/ n 2))))
(t (cons n (hailstone (+ (* 3 n) 1))))))

a minor change to this code would allow it to run without using arbitrary stack
space  (so-called tail recursion removal).


(*) We had a specific situation a few years ago where an academic
wrote a package in maple, and a student at UW wanted to write a
similar open source package in Python.  We specifically asked
Maplesoft if the student could look at the source code of Maple, which
is "open" in the sense they list above, then be inspired by it in
writing his own Python code.   They came back and clearly said "no
way; absolutely not!"

I think that you could read your user license, but it looks sort of like
you were asking if it was OK to use their code to reverse-engineer
(part of) their system.  

I have in the past toyed with the idea of duplicating the functionality
of the Maple kernel  (by writing it in Lisp, naturally) and then being
able to run all the Maple-language code on top of it.  Duplicating
the Maple kernel might not actually be so challenging because a
good deal of it is likely to be already in Lisp. Storage management,
list processing, bignums. And writing a parser /interpreter is
generally easy, especially for a simple language like Maple.

It would presumably be a violation of something to share
it with anyone else.

Sage has many packages with duplicative routines, but apparently
disparate treatment of edge problems. The advantage of having
someone with a Wolfram-like ego, plus a majority ownership of the
business, is that he can make a decision without reference to a
Code of Conduct.
RJF


  

William Stein

unread,
Dec 1, 2014, 12:03:39 AM12/1/14
to sage-devel
On Sun, Nov 30, 2014 at 8:14 PM, rjf <fat...@gmail.com> wrote:


On Tuesday, November 18, 2014 1:35:21 PM UTC-8, William wrote:
See this interesting document:

   http://www.maplesoft.com/products/maple/compare/HowMapleComparestoMathematica.pdf

Thanks for pointing it out.  For a marketing document it is not too bad, but
it is still a marketing document.  Maybe that's what you want, but from a technical
standpoint it has some issues.

Definitely a marketing document is what I want.  That's why I explicitly list "potential users" as part of the target audience. 
 
 
It would be valuable to our users (and potential users) if we had a
similar document which explains and *argues* for why we believe our
approach to mathematical software is better than the ones taken by
Mathematica, Magma, Maple, and Matlab.

I think it would be totally confusing to present examples from all those programs
and contrast them with Sage, and all the variants available in Sage.

That's easily solved -- e.g., have four versions, one for each Ma.   A prospective reader would only read one of them.  
 



Some samples from their document: "About 95% of Maple's functionality
is written in the  Maple programming language, and every Maple user
can freely inspect the source code for any of these predefined Maple
library routines. [...]

This is true in principle, but the source code so displayed is generally
not readable because it has been stripped of all comments and frankly
is in a crummy language.

I didn't know they were stripped.  Interested. 
 
 
In Mathematica, the source code for all the
predefined library routines written in the Mathematica  programming
language is hidden from the user." (*)

When arguing for Maple's language over the Mathematica language, they
say "Functional programs are often opaque; most people,  even
experienced programmers, find functional-style  programs to be
significantly harder to write, read, and  debug."

It would be interesting to learn how the (anonymous?) author came to
hold this opinion. The obscurity of the Mathematica code in the example
has rather little to do with it being in a functional mode, and more of
it involving obscure function names and syntax.  For example,
where Lisp would define a function as

(lambda(x)(+ x 1)

Mathematica programmers COULD write it readably as 
Function[{x}, x+1]

Or they COULD write, 
#+1&

and that lends a certain je ne sais quoi to the so-called "functional" version.

:-)
 
(defun hailstone (n)
(cond ((= n 1) '(1))
((evenp n) (cons n (hailstone (/ n 2))))
(t (cons n (hailstone (+ (* 3 n) 1))))))

a minor change to this code would allow it to run without using arbitrary stack
space  (so-called tail recursion removal).

Lisp is so beautiful.   (Seriously; no sarcasm)
 


(*) We had a specific situation a few years ago where an academic
wrote a package in maple, and a student at UW wanted to write a
similar open source package in Python.  We specifically asked
Maplesoft if the student could look at the source code of Maple, which
is "open" in the sense they list above, then be inspired by it in
writing his own Python code.   They came back and clearly said "no
way; absolutely not!"

I think that you could read your user license, but it looks sort of like
you were asking if it was OK to use their code to reverse-engineer
(part of) their system.  

I have in the past toyed with the idea of duplicating the functionality
of the Maple kernel  (by writing it in Lisp, naturally) and then being
able to run all the Maple-language code on top of it.  Duplicating
the Maple kernel might not actually be so challenging because a
good deal of it is likely to be already in Lisp. 
Storage management,
list processing, bignums. And writing a parser /interpreter is
generally easy, especially for a simple language like Maple.

It would presumably be a violation of something to share
it with anyone else.

Didn't you do exactly the above with Mathematica, but were unable to continue because of a cease and desist letter from Wolfram?
 
Sage has many packages with duplicative routines, but apparently
disparate treatment of edge problems. The advantage of having
someone with a Wolfram-like ego, plus a majority ownership of the
business, is that he can make a decision without reference to a
Code of Conduct.

Having 750 fulltime employees is another advantage...

 -- William
 
RJF


  

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.

Dr. David Kirkby (Kirkby Microwave Ltd)

unread,
Dec 1, 2014, 12:27:56 AM12/1/14
to sage-...@googlegroups.com

On 27 Nov 2014 20:51, "maldun" <dom...@gmx.net> wrote:

> I personally a comparison of sage with the other Systems is quite hard, since all of the other 4Ms concentrate more or less
> on particular fields of mathematic (e.g. Matlab focus on numerics, Mathematica more on Calculus etc.)
> Sage is far from perfect but tries to cover all fields at once.

Although I have never tested it myself,  several sources say Mathematica is the best program for symbolic maths. 

But to me at least Mathematica covers a very wide area of mathematics. Inage processing,  control theory,  number theory, numerics, financial etc. I think it tries to cover pretty much everything. 

I believe any attempt to compare the packages would be very difficult and I doubt it is possible to remove personal bias.

It is totally objective to say Sage is free, whereas neither Mathematica or MATLAB are. But just about other comparison else is going to be subjective.

Dave.

William Stein

unread,
Dec 1, 2014, 12:49:11 AM12/1/14
to sage-devel
On Sun, Nov 30, 2014 at 9:27 PM, Dr. David Kirkby (Kirkby Microwave
Ltd) <drki...@kirkbymicrowave.co.uk> wrote:
> On 27 Nov 2014 20:51, "maldun" <dom...@gmx.net> wrote:
>
>> I personally a comparison of sage with the other Systems is quite hard,
>> since all of the other 4Ms concentrate more or less
>> on particular fields of mathematic (e.g. Matlab focus on numerics,
>> Mathematica more on Calculus etc.)
>> Sage is far from perfect but tries to cover all fields at once.
>
> Although I have never tested it myself, several sources say Mathematica is
> the best program for symbolic maths.
>
> But to me at least Mathematica covers a very wide area of mathematics. Inage
> processing, control theory, number theory, numerics, financial etc. I
> think it tries to cover pretty much everything.

Mathematica has weak coverage across much of mathematics related to
algebraic geometry, arithmetic geometry, number theory and group
theory.
In particular, as a specialist in computational number theory, I find
the functionality in mathematica very minimal, compared to what's in
Pari, Magma, and Sage.

> I believe any attempt to compare the packages would be very difficult and

Just because something is very difficult, doesn't mean we shouldn't do it.

> I doubt it is possible to remove personal bias.

I hope nobody expects a marketing document to not contain personal bias.

I'm disappointed that my post suggesting we create a document like
this resulted in nothing of value so far (and that the post on a code
of conduct got so much attention). It's no surprise Sage usage as
defined by "number of monthly active users on http://sagemath.org"
stopped growing in 2011.

Do any of you care? Are you doing anything that will make Sage get
any closer to its mission statement?

-- William
sage-active.png

rjf

unread,
Dec 1, 2014, 1:13:36 AM12/1/14
to sage-...@googlegroups.com


On Sunday, November 30, 2014 9:03:39 PM UTC-8, William wrote:


On Sun, Nov 30, 2014 at 8:14 PM, rjf <fat...@gmail.com> wrote:


On Tuesday, November 18, 2014 1:35:21 PM UTC-8, William wrote:
See this interesting document:

   http://www.maplesoft.com/products/maple/compare/HowMapleComparestoMathematica.pdf

Thanks for pointing it out.  For a marketing document it is not too bad, but
it is still a marketing document.  Maybe that's what you want, but from a technical
standpoint it has some issues.

Definitely a marketing document is what I want.  That's why I explicitly list "potential users" as part of the target audience. 
 
 
It would be valuable to our users (and potential users) if we had a
similar document which explains and *argues* for why we believe our
approach to mathematical software is better than the ones taken by
Mathematica, Magma, Maple, and Matlab.

I think it would be totally confusing to present examples from all those programs
and contrast them with Sage, and all the variants available in Sage.

That's easily solved -- e.g., have four versions, one for each Ma.   A prospective reader would only read one of them.  

But there might be 5 different programs accessible to Sage to do the
same thing.  Maybe there is always one easily identifiable "correct choice"?
But I doubt it.
1.  I implemented the surface language  (since called  "The Wolfram Language")
but hardly the whole system.   My system (a) did numbers differently (b) was
much much faster on polynomial stuff  (c) had an entirely original integration
program (hardly as complete, but with its own particular strengths)
(d) a way different 2-D display, and
(e) was missing entirely:  most of the system, graphics, plotting, etc. 

There was an exchange of letters, but I did not cease or desist.  They
were just making noise, and it was apparent to UC lawyers.

 
Sage has many packages with duplicative routines, but apparently
disparate treatment of edge problems. The advantage of having
someone with a Wolfram-like ego, plus a majority ownership of the
business, is that he can make a decision without reference to a
Code of Conduct.

Having 750 fulltime employees is another advantage...
Many of them marketing droids. 

William Stein

unread,
Dec 1, 2014, 1:21:52 AM12/1/14
to sage-devel
On Sun, Nov 30, 2014 at 10:13 PM, rjf <fat...@gmail.com> wrote:


On Sunday, November 30, 2014 9:03:39 PM UTC-8, William wrote:


On Sun, Nov 30, 2014 at 8:14 PM, rjf <fat...@gmail.com> wrote:


On Tuesday, November 18, 2014 1:35:21 PM UTC-8, William wrote:
See this interesting document:

   http://www.maplesoft.com/products/maple/compare/HowMapleComparestoMathematica.pdf

Thanks for pointing it out.  For a marketing document it is not too bad, but
it is still a marketing document.  Maybe that's what you want, but from a technical
standpoint it has some issues.

Definitely a marketing document is what I want.  That's why I explicitly list "potential users" as part of the target audience. 
 
 
It would be valuable to our users (and potential users) if we had a
similar document which explains and *argues* for why we believe our
approach to mathematical software is better than the ones taken by
Mathematica, Magma, Maple, and Matlab.

I think it would be totally confusing to present examples from all those programs
and contrast them with Sage, and all the variants available in Sage.

That's easily solved -- e.g., have four versions, one for each Ma.   A prospective reader would only read one of them.  

But there might be 5 different programs accessible to Sage to do the
same thing.  Maybe there is always one easily identifiable "correct choice"?
But I doubt it.

Sorry, I was talking about the other side, namely what Sage is being compared with.
With Sage itself there is usually a canonical good way to do something, but I don't expect you 
to understand that since my understanding is that you have never actually used Sage.

 
Sage has many packages with duplicative routines, but apparently
disparate treatment of edge problems. The advantage of having
someone with a Wolfram-like ego, plus a majority ownership of the
business, is that he can make a decision without reference to a
Code of Conduct.

Having 750 fulltime employees is another advantage...
Many of them marketing droids. 


If one wanted to create a marketing document, which is what this thread is about, then having many marketing droids would indeed be an advantage.

William

Nathann Cohen

unread,
Dec 1, 2014, 1:38:21 AM12/1/14
to sage-...@googlegroups.com
Hello !

> Do any of you care? Are you doing anything that will make Sage get
> any closer to its mission statement?

"1) Be friendly and patient." (sorry can't resist)

I would say that most of us are only using Sage for research, and that
we are not the kind of developpers who will fulfull your mission
statement. We would all be happy if we can say one day that "Sage is
the best software to work on <insert your research field here>".

You probably need people here who behave more as teachers than
researchers. There is a wealth of math topics that none of us deals
with, because we are so specialized.

How would you attract teachers here ? How would you convince them that
Sage is THE tool for teaching ? (no mention of research)

Nathann

Jori Mantysalo

unread,
Dec 1, 2014, 1:44:55 AM12/1/14
to sage-...@googlegroups.com
On Mon, 1 Dec 2014, Nathann Cohen wrote:

> How would you attract teachers here ? How would you convince them that
> Sage is THE tool for teaching ? (no mention of research)

1) Whole error reporting should be changed. "1+2+" and "(1+(2+3)" should
give meaningful (and different) error message like "Did you forget closing
parenthesis?", not SyntaxError.

2) Graphical features should have still more visibility.

--
Jori Mäntysalo

William Stein

unread,
Dec 1, 2014, 1:45:13 AM12/1/14
to sage-devel, sage-edu
On Sun, Nov 30, 2014 at 10:38 PM, Nathann Cohen <nathan...@gmail.com> wrote:
> "1) Be friendly and patient." (sorry can't resist)

:-) You're right -- I guess after 10 years, I'm starting to seriously
lose my patience.

> I would say that most of us are only using Sage for research, and that
> we are not the kind of developpers who will fulfull your mission

Good point -- I'm cross posting this to the sage-edu mailing list.

> statement. We would all be happy if we can say one day that "Sage is
> the best software to work on <insert your research field here>".

Unfortunately, Sage is still very, very far from being that in
arithmetic geometry (my field)...

> You probably need people here who behave more as teachers than
> researchers. There is a wealth of math topics that none of us deals
> with, because we are so specialized.

You're right -- we definitely need to encourage way more such people
to get involved with Sage.

> How would you attract teachers here? How would you convince them that
> Sage is THE tool for teaching ? (no mention of research)

Great questions! I could start by being more friendly and patient.

Gregory Bard did a lot this year in that direction though, with his book.

Paul Zimmerman did a huge amount in that direction with the French
book he edited on Sage for undergrad teaching (which was a huge
project).

-- William

>
> Nathann
>
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



Nathann Cohen

unread,
Dec 1, 2014, 2:05:56 AM12/1/14
to sage-...@googlegroups.com, sage-edu
Yo !

> :-) You're right -- I guess after 10 years, I'm starting to seriously lose my
> patience.

I believe that we should be allowed to lose our patience after 10
years. 6 months seems to be a lot already.

> Gregory Bard did a lot this year in that direction though, with his book.
>
>
> Paul Zimmerman did

Paul Zimmerman "and 10 other guys" :-P

> a huge amount in that direction with the French book he edited on Sage for
> undergrad teaching (which was a huge project).

Hmmmmm... Well, the thing is that I am not sure most university teachers care a
lot about the amount of money spent on Maple/Mathematica licenses. Just trying
to ask around how much it costs convinced me that nobody knew.

We will not be convincing if we just come and tell them "come use Sage, it's
almost like Maple !". If it does not make teaching easier for them, we will be
in trouble.

I forgot all I knew of Maple and Matlab. I believe that what we do best (besides
having a 'real' programming language: Python) is create objects that represent
the mathematical notions students use. What about beginning like that ? Looking
at a math book, and make sure that all definitions correspond to some
mathematical object, or a property of such an object ?

Can we even define a function between two sets and ask
"is_bijection/is_surjection", or "is_increasing" or "is_continuous" or
"is_differentiable" ? Can we take the preimage of some set and see if it is
connected ? Can we list saddle points ?

Nathann
> You received this message because you are subscribed to a topic in the
> Google Groups "sage-devel" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sage-devel/x3h4m3LjWkI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

Bruno Grenet

unread,
Dec 1, 2014, 2:46:50 AM12/1/14
to sage-...@googlegroups.com, sage-edu
2014-12-01 7:44 GMT+01:00 William Stein <wst...@gmail.com>:
Paul Zimmerman did a huge amount in that direction with the French
book he edited on Sage for undergrad teaching (which was a huge
project).

That's right. Do you (or any of the authors of this book...) know whether an English/German/Spanish/... translation or a similar project in another language is planned? That could be a good way to show teachers that Sage is well-suited for classes. I guess the number of available books on Maple and Mathematica is a reason for some teachers to choose these languages. To my mind, it would be much more efficient (though maybe more work too) than a marketing document!

Bruno

Nathann Cohen

unread,
Dec 1, 2014, 2:53:06 AM12/1/14
to sage-...@googlegroups.com, sage-edu
Hello !

> That's right. Do you (or any of the authors of this book...) know whether
> an English/German/Spanish/... translation or a similar project in another
> language is planned? That could be a good way to show teachers that Sage is
> well-suited for classes.

Kanappan wanted to work on an english translation at some point, but
there was no news since and he work in Canada nowadays. Not sure that
he has a lot of time for that.

> I guess the number of available books on Maple and
> Mathematica is a reason for some teachers to choose these languages. To my
> mind, it would be much more efficient (though maybe more work too) than a
> marketing document!

The good thing is that we do not even have to chose between the two.

And +1 to Jori's comments about exceptions and visualizations features.

Nathann

Dr. David Kirkby (Kirkby Microwave Ltd)

unread,
Dec 1, 2014, 5:11:35 AM12/1/14
to sage-...@googlegroups.com


On 1 Dec 2014 05:48, "William Stein" <wst...@gmail.com> wrote:

> Mathematica has weak coverage across much of mathematics related to
> algebraic geometry, arithmetic geometry, number theory and group
> theory.
> In particular, as a specialist in computational number theory, I find
> the functionality in mathematica very minimal, compared to what's in
> Pari, Magma, and Sage.

I don't doubt Mathematica has weak areas, but I think the statement that

"... a comparison of sage with the other Systems is quite hard, since all of the other 4Ms concentrate more or less on particular fields of mathematic (e.g. Matlab focus on numerics, Mathematica more on Calculus etc.)


Sage is far from perfect but tries to cover all fields at once."

is inaccurate. 

To me Mathematica, like Sage, tries to cover all fields.  Like Sage it has weak and strong areas.

> > I believe any attempt to compare the packages would be very difficult and
>
> Just because something is very difficult, doesn't mean we shouldn't do it.

True.

> > I doubt it is possible to remove personal bias.
>
> I hope nobody expects a marketing document to not contain personal bias.

In my opion, if it is biased, it is not a good comparison.

> I'm disappointed that my post suggesting we create a document like
> this resulted in nothing of value so far

I am not convinced the thread contains nothing of value.  You suggested something,  and others are saying such a comparison is difficult. 

So how could you objectively compare them?

> Do any of you care?  Are you doing anything that will make Sage get
> any closer to its mission statement?

For many people Sage is a viable alternative. 

For others I doubt it will ever be unless you paid people to address the weak areas, rather than them add code that is needed to address their research interests. 

>  -- William

Dave

mmarco

unread,
Dec 1, 2014, 6:00:48 AM12/1/14
to sage-...@googlegroups.com
Going to concrete proposals, i would create a wiki page where people could start writing small comparisons that they know in concrete cases.

Maybe when we have enough of such material it would be easier to write a nice marketing document.

P.S. I am not sure if such kind of marketing would be legal here. There are some european laws against comparative advertising. Note that i think that Sage, being a non commercial product, would be put to trial for this, but anyways i think it is something worthy of being pointed.

P.S. 2: Is there some easy way to embed sagecell code in a wiki?

Harald Schilly

unread,
Dec 1, 2014, 6:13:27 AM12/1/14
to sage-...@googlegroups.com
On Mon, Dec 1, 2014 at 12:00 PM, mmarco <mma...@unizar.es> wrote:
> There are some european laws against comparative advertising.

I assume this does only apply for actual advertising. Nobody is going
to show those comparisons on TV ;-)

> P.S. 2: Is there some easy way to embed sagecell code in a wiki?

I think so, but I think we should start by collecting informative
examples and then work out how this can be represented. Making the
Sage-part interactive is certainly a neat idea!

Btw, there is also this half-dead sage-marketing mailing list.

-- Harald

Bruno Grenet

unread,
Dec 1, 2014, 9:09:53 AM12/1/14
to sage-...@googlegroups.com

Le 01/12/2014 08:53, Nathann Cohen a écrit :
> Kanappan wanted to work on an english translation at some point, but
> there was no news since and he work in Canada nowadays. Not sure that
> he has a lot of time for that.
>> I guess the number of available books on Maple and
>> Mathematica is a reason for some teachers to choose these languages. To my
>> mind, it would be much more efficient (though maybe more work too) than a
>> marketing document!
> The good thing is that we do not even have to chose between the two.

Of course! As a first step for a translation, we should maybe
investigate to find an appropriate free software to support
collaborative translation. I guess it is a huge work to do it alone, it
is maybe more feasible if we are a group of people working on this.

Yet I now remember the existence Gregory Bard's "Sage for
Undergraduates" that has a similar goal, making a translation of "Calcul
mathématique avec Sage" less needed.

Bruno

Emmanuel Charpentier

unread,
Dec 1, 2014, 10:28:42 AM12/1/14
to sage-...@googlegroups.com

Having read both books, I have to tell that "Sage for undergraduates" aims at the general public of US undergraduates, and (in the opinion of a french dentist (yes !)) gives much less  incentives to understand neither Sage nor mathematics in depth than "Calcul mathématique avec Sage". In other words, "Sage for undergraduates" gives some answers, whereas "Calcul mathématique avec Sage" gives you more questions, which ,IMNSHO, is much more important and rewarding in the long term.

I grab this occasion to suggest to Paul Zimmerman and his crew to (try to) create an epub version of their marvelous book : reading a pdf on a small tablet or a phone is *not* fun... If I knew where to find the *LaTeX* source of this book (converting a PDF isn't worth the work...), I'd try my hand to it.

HTH,

--
Emmanuel Charpentier

Nathann Cohen

unread,
Dec 1, 2014, 10:32:58 AM12/1/14
to Sage devel, Zimmermann Paul
Hello Paul !

> I grab this occasion to suggest to Paul Zimmerman and his crew to (try to)
> create an epub version of their marvelous book : reading a pdf on a small
> tablet or a phone is *not* fun... If I knew where to find the *LaTeX* source
> of this book (converting a PDF isn't worth the work...), I'd try my hand to
> it.

Would you mind if I shared the source with Emmanuel ? He would like to
create an ebook version of the sage book.

Cheers,

Nathann

Nathann Cohen

unread,
Dec 1, 2014, 11:48:37 AM12/1/14
to paul zimmermann, Sage devel, Alexandre CASAMAYOU, Laurent Fousse, Clement...@imag.fr, tdu...@math.univ-lyon1.fr, Francois Maltey, ma...@mezzarobba.net, Matthias Meulien, Nicolas M. Thiery, Guillaume CONNAN, Paul Zimmermann
Okay this does not seem like it will be settled in two mails, so let's
do this off the mailing list ....

Nathann

Vincent Delecroix

unread,
Dec 1, 2014, 3:23:55 PM12/1/14
to sage-...@googlegroups.com, paul zimmermann, Alexandre CASAMAYOU, Laurent Fousse, Clement...@imag.fr, tdu...@math.univ-lyon1.fr, Francois Maltey, ma...@mezzarobba.net, Matthias Meulien, Nicolas M. Thiery, Guillaume CONNAN, Paul Zimmermann
It is open source document... so the sources are on the web (and
advertised on the main webpage http://sagebook.gforge.inria.fr/)

http://dl.lateralis.org/public/sagebook/sagebook-1.0.tar.bz2

Vincent

2014-12-01 17:48 UTC+01:00, Nathann Cohen <nathan...@gmail.com>:
> Okay this does not seem like it will be settled in two mails, so let's
> do this off the mailing list ....
>
> Nathann
>

Emmanuel Charpentier

unread,
Dec 1, 2014, 4:15:06 PM12/1/14
to sage-...@googlegroups.com, Paul.Zi...@inria.fr, alexandre...@netplus.ch, lau...@komite.net, Clement...@imag.fr, tdu...@math.univ-lyon1.fr, fma...@nerim.fr, ma...@mezzarobba.net, oro...@gmail.com, Nicolas...@u-psud.fr, guillaum...@univ-nantes.fr, Paul.Zi...@loria.fr


Le lundi 1 décembre 2014 21:23:55 UTC+1, vdelecroix a écrit :
It is open source document... so the sources are on the web (and
advertised on the main webpage http://sagebook.gforge.inria.fr/)

http://dl.lateralis.org/public/sagebook/sagebook-1.0.tar.bz2

I was aware of this one : it is an old version, dated 2010, and much shorter than the published pne.

I'll use it as a first bench for learning the tricks of epub production.

Jason Grout

unread,
Dec 1, 2014, 9:04:53 PM12/1/14
to sage-...@googlegroups.com
On 12/1/14, 6:00, mmarco wrote:

> P.S. 2: Is there some easy way to embed sagecell code in a wiki?
>

Yes, we have plugins for MoinMoin, Dokuwiki, and Drupal. See the
interact pages at http://wiki.sagemath.org/interact/ for examples of how
to do this on the Sage wiki.

Jason



mmarco

unread,
Dec 2, 2014, 5:23:20 AM12/2/14
to sage-...@googlegroups.com
That is great!. Where are those plugins available?

On a slightly unrelated subject, i could be interested in some way to automatically convert sage worksheets into wiki pages.

maldun

unread,
Dec 2, 2014, 4:43:34 PM12/2/14
to sage-...@googlegroups.com, drki...@kirkbymicrowave.co.uk
The emphasis lies on 'trying' Concerning image processing and control theory matlab is prefered by most with good reason (for reference: I come from these areas)
Since numpy/scipy/matplotlib is on board with Sage, it can easily challenge Mathematica in these areas, since the scipy packages can compare quite good with
Matlab. And I dare say that sage can easily outsmart the symbolic toolbox of Matlab.

On another note: Sage comes with Cython (and of course other possibilities) which is much smarter than MEX from matlab concerning low level programming for fast code.
And I remember well that a colleague of mine switched very fast to Numpy/Cython, because he got sick of MEX files.
A comparison between MEX and Cython would also be a good point.

I suppose some direct use cases where Sage is directly compared to the other 4Ms and shows why it is better suited, would be important to such a comparison.
Some of the formentioned things above are some reasons why at least I prefer Sage over Matlab and Mathematica. 
Maybe it would be a good Idea to collect some more concrete examples?

A short list of other strong points besides the one from above

  1.  The price: Of course
  2. Open
  3. Covers broad functionality
  4. Expandable: It is easy to build Sage packages and expand it's functionality.
  5. The Notebook: It is easy to use, and has very nice typesetting (compared to Mathematica it is far better I think; this could also be in a comparison)
  6. Python: One could always argue about the language itself, but in contrast to the others Sage uses a general purpose language. So it easy to combine Sage with other programs (Ever build standalone Programs with the others?)
  7. Most important Python packages for Math ready to go
  8. A nice community
  9. The price!
  10. ...
Has someone more examples why he/she uses Sage instead of one of the 4Ms? 

Maybe a survey along the users would be also good Idea? This could extend the list,
and maybe would at least be a start.

Harald Schilly

unread,
Dec 2, 2014, 5:21:16 PM12/2/14
to sage-...@googlegroups.com
On Tue, Dec 2, 2014 at 10:43 PM, maldun <dom...@gmx.net> wrote:
> Has someone more examples why he/she uses Sage instead of one of the 4Ms?


in such a list, vendor lock-in is also a good point. imagine mathworks
closes its doors …

-- harald

Eric Gourgoulhon

unread,
Dec 3, 2014, 5:40:06 AM12/3/14
to sage-...@googlegroups.com, drki...@kirkbymicrowave.co.uk
Hi


Le mardi 2 décembre 2014 22:43:34 UTC+1, maldun a écrit :
  1. Python: One could always argue about the language itself, but in contrast to the others Sage uses a general purpose language. So it easy to combine Sage with other programs (Ever build standalone Programs with the others?)
IMHO, this is a very good point in favor of Sage (in addition of being open-source of course!). Especially today, most students are familiar with Python (sometimes this is even the only programming language they know). For instance, in France, since 2 years, Python has been chosen as the mandatory language to learn programming in the math prep schools ("classes préparatoires aux grandes écoles"). This involves 49,000 students (~ 18-20 years old), who are preparing concourses for engineering schools and "grandes écoles" like Ecole Normale Supérieure, in order to become researchers (math, physics, chemistry), teachers or engineers.

Eric.

mmarco

unread,
Dec 3, 2014, 10:40:38 AM12/3/14
to sage-...@googlegroups.com, drki...@kirkbymicrowave.co.uk
I am not sure if it is also available in the M's, or if they have some other system to guide the user to the functions he wants to use, but for me, tab-completion is a great feature in Sage.

Kannappan Sampath

unread,
Dec 4, 2014, 10:17:48 PM12/4/14
to sage-...@googlegroups.com
Hello everybody:

On Mon, Dec 1, 2014 at 2:53 AM, Nathann Cohen <nathan...@gmail.com> wrote:
Hello !

> That's right. Do you (or any of the authors of this book...) know whether
> an English/German/Spanish/... translation or a similar project in another
> language is planned? That could be a good way to show teachers that Sage is
> well-suited for classes.

Kanappan wanted to work on an english translation at some point, but
there was no news since and he work in Canada nowadays. Not sure that
he has a lot of time for that.


I sure would like to contribute something towards that. I am at the moment having a couple of exams and papers to finish writing! I will get around to this surely before my winter term begins... 

It reminds me of how I should figure out how to share the translation I already have...

I have so far been working only on the chapter 9 about polynomials...

--Kannappan.  
> I guess the number of available books on Maple and
> Mathematica is a reason for some teachers to choose these languages. To my
> mind, it would be much more efficient (though maybe more work too) than a
> marketing document!

The good thing is that we do not even have to chose between the two.

And +1 to Jori's comments about exceptions and visualizations features.

Nathann

William Stein

unread,
Dec 5, 2014, 6:58:09 PM12/5/14
to sage-devel
Hi,

Gregory Bard sent me a very nice email comparing his book to the
"Calcul avec Sage" and explaining how the audience for the two books
are related.

William


---------- Forwarded message ----------
From: Gregory Bard <ba...@uwstout.edu>
Date: Fri, Dec 5, 2014 at 3:22 PM
Subject: Re: [sage-devel] Re: Maple versus Mathematica
To: William Stein <wst...@gmail.com>


Hi there. I very much apologize for the late reply. This is the
busiest time of the year for me.

"Calcul avec Sage" is an amazing work. Being for an audience in
France, it is going after the French curriculum. It assumes a level of
sophistication that is equivalent to a certain point in an American
math major's or physics's majors education. Some of the material would
be suitable for Calculus III, Differential Equations, or Discrete
Math, which are very common 200-level courses. The remainder, probably
the majority, is more at the 400-level in our system.

"Sage for Undergraduates" is aiming only a single level lower, at the
Calculus II / Calculus III level. However, the issue is that I was
hoping to meet the needs of students in engineering, finance,
chemistry, and maybe the most mathematical of economics PhD students.
By having a broader audience, that means my book is a full two levels
lower. In other words, a sophomore mathematics major should find my
book "a breeze" but "useful and informative." Perhaps someone from the
nearby disciplines would find my book "challenging but useful."

I think "Calcul avec Sage" would, after translation, be challenging
for an American sophomore math major, suitable for a junior math
major, and extremely handy for a senior math major. Physics majors
would rate the book similarly, perhaps with a slight offset.
Engineering majors would experience some substantial challenges, and
for chemistry and finance, I would upgrade this to "rather
challenging." An economics major would probably be demolished by
"Calcul avec Sage."

Also, my tone is very casual and informal, whereas Calcul is
scholarly, but still very readable. I found the French used in "Calcul
avec Sage" to be very readable and crisp, without the excessive use of
minor subjunctive tenses found in some other French academic writing.
I enjoyed working with that book when writing mine.

An important variable would be the work of Joyner on differential
equations (which is in print, coauthored with Marshall Hampton), and
"Differential Calculus and Sage" (coauthored with William Granville).
Those are books for DiffEq and Calc I, as course textbooks, but using
Sage. That avenue to me seems to be most fruitful. After all, we've
seen the success of Beezer's book on Linear Algebra.

Of course, all this is my opinion. I think I'd like to add another 12
projects to "Sage for Undergraduates" for the second edition, but I
ran out of time---and honestly I kind of ran low on creativity. I
think that the existing projects are high quality, but too few---being
6 or 7 depending on how you count.

By the way, thanks for all your support during the "Sage for
Undergraduates" process. The book would not exist at all without you
and your introducing me to Ina Mette. I am very grateful for your
support.

If I can clarify with more details, please email me!!
---Greg

p.s. Again, apologies for the late reply.


On Mon, Dec 1, 2014 at 8:54 AM, William Stein <wst...@gmail.com> wrote:
> Greg,
>
> Might you have any comments on the relationship in terms of scope of
> your book to Zimmerman et al's "Calcul mathématique avec Sage"? This
> came up in a discussion on sage-devel about translation.

kcrisman

unread,
Dec 5, 2014, 9:01:17 PM12/5/14
to sage-...@googlegroups.com, sage...@googlegroups.com
Thanks for passing Greg's evaluation of this on - that sounds about right.  (sage-edu, see https://groups.google.com/d/msg/sage-devel/x3h4m3LjWkI/gKfpnAijS5UJ )

I do think that more books is a real "selling" point.  Remember how you were contacted about the Use-Sage series...  I will again be road-testing my number theory text (nearly orthogonal to yours, William) this spring, for what it's worth, but I think if we can come up with creative (possibly non-monetary, or not primarily that) incentives to have people write more Sage-enabled texts, it will be key.

Even better would be to find people to write lab manuals for texts that already have significant portions in other languages but that are essentially language-agnostic.  I can think of several I have *used* off the top of my head.   Getting Sage as a 'normal' solution to go along with such texts will be very useful.  (But who will do this?  It will require work that will likely be unrewarded by both tenure committees and publishers.)
Reply all
Reply to author
Forward
0 new messages