> 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&/@!
>
> lM = Map[If[# == 0, 0, 1] &, M[[2]][[#[[2]] & /@ M[[3]], #[[2]] & /@
> M[[4]]]], {2}];
Holy f*2}];ng s&/@!
- 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.
>
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
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.
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.
>
> 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?
> 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; or2) It will be fixed
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."
(defun hailstone (n) | |
(cond ((= n 1) '(1)) | |
((evenp n) (cons n (hailstone (/ n 2)))) | |
(t (cons n (hailstone (+ (* 3 n) 1)))))) | |
(*) 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!"
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, butit is still a marketing document. Maybe that's what you want, but from a technicalstandpoint 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 programsand 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 generallynot readable because it has been stripped of all comments and franklyis 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 tohold this opinion. The obscurity of the Mathematica code in the examplehas rather little to do with it being in a functional mode, and more ofit 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 asFunction[{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 stackspace (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 likeyou 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 functionalityof the Maple kernel (by writing it in Lisp, naturally) and then beingable to run all the Maple-language code on top of it. Duplicatingthe Maple kernel might not actually be so challenging because agood deal of it is likely to be already in Lisp.
Storage management,list processing, bignums. And writing a parser /interpreter isgenerally easy, especially for a simple language like Maple.It would presumably be a violation of something to shareit with anyone else.
Sage has many packages with duplicative routines, but apparentlydisparate treatment of edge problems. The advantage of havingsomeone with a Wolfram-like ego, plus a majority ownership of thebusiness, is that he can make a decision without reference to aCode of Conduct.
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.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
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.
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, butit is still a marketing document. Maybe that's what you want, but from a technicalstandpoint 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 programsand 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.
Sage has many packages with duplicative routines, but apparentlydisparate treatment of edge problems. The advantage of havingsomeone with a Wolfram-like ego, plus a majority ownership of thebusiness, is that he can make a decision without reference to aCode of Conduct.Having 750 fulltime employees is another advantage...
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, butit is still a marketing document. Maybe that's what you want, but from a technicalstandpoint 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 programsand 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 thesame thing. Maybe there is always one easily identifiable "correct choice"?But I doubt it.
Sage has many packages with duplicative routines, but apparentlydisparate treatment of edge problems. The advantage of havingsomeone with a Wolfram-like ego, plus a majority ownership of thebusiness, is that he can make a decision without reference to aCode of Conduct.Having 750 fulltime employees is another advantage...Many of them marketing droids.
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).
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
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
- 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?)
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