most dangerous Sage language flaws

205 views
Skip to first unread message

kro...@uni-math.gwdg.de

unread,
Nov 11, 2013, 6:20:27 PM11/11/13
to sage-...@googlegroups.com
Hello,

which Sage language flaws have the biggest impact for its future?

Are some kind of antidotes known?


Obviously, the environment plays a crucial role, too.

What are the most serious disadvantages of the academic environment
for a project like Sage?


Jack

William Stein

unread,
Nov 11, 2013, 6:28:33 PM11/11/13
to sage-flame
On Mon, Nov 11, 2013 at 3:20 PM, <kro...@uni-math.gwdg.de> wrote:
> Hello,
>
>
>
> which Sage language flaws have the biggest impact for its future?

By "language" do you mean "Python"? Or do you mean "language" in the
broader sense of the Python library you get by doing "import sage"?

> What are the most serious disadvantages of the academic environment
> for a project like Sage?

Lack of money to fund work and lack of academic credit for doing work
on software.

However, no non-academic environment has ever produced any significant
software for my areas of research math (number theory and arithmetic geometry).
There are only three projects that got anywhere in this area -- Magma,
Sage, and Pari --
and they have all been developed in universities.

William

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



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

kro...@uni-math.gwdg.de

unread,
Nov 11, 2013, 7:55:53 PM11/11/13
to sage-...@googlegroups.com

On Mon, Nov 11, 2013 at 3:20 PM,  <kro...@uni-math.gwdg.de> wrote:
> Hello,
>
>
>
> which Sage language flaws have the biggest impact for its future?

By "language" do you mean "Python"?  Or do you mean "language" in the
broader sense of the Python library you get by doing "import sage"?

I mean Python with Sage modifications ('Sage preparser')
 
> What are the most serious disadvantages of the academic environment
> for a project like Sage?

Lack of money to fund work and lack of academic credit for doing work
on software.
I agree. On my list are also:

- high employee turnover rate (causes software maintenance issues)
- lack of experience of some project leaders with software development
- often missing or insufficient evaluation/review of the implementation part and design aspects in the context of a master thesis  or a Ph.D. project.


However, no non-academic environment has ever produced any significant
software for my areas of research math (number theory and arithmetic geometry).
There are only three projects that got anywhere in this area -- Magma,
Sage, and Pari --
and they have all been developed in universities. 

William
 

ok, that are the good news,

but still, the environment-related issues do exist and actions may be taken to lessen their impact.

-- Jack

William Stein

unread,
Nov 11, 2013, 8:09:17 PM11/11/13
to sage-flame
On Mon, Nov 11, 2013 at 4:55 PM, <kro...@uni-math.gwdg.de> wrote:
>
>> On Mon, Nov 11, 2013 at 3:20 PM, <kro...@uni-math.gwdg.de> wrote:
>> > Hello,
>> >
>> >
>> >
>> > which Sage language flaws have the biggest impact for its future?
>>
>> By "language" do you mean "Python"? Or do you mean "language" in the
>> broader sense of the Python library you get by doing "import sage"?
>>
> I mean Python with Sage modifications ('Sage preparser')
>
>>
>> > What are the most serious disadvantages of the academic environment
>> > for a project like Sage?
>>
>> Lack of money to fund work and lack of academic credit for doing work
>> on software.
>
> I agree. On my list are also:
>
> - high employee turnover rate (causes software maintenance issues)

With Sage there are no employees, so that's not a factor.

There are volunteers, and the turnover rate is surely significantly
less than in industry.
I just read something today that said people stay at google around 1.5
years, and microsoft around 4-5 years... but typical Sage developers
contribute for many, many year. Quite a lot of people involved now,
have been involved for 5+ years. Because Sage is open, people can
always stay involved as well -- at least they are available, unlike
with proprietary software, where when you leave the company you cannot
be involved anymore at all, in most cases.

> - lack of experience of some project leaders with software development

If the project were not done in an academic context that could be
replaced by "lack of experience of some project leaders with pure
mathematical research", which would be a much, much more significant
limitation. Software development skills are easier to acquire than a
Ph.D. in mathematical research.

> - often missing or insufficient evaluation/review of the implementation part
> and design aspects in the context of a master thesis or a Ph.D. project.
>
>>
>> However, no non-academic environment has ever produced any significant
>> software for my areas of research math (number theory and arithmetic
>> geometry).
>> There are only three projects that got anywhere in this area -- Magma,
>> Sage, and Pari --
>> and they have all been developed in universities.
>>
>>
>> William
>>
>
>
> ok, that are the good news,
>
> but still, the environment-related issues do exist and actions may be taken
> to lessen their impact.
>
> -- Jack
>

rjf

unread,
Nov 11, 2013, 9:21:54 PM11/11/13
to sage-...@googlegroups.com


On Monday, November 11, 2013 3:20:27 PM UTC-8, kro...@uni-math.gwdg.de wrote:
Hello,

which Sage language flaws have the biggest impact for its future?


How about you list the language flaws and we vote on what we think will
have the biggest impact in the future.
 

Are some kind of antidotes known?

There are presumably some antidotes for some of the flaws.


Obviously, the environment plays a crucial role, too.

Sure, if climate change submerges the west coast of the United States,
some of the contributors will have to move.   Or did you mean something
else?
 

What are the most serious disadvantages of the academic environment
for a project like Sage?


Oh, academic environment.  It is unlikely that someone would write software
to solve problems in pure mathematics for commercial gain. At least not
the second time.



Jack

rjf

unread,
Nov 11, 2013, 9:26:16 PM11/11/13
to sage-...@googlegroups.com


On Monday, November 11, 2013 3:28:33 PM UTC-8, William Stein wrote:
On Mon, Nov 11, 2013 at 3:20 PM,  <kro...@uni-math.gwdg.de> wrote:
> Hello,
>
>
>
> which Sage language flaws have the biggest impact for its future?

By "language" do you mean "Python"?  Or do you mean "language" in the
broader sense of the Python library you get by doing "import sage"?

> What are the most serious disadvantages of the academic environment
> for a project like Sage?

Lack of money to fund work and lack of academic credit for doing work
on software.

I think that the problem is there is no coherent "story" to tell as to why this
work should be supported.  It doesn't (for example) cure cancer or predict
the weather.  It might have some slight connection to security and cryptography
(people always trot that out and keep their fingers crossed).  But basically
it is navel-gazing for people who have spent too many years of their
lives in graduate school.  There is some esthetic appeal, but it is really
rather esoteric.

However, no non-academic environment has ever produced any significant
software for my areas of research math (number theory and arithmetic geometry).
 
I can believe that.
 

rjf

unread,
Nov 11, 2013, 9:36:26 PM11/11/13
to sage-...@googlegroups.com


On Monday, November 11, 2013 5:09:17 PM UTC-8, William Stein wrote:
On Mon, Nov 11, 2013 at 4:55 PM,  <kro...@uni-math.gwdg.de> wrote:
>
>> On Mon, Nov 11, 2013 at 3:20 PM,  <kro...@uni-math.gwdg.de> wrote:
>> > Hello,
>> >
>> >
>> >
>> > which Sage language flaws have the biggest impact for its future?
>>
>> By "language" do you mean "Python"?  Or do you mean "language" in the
>> broader sense of the Python library you get by doing "import sage"?
>>
> I mean Python with Sage modifications ('Sage preparser')
>
>>
>> > What are the most serious disadvantages of the academic environment
>> > for a project like Sage?
>>
>> Lack of money to fund work and lack of academic credit for doing work
>> on software.
>
> I agree. On my list are also:
>
> - high employee turnover rate (causes software maintenance issues)

With Sage there are no employees, so that's not a factor.
You might be surprised by the usefulness of employees (compared to
graduate students or undergrads).  It is possible for universities
to hire employees to work on research projects.

There are volunteers, and the turnover rate is surely significantly
less than in industry.
I just read something today that said people stay at google around 1.5
years, and microsoft around 4-5 years... but typical Sage developers
contribute for many, many year.  Quite a lot of people involved now,
have been involved for 5+ years.   Because Sage is open, people can
always stay involved as well -- at least they are available, unlike
with proprietary software, where when you leave the company you cannot
be involved anymore at all, in most cases.

> - lack of experience of some project leaders with software development
 
I would say that lack of experience of most of the people involved is a
keystone of development of academic software, and a reason why most
of it has to be rewritten, line by line, before being used in a commercial
application that requires robust reliability etc.


If the project were not done in an academic context that could be
replaced by "lack of experience of some project leaders with pure
mathematical research", which would be a much, much more significant
limitation.   Software development skills are easier to acquire than a
Ph.D. in mathematical research.

Unfortunately, people with Ph.Ds in math do not necessarily make good
software designers or programmers.  The Macsyma project at MIT
(1967-82) had considerable experience with this.  Hiring math PhDs
got little to no useful code.  I recall 3 of them.

The Mathematica system was written initially without any Math PhDs,
I think.

> - often missing or insufficient evaluation/review of the implementation part
> and design aspects in the context of a master thesis  or a Ph.D. project.

Welcome to the world of academic computer science.  Why would you
expect a proper evaluation to be done by MATH faculty.

 
RJF
 

William Stein

unread,
Nov 11, 2013, 9:44:03 PM11/11/13
to sage-flame
On Mon, Nov 11, 2013 at 6:36 PM, rjf <fat...@gmail.com> wrote:
> The Mathematica system was written initially without any Math PhDs,
> I think.

This is wrong. Mathematica was initially written by Dan Grayson and
several other serious mathematicians at Urbana-Champaign.

william

Robert Bradshaw

unread,
Nov 12, 2013, 12:59:31 AM11/12/13
to sage-...@googlegroups.com
On Mon, Nov 11, 2013 at 6:21 PM, rjf <fat...@gmail.com> wrote:
>
> On Monday, November 11, 2013 3:20:27 PM UTC-8, kro...@uni-math.gwdg.de
> wrote:
>>
>> Hello,
>>
>> which Sage language flaws have the biggest impact for its future?
>
>
> How about you list the language flaws and we vote on what we think will
> have the biggest impact in the future.

You've seem to have a personal hobby of finding and pointing out Sage
flaws; how about you provide the list :)?

- Robert

rjf

unread,
Nov 12, 2013, 2:14:31 AM11/12/13
to sage-...@googlegroups.com


Mostly not math PhDs.   Here's what I found when I checked.

Online documents that Wolfram was not able to purge from the internet....

Version 1.0 of Mathematica contained code by David Ballman, Henry
Cejtin, Daniel Grayson, Jerry
Keiper, Roman Maeder, Stephen Omohundro and Stephen Wolfram.

Wolfram has a PhD in physics. Caltech
Omohundro has a PhD in physics. Berkeley
Keiper did not have a PhD until 1989  (in Math)
Ballman. No PhD
Maeder, has a PhD in mathematical theory of programming languages, ETH


Grayson, PhD  math MIT
Cejtin, PhD math Northwestern,

Theo Gray.  grad work in chemistry. Berkeley  wrote the first fancy
front end.

So 2 out of 7 had math PhDs.

You might know that most of these authors subsequently sued Wolfram.
They settled  out of court, eventually.
 

rjf

unread,
Nov 12, 2013, 2:17:02 AM11/12/13
to sage-...@googlegroups.com

I didn't start this thread.  You did.  You asked "which Sage language flaws ..."

I don't know for sure what you mean by "language flaw".    Unless you
think that Sage is a language and all its flaws are language flaws.
A notion I think is flawed.
 

- Robert

kro...@uni-math.gwdg.de

unread,
Nov 12, 2013, 5:28:32 AM11/12/13
to sage-...@googlegroups.com
Welcome to the world of academic computer science.  Why would you
expect a proper evaluation to be done by MATH faculty

At least some mathematicians feel capable to advise a master or a Ph.D. student to write
a thesis with significant coding part.
<irony on>So they MUST be experts in computer science<irony off>

Being captious, you 're right.

 If you care, I mean the Python programming language
(http://en.wikipedia.org/wiki/Python_%28programming_language%29)
plus the modifications by the Sage preparser and the Sage coercion model,
I think.



Bill Hart

unread,
Nov 12, 2013, 7:56:22 AM11/12/13
to sage-flame
Dear Jack,

Unlike many computer algebra systems and other mathematical software, Sage uses a standard general purpose language called Python.

According to Tiobe [1], Python is an Grade A language whose popularity on the web is about 3.1%, down  nearly 1% in the last year.

According to the Computer Language Benchmarks game [2], Python performs poorly on most of its benchmarks, being up to a few hundred times slower than native C.

The known drawbacks of Python include:

* Python is very slow
* Due to something known as the Global Interpreter Lock (GIL), threading in Python is essentially useless
* As it is dynamically typed, errors that are usually caught at compile time by a statically typed language are not caught until run time
* Lack of nonlocal variable support in Python 2
* Problems with lexical scoping in Python 2
* Lambdas must be expressions
* Python is not homoiconic (the data types defining its AST are not part of the language and moreover the AST is not standardised -- though you can eval strings)
* Python 2.x and 3.x are incompatible and many projects have not switched
* The language is defined by an implementation, not a comprehensive, standardised spec
* No tail-call optimisation
* Monkey-patching (it's possible to reach in and modify how things work at runtime); also seen as a feature
* "Python is a very big hammer, now everything looks like a nail" mentality
* Cumbersome metaprogramming
* Restrictive (there is usually only one way to do things)

Of course, every drawback of Python is either also a feature, or makes some other benefit of the language possible. And a similar list of drawbacks can be made for any language (yes, even Lisp and Haskell).

Now to your more important question. How to mitigate the language flaws in Sage. In order of the above drawbacks:

* Write performance critical code in C or Cython [3]
* Use process based concurrency
* Spend more programmer resources writing code which checks types on entry to a function and writing thorough test code
* Upgrade to Python 3.x or don't be so picky
* Upgrade to Python 3.x or don't be so picky
* Suffer along without decent lambdas
* Suffer along with the ast module
* Pretend either Python 2.x or 3.x doesn't exist
* Use CPython only and pretend PyPy [4] and other implementations of Python don't exist
* Don't program in a functional way, use iteration, not recursion for critical things
* Don't monkey-patch
* Use Python only for what it is good at
* Lower your expectations, don't learn Lisp, Haskell, D, Julia, etc., don't write internal DSL's
* Don't try to be too creative, and learn to appreciate what the Benevolent Dictator has blessed

Hope this helps.

Yours Sincerely,

Bill.

[2] http://benchmarksgame.alioth.debian.org/ (currently inaccessible)


--

Robert Bradshaw

unread,
Nov 12, 2013, 11:16:10 AM11/12/13
to sage-...@googlegroups.com
On Mon, Nov 11, 2013 at 11:17 PM, rjf <fat...@gmail.com> wrote:
>
>
> On Monday, November 11, 2013 9:59:31 PM UTC-8, robertwb wrote:
>>
>> On Mon, Nov 11, 2013 at 6:21 PM, rjf <fat...@gmail.com> wrote:
>> >
>> > On Monday, November 11, 2013 3:20:27 PM UTC-8, kro...@uni-math.gwdg.de
>> > wrote:
>> >>
>> >> Hello,
>> >>
>> >> which Sage language flaws have the biggest impact for its future?
>> >
>> >
>> > How about you list the language flaws and we vote on what we think will
>> > have the biggest impact in the future.
>>
>> You've seem to have a personal hobby of finding and pointing out Sage
>> flaws; how about you provide the list :)?
>
>
> I didn't start this thread. You did. You asked "which Sage language flaws
> ..."

I did?

> I don't know for sure what you mean by "language flaw". Unless you
> think that Sage is a language and all its flaws are language flaws.
> A notion I think is flawed.

I, honestly, had a hard time understanding the question as well. The
drawbacks (tradeoffs) of Python are well documented; the Sage
preprocessor adds little but could be seen as a wart in some ways.

- Robert

rjf

unread,
Nov 12, 2013, 11:38:53 AM11/12/13
to sage-...@googlegroups.com


On Tuesday, November 12, 2013 8:16:10 AM UTC-8, robertwb wrote:

>
> I didn't start this thread.  You did.  You asked "which Sage language flaws
> ..."

I did?

Oops.  Not you. some other guy.
 

> I don't know for sure what you mean by "language flaw".    Unless you
> think that Sage is a language and all its flaws are language flaws.
> A notion I think is flawed.

I, honestly, had a hard time understanding the question as well. The
drawbacks (tradeoffs) of Python are well documented; the Sage
preprocessor adds little but could be seen as a wart in some ways.

To provide some semblance of an answer different from Bill Hart's
notes, I am by no means an expert on what Sage's pre-processor +Python
means as a language.  But

I get the distinct feeling that the last 50 years or so of research in the
general area of design of programming languages for the mechanization
of mathematics has been ignored in the Sage design.   For example,
was Sage influenced at all by the Axiom experience? Or work
at Berkeley, MIT, Cornell for that matter, on approaches to merging programming
languages and mathematical specification and algorithms?

I do not recall reading any technical articles on Sage design.  Just
the promotional literature on GPL, Python is great, and the goal to be the free
alternative to programs which are not free  (implicitly duplicating the ones that
are free...)

But maybe there are?  A paper showing how Sage exceeds Axiom (for example)
in cleverness or efficiency or something?

RJF



Richard
 

- Robert

Robert Bradshaw

unread,
Nov 12, 2013, 5:11:31 PM11/12/13
to sage-...@googlegroups.com
On Tue, Nov 12, 2013 at 8:38 AM, rjf <fat...@gmail.com> wrote:
>
>
> On Tuesday, November 12, 2013 8:16:10 AM UTC-8, robertwb wrote:
>>
>>
>> >
>> > I didn't start this thread. You did. You asked "which Sage language
>> > flaws
>> > ..."
>>
>> I did?
>
>
> Oops. Not you. some other guy.
>
>>
>>
>> > I don't know for sure what you mean by "language flaw". Unless you
>> > think that Sage is a language and all its flaws are language flaws.
>> > A notion I think is flawed.
>>
>> I, honestly, had a hard time understanding the question as well. The
>> drawbacks (tradeoffs) of Python are well documented; the Sage
>> preprocessor adds little but could be seen as a wart in some ways.
>
>
> To provide some semblance of an answer different from Bill Hart's
> notes, I am by no means an expert on what Sage's pre-processor +Python
> means as a language. But
>
> I get the distinct feeling that the last 50 years or so of research in the
> general area of design of programming languages for the mechanization
> of mathematics has been ignored in the Sage design. For example,
> was Sage influenced at all by the Axiom experience? Or work
> at Berkeley, MIT, Cornell for that matter, on approaches to merging
> programming
> languages and mathematical specification and algorithms?

William made the initial choice of explicitly *not* trying to design a
new programming language for Sage. I'd call this respect for the last
50 years of programing language design rather than disregard.

> I do not recall reading any technical articles on Sage design. Just
> the promotional literature on GPL, Python is great, and the goal to be the
> free
> alternative to programs which are not free (implicitly duplicating the ones
> that
> are free...)
>
> But maybe there are? A paper showing how Sage exceeds Axiom (for example)
> in cleverness or efficiency or something?

Number of contributors? Or even number of users? That's certainly not
the only (or best) metric, but it's quite a relevant and quantifiable
one.

- Robert

William Stein

unread,
Nov 12, 2013, 5:16:04 PM11/12/13
to sage-flame
I wonder how Sage compares to Axiom in "number of flame wars"?

-- William

kro...@uni-math.gwdg.de

unread,
Nov 12, 2013, 5:33:57 PM11/12/13
to sage-...@googlegroups.com
But maybe there are?  A paper showing how Sage exceeds Axiom (for example)
in cleverness or efficiency or something?

RJF


I can't say much about articles about comparison of Sage with other CAS
and although there are several objections to use Python as a basis for a CAS,
I must admit, piggybacking on Python versus developing a special-purpose language is not too bad:

As fas as I know ( I'm not a regular or experienced Sage user),
 the main reason to choose Python was not to pick a language with matches
certain mathematical needs very well,

but
- (1)one that is good at gluing together  distinct systems (reuse existing code base)
      (allowes usage of specialized languages if needed and then glueing everything together)
- (2)has a good productivity due to a
    - a nice syntax ( even if still unnatural  for mathematicians )
    - short development cycle (rapid turnaround after program changes).
    - myriad  existing API's for common tasks
   (3) not perfect but (in my opinion )by far more mature in comparison to many (or most) other existing free CAS using special-purpose programming languages
        (also due to :  being a mainstream language; having a much bigger user base and more potential/resources for language development )


now we are almost offtopic and I'm supporting Sage instead of bashing it....

rjf

unread,
Nov 12, 2013, 5:50:18 PM11/12/13
to sage-...@googlegroups.com


On Tuesday, November 12, 2013 2:16:04 PM UTC-8, William Stein wrote:
On Tue, Nov 12, 2013 at 2:11 PM, Robert Bradshaw <robe...@gmail.com> wrote:
>
>>
RWB said..
>
> William made the initial choice of explicitly *not* trying to design a
> new programming language for Sage. I'd call this respect for the last
> 50 years of programing language design rather than disregard.

Does WS agree?  It seems to me that there is sufficient evidence that Python
has difficulties expressing certain mathematical ideas.  Just look at the google
groups posts.  Is Python nevertheless  the best so far?  I suppose someone could
try to write a paper on that topic.  If none has ever been written --  i.e. no one
has bothered to compare Python and its effectiveness to alternatives, then
that's certainly a demerit in the column of Sage boosters.
>
>> I do not recall reading any technical articles on Sage design.  Just
>> the promotional literature on GPL, Python is great, and the goal to be the
>> free
>> alternative to programs which are not free  (implicitly duplicating the ones
>> that
>> are free...)
>>
>> But maybe there are?  A paper showing how Sage exceeds Axiom (for example)
>> in cleverness or efficiency or something?

I guess there are no such papers known to RWB or WS, so probably no
such papers at all.  So the prevailing design was "I don't know much
about these computer algebra systems and don't need to know more
about them because GPL Python Cython is great.  LALALALALA {need to
cover your ears as you shout this last part}.
 
>
> Number of contributors? Or even number of users? That's certainly not
> the only (or best) metric, but it's quite a relevant and quantifiable
> one.

How about number of forks?  Axiom has two.  (FriCAS being the other).
How about budget?  You know that Axiom was supported for quite some
time as ScratchPad, by IBM, and then (unsuccessfully) spun out commercially.

I suspect that Sage is substantially inferior to Maxima by the metrics you
suggest because  (a) every Sage installation includes Maxima so Maxima
user-count strictly dominates.  (b) Even so, there are probably an extra 100,000
Maxima downloads/users. (c) Contributors? dunno how to count, but there might be
some weighting factor so as to consider size or importance or correctness
of contribution. Or <what the heck>  whether the contributor has a PhD.


Now I am aware of difficulties that people have had with Axiom, and I suspect
that Sage shares a bunch of those issues.  And then there are difficulties
that are distinct for each.  Someone who cares about this might
get a paper published on the topic.


 

I wonder how Sage compares to Axiom in "number of flame wars"?

I am not aware of anyone running a forked Sage project, but maybe there is
one?

RJF
 

William Stein

unread,
Nov 12, 2013, 6:38:31 PM11/12/13
to sage-flame
On Tue, Nov 12, 2013 at 2:50 PM, rjf <fat...@gmail.com> wrote:
>
>
> On Tuesday, November 12, 2013 2:16:04 PM UTC-8, William Stein wrote:
>>
>> On Tue, Nov 12, 2013 at 2:11 PM, Robert Bradshaw <robe...@gmail.com>
>> wrote:
>> >
>> >>
>
> RWB said..
>>
>> >
>> > William made the initial choice of explicitly *not* trying to design a
>> > new programming language for Sage. I'd call this respect for the last
>> > 50 years of programing language design rather than disregard.
>
>
> Does WS agree?

Yes, I agree that I chose Python so that I would not have to design a
new programming language for Sage.
I considered a large number of mainstream programming languages. The
minimal criteria were:

(1) possible to extend at C speed,
(2) similar to the Magma programming language.

The initial goal of the project was to provide a better alternative to
Magma for current and prospective users of Magma. Python satisfies 1,
and was certainly the mainstream language most similar to Magma at the
time, and still is as far as I can tell. I did look a large number of
other languages, but many were either very significantly different
than Magma or couldn't be extended at C speed.

> It seems to me that there is sufficient evidence that Python
> has difficulties expressing certain mathematical ideas.

Python is very good for *everything* mathematical that I do, and I
really like it.

Python is basically a nonstarter for some of the non-mathematical
programming I do (which is quite a lot), so I don't use Python for
that (instead I use Node.js).

> Just look at the
> google
> groups posts. Is Python nevertheless the best so far? I suppose someone

Yes. I don't have the slightest regret about choosing Python for the
Sage project.

I *do* regret choosing Mercurial instead of Git though.

> could
> try to write a paper on that topic. If none has ever been written -- i.e.
> no one
> has bothered to compare Python and its effectiveness to alternatives, then
> that's certainly a demerit in the column of Sage boosters.

It's one thing to compare Python, and another thing to actually
*publish* a paper about such a thing. I would get absolutely no
credit academically for publishing such a paper, since I'm in a
mathematics department, as are most other Sage developers. For
better or worse, many mathematicians would look at writing papers such
as that as a waste of time, so there isn't much incentive for us to
write such things and publish them.

But when people implement things they do actually bother to make
comparisons. For example, here's what some of my students did in 2008
when starting on graph theory: http://wiki.sagemath.org/graph_survey
Honestly, none of us even considered for a moment to actually
*publish a paper* comparing software for graph theory. That just
seems absurd from the perspective of mathematics, where we appreciate
and publish work with actual lasting meaning.

>> >> But maybe there are? A paper showing how Sage exceeds Axiom (for
>> >> example)
>> >> in cleverness or efficiency or something?

I've never heard of any mathematician in number theory or arithmetic
geometry who is an Axiom user, at least in the last decade. I've
never heard of Axiom doing really anything of use in my area of math.
So it would have to be written by somebody else in some area of
mathematical research where Axiom has made contributions.

That said, again writing a paper that "shows Sage exceeds Axiom in
efficiency" would be a waste of my time, given how mathematical
researchers (such as I) are evaluated, and also given all of my goals
in life. Making a wiki page, or something like that, would be
worth doing, but an actual paper? Pointless.

> I guess there are no such papers known to RWB or WS, so probably no
> such papers at all. So the prevailing design was "I don't know much
> about these computer algebra systems and don't need to know more
> about them because GPL Python Cython is great.

Just because I and others don't waste valuable time publishing papers
that we will get no credit for and that will in no way advance any of
our goals doesn't imply ignorance. That you (RJF) admit to having
never used Sage does imply ignorance.

>> > Number of contributors? Or even number of users? That's certainly not
>> > the only (or best) metric, but it's quite a relevant and quantifiable
>> > one.
>
>
> How about number of forks? Axiom has two. (FriCAS being the other).
> How about budget? You know that Axiom was supported for quite some
> time as ScratchPad, by IBM, and then (unsuccessfully) spun out commercially.
>
> I suspect that Sage is substantially inferior to Maxima by the metrics you
> suggest because (a) every Sage installation includes Maxima so Maxima
> user-count strictly dominates. (b) Even so, there are probably an extra
> 100,000
> Maxima downloads/users. (c) Contributors? dunno how to count, but there
> might be
> some weighting factor so as to consider size or importance or correctness
> of contribution. Or <what the heck> whether the contributor has a PhD.

The only metric that matters is the extent to which Sage helps people
solve their problems, and also how responsive the community is to
helping people with trouble. For example see the publication list,
which shows that Sage has been used to solve problems:

http://sagemath.org/library-publications.html

And see the mailing lists and http://ask.sagemath.org to see that
there is a supportive community.

It doesn't matter at all to me if Sage is "better" or "worse" than
Axiom in terms of some random metric. What does matter is that Sage
provides value to users.

USER: I want to solve problem X.

For many, many interesting values of X, Sage can be effectively used
by people to solve problem X.
This is what matters. And the only X's that matter are the ones
people genuinely care about.

> I am not aware of anyone running a forked Sage project, but maybe there is
> one?

I'm pleased to report that nobody has tried to fork the Sage project.
One of the main attractions of the Sage project is that it technically
and socially unifies and bring together a bunch of math software
projects (GAP, PARI, Singular, etc.) that might not collaborate at all
otherwise. Because people are drawn to Sage due to its spirit of
cooperation and collaboration, it's not the sort of project that would
be likely to get forked (in the sense of Axiom/Fricas -- I don't mean
in the sense of "fork me on github").

-- William

Robert Bradshaw

unread,
Nov 12, 2013, 7:10:28 PM11/12/13
to sage-...@googlegroups.com
On Tue, Nov 12, 2013 at 2:50 PM, rjf <fat...@gmail.com> wrote:
>
> On Tuesday, November 12, 2013 2:16:04 PM UTC-8, William Stein wrote:
>>
>> On Tue, Nov 12, 2013 at 2:11 PM, Robert Bradshaw <robe...@gmail.com>
>> wrote:
>> >
>> >>
>
> RWB said..
>>
>> >
>> > William made the initial choice of explicitly *not* trying to design a
>> > new programming language for Sage. I'd call this respect for the last
>> > 50 years of programing language design rather than disregard.
>
>
> Does WS agree? It seems to me that there is sufficient evidence that Python
> has difficulties expressing certain mathematical ideas. Just look at the
> google groups posts.

There are difficulties expressing certain mathematical ideas on
computers period.

> Is Python nevertheless the best so far? I suppose someone
> could
> try to write a paper on that topic. If none has ever been written -- i.e.
> no one
> has bothered to compare Python and its effectiveness to alternatives, then
> that's certainly a demerit in the column of Sage boosters.
>
>> >> I do not recall reading any technical articles on Sage design. Just
>> >> the promotional literature on GPL, Python is great, and the goal to be
>> >> the
>> >> free
>> >> alternative to programs which are not free (implicitly duplicating the
>> >> ones
>> >> that
>> >> are free...)
>> >>
>> >> But maybe there are? A paper showing how Sage exceeds Axiom (for
>> >> example)
>> >> in cleverness or efficiency or something?
>
>
> I guess there are no such papers known to RWB or WS, so probably no
> such papers at all. So the prevailing design was "I don't know much
> about these computer algebra systems and don't need to know more
> about them because GPL Python Cython is great. LALALALALA {need to
> cover your ears as you shout this last part}.

"X is teh best language" is lends itself better to sage-flame than
academic journals. Especially math journals.

Though not all languages are created equal, and have different
strengths in for different applications, it's a highly subjective
question.

- Robert

rjf

unread,
Nov 12, 2013, 11:02:30 PM11/12/13
to sage-...@googlegroups.com


On Tuesday, November 12, 2013 3:38:31 PM UTC-8, William Stein wrote:
On Tue, Nov 12, 2013 at 2:50 PM, rjf <fat...@gmail.com> wrote:
>
>
> On Tuesday, November 12, 2013 2:16:04 PM UTC-8, William Stein wrote:
>>
>> On Tue, Nov 12, 2013 at 2:11 PM, Robert Bradshaw <robe...@gmail.com>
>> wrote:
>> >
>> >>
>
> RWB said..
>>
>> >
>> > William made the initial choice of explicitly *not* trying to design a
>> > new programming language for Sage. I'd call this respect for the last
>> > 50 years of programing language design rather than disregard.
>
>
> Does WS agree?

Yes, I agree that I chose Python so that I would not have to design a
new programming language for Sage.
I considered a large number of mainstream programming languages.  The
minimal criteria were:

   (1) possible to extend at C speed,
   (2) similar to the Magma programming language.

But Magma is not a mainstream programming language.  Is it possible
that the Magma designers missed the boat on language design?
 

The initial goal of the project was to provide a better alternative to
Magma for current and prospective users of Magma.  Python satisfies 1,
and was certainly the mainstream language most similar to Magma at the
time, and still is as far as I can tell.  I did look a large number of
other languages, but many were either very significantly different
than Magma or couldn't be extended at C speed.

Eh, insisting that a programming language
can be extended at C speed leave a LOT of languages in the running.

>  It seems to me that there is sufficient evidence that Python
> has difficulties expressing certain mathematical ideas.

Python is very good for *everything* mathematical that I do, and I
really like it.

Do you read the complaints from people who have difficulties understanding
why their computations go haywire?
 

Python is basically a nonstarter for some of the non-mathematical
programming I do (which is quite a lot), so I don't use Python for
that (instead I use Node.js).

That's unfortunate.
 

> Just look at the
> google
> groups posts.  Is Python nevertheless  the best so far?  I suppose someone

Yes.  I don't have the slightest regret about choosing Python for the
Sage project.

I wonder if that sentiment is universal.

I *do* regret choosing Mercurial instead of Git though.

> could
> try to write a paper on that topic.  If none has ever been written --  i.e.
> no one
> has bothered to compare Python and its effectiveness to alternatives, then
> that's certainly a demerit in the column of Sage boosters.

It's one thing to compare Python, and another thing to actually
*publish* a paper about such a thing.   I would get absolutely no
credit academically for publishing such a paper, since I'm in a
mathematics department, as are most other Sage developers.

I have at several times written letters of recommendation for tenure or promotion
of mathematics professors based on their contributions to computer programs
to assist in mathematical tasks.    Mathematicians who write programs that
no one else uses should get equal credit for writing papers that no one reads.
Mathematicians who write programs that are widely used can have significant
impact.

 
  For
better or worse, many mathematicians would look at writing papers such
as that as a waste of time, so there isn't much incentive for us to
write such things and publish them.
For better or worse, some mathematicians are jerks, as you no doubt
are well aware.   But that goes for other academic disciplines too.

  It is unfortunate if people in power
are jerks, and that can happen too.  Of course most mathematicians
have very little power.
 

But when people implement things they do actually bother to make
comparisons.  For example, here's what some of my students did in 2008
when starting on graph theory:  http://wiki.sagemath.org/graph_survey
     Honestly, none of us even considered for a moment to actually
*publish a paper* comparing software for graph theory.  
Really?  How sad.  You learn things ,  you write them up, and because you think
you deserve no credit for it, you don't tell anybody?  Unless they happen to
stumble over it perhaps?  So that other people can rediscover the same things?


That just
seems absurd from the perspective of mathematics, where we appreciate
and publish work with actual lasting meaning.
 
HAHAHAHAHA  .   Look at the historical record of how many papers are
ever referred to by anyone else.  How many journals are ever taken
off the shelf in the library?
 
Take a distinguished mathematics journal of the past, and see what
percentage of the papers have actual lasting value. 
Mathematische Zeitschrift, for example.


>> >> But maybe there are?  A paper showing how Sage exceeds Axiom (for
>> >> example)
>> >> in cleverness or efficiency or something?

I've never heard of any mathematician in number theory or arithmetic
geometry who is an Axiom user, at least in the last decade.
 
Oh, small world.
 I've
never heard of Axiom doing really anything of use in my area of math.
 
So therefore it must not be comparable to Sage?  If Sage does only things
in your area of math, that would be a more relevant statement.

So it would have to be written by somebody else in some area of
mathematical research where Axiom has made contributions.

Maybe it wouldn't be mathematical research at all, but physics,
biology, chemistry, engineering ...

That said, again writing a paper that "shows Sage exceeds Axiom in
efficiency" would be a waste of my time, given how mathematical
researchers (such as I) are evaluated, and also given all of my goals
in life.  

I would not find it interesting if you were to compare Sage's
imitation of Magma to Axiom's comparable functionality.  If Axiom even
has such functionality.

 
  Making a wiki page, or something like that, would be
worth doing, but an actual paper?   Pointless.

huh, I guess the papers I see,  Actual Papers, may represent something rather
less useful than online papers, at least for my purposes.
 
> I guess there are no such papers known to RWB or WS, so probably no
> such papers at all.  So the prevailing design was "I don't know much
> about these computer algebra systems and don't need to know more
> about them because GPL Python Cython is great.

Just because I and others don't waste valuable time publishing papers
that we will get no credit for and that will in no way advance any of
our goals doesn't imply ignorance.  That you (RJF) admit to having
never used Sage does imply ignorance.

Do you have any statistics as to how many uses of Sage (say the web version)
end up running in Maxima?  If there are a lot, I would say that the Sage fans
who are ignorant of Maxima implementation are to that extent ignorant of Sage.


>> > Number of contributors? Or even number of users? That's certainly not
>> > the only (or best) metric, but it's quite a relevant and quantifiable
>> > one.
>
>
> How about number of forks?  Axiom has two.  (FriCAS being the other).
> How about budget?  You know that Axiom was supported for quite some
> time as ScratchPad, by IBM, and then (unsuccessfully) spun out commercially.
>
> I suspect that Sage is substantially inferior to Maxima by the metrics you
> suggest because  (a) every Sage installation includes Maxima so Maxima
> user-count strictly dominates.  (b) Even so, there are probably an extra
> 100,000
> Maxima downloads/users. (c) Contributors? dunno how to count, but there
> might be
> some weighting factor so as to consider size or importance or correctness
> of contribution. Or <what the heck>  whether the contributor has a PhD.

The only metric that matters is the extent to which Sage helps people
solve their problems,

Actually, you seem to believe that the only metric that matters is the extent to
which Sage helps solve your own problems, one of which is that you dislike
Magma's licensing and price.  Paying for a computer program seems to have
rather little, practically speaking, as to whether it can be used for
mathematical discovery,

and also how responsive the community is to
helping people with trouble.  
Yeah, when people post some bugs they find in Sage, they get re-posted in the
Maxima mailing list.

For example see the publication list,
which shows that Sage has been used to solve problems:

   http://sagemath.org/library-publications.html

oo oo.  A google search for Macsyma gives 109,000 hits.
a search for   Maxima -nissan algebra computer
gives 171,000 hits.

sage computer system -defense algebra -spice  gives
217,000 hits.

Is this all more or less relevant than your list of a few hundred
probably obscure journal articles?  Depends on what you are
looking for, I guess.


And see the mailing lists and http://ask.sagemath.org to see that
there is a supportive community.

It doesn't matter at all to me if Sage is "better" or "worse" than
Axiom in terms of some random metric.   What does matter is that Sage
provides value to users.

That is an interesting populist sentiment, but hard to measure.

USER: I want to solve problem X.

For many, many interesting values of X, Sage can be effectively used
by people to solve problem X.

Again, the metric depends on who defines "interesting".   Is Sage ever
used to solve UNinteresting problems? 
 
This is what matters.   And the only X's that matter are the ones
people genuinely care about.

You know, I suppose, that the X's that matter to many computer users
is XXX,  not X the unknown.

> I am not aware of anyone running a forked Sage project, but maybe there is
> one?

I'm pleased to report that nobody has tried to fork the Sage project.

How would you know?  Maybe the NSA has one.
 

Richard Fateman

unread,
Nov 12, 2013, 2:11:25 AM11/12/13
to sage-...@googlegroups.com

William Stein

unread,
Nov 15, 2013, 11:41:43 AM11/15/13
to sage-flame
On Tue, Nov 12, 2013 at 2:33 PM, <kro...@uni-math.gwdg.de> wrote:
>> But maybe there are? A paper showing how Sage exceeds Axiom (for example)
>> in cleverness or efficiency or something?
>>
>> RJF
>
>
>
> I can't say much about articles about comparison of Sage with other CAS
> and although there are several objections to use Python as a basis for a
> CAS,
> I must admit, piggybacking on Python versus developing a special-purpose
> language is not too bad:
>
> As fas as I know ( I'm not a regular or experienced Sage user),
> the main reason to choose Python was not to pick a language with matches
> certain mathematical needs very well,
>
> but
> - (1)one that is good at gluing together distinct systems (reuse existing
> code base)
> (allowes usage of specialized languages if needed and then glueing
> everything together)

I'm 100% responsible for choosing Python for Sage, and (1) was not a
significant factor in my choice. At the time, I chose Python, I was
also planning to not depend much on existing third party math
libraries, but instead to write everything "from scratch", based on
looking at their code, etc. That approach didn't last long, since I
don't have infinite time to waste.

> - (2)has a good productivity due to a
> - a nice syntax ( even if still unnatural for mathematicians )
> - short development cycle (rapid turnaround after program changes).
> - myriad existing API's for common tasks

Mostly true, though I did not (and do not) at all think that the
syntax of Python is particularly "unnatural for mathematicians".

> (3) not perfect but (in my opinion )by far more mature in comparison to
> many (or most) other existing free CAS using special-purpose programming
> languages
> (also due to : being a mainstream language; having a much bigger
> user base and more potential/resources for language development )

Yes. More to the point, with Magma when I suggested obvious language
improvements the response was often -- we have a lot of trouble
getting funding for that, instead we have funding to implement
mathematical algorithms, sorry. I figured I would run into the same
problem as a mathematician. (I should say that Magma has somehow got
funding for such things, since their language has improved a lot in
the last 15 years.)

> now we are almost offtopic and I'm supporting Sage instead of bashing it....

Take this to sage-devel! :-)

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



Reply all
Reply to author
Forward
0 new messages