Hacker News new | past | comments | ask | show | jobs | submit login
SageMath – Open-Source Mathematical Software System (sagemath.org)
380 points by gnramires on June 13, 2020 | hide | past | favorite | 74 comments



I'm a huge fan of SAGE! I keep using it to discover new math. I generally play with the associate Sage module of any algebraic structure to get a real feel for what is going on. Some examples of:

1. Grobner basis: http://bollu.github.io/#computing-equivalent-gate-sets-using...

2. Commutators of subgroups: http://bollu.github.io/#5age-code-to-play-around-with-commut...

3. Graph/group theory: https://github.com/bollu/bollu.github.io/blob/2f88c28efc54fb...


Completely off topic question. Can Grobner basis techniques be used to solve a set of quadratic inequalities?


> Can Grobner basis techniques be used to solve a set of quadratic inequalities?

One application of Gröbner bases is to solve systems of polynomial equations [0], and characterize their solutions. In many circumstances it is not however the best method, for example if you are content with a numerical solution you can use other techniques.

Notice that this concerns equations, not inequalities. After a cursory search, I cannot find any "big" reference for solving polynomial inequalities using Gröbner bases. There is this [1], still, not sure how serious it is.

[0] https://en.wikipedia.org/wiki/Gr%C3%B6bner_basis#Solutions_o...

[1] https://arxiv.org/abs/1603.01183


Not ... really? I usually compare the Gröbner basis to generalized matrix decomposition in the sense of solving systems of linear equations. If you’re solving systems of quadratic equations, you should look into interior barrier solving methods, which generalize the simplex method.


Really? I thought the simplex method was kind of the opposite of an interior point method.


Gröbner bases appear in the standard reference on real algebraic geometry ( https://perso.univ-rennes1.fr/marie-francoise.roy/bpr-ed2-po... ), so the answer may well be "yes", but don't ask me for the details. (All I can tell is that quadratic systems are no easier than degree-n systems in general -- there's a known trick how any system can be reduced to degree 2 by introduced extra variables.)


Can you tell me the name of the trick to read about it on wikipedia? thanks


Saved my bacon about 5-6 years ago, the company we where going to depend on to do a whole bunch of complex calculations related to solar insolation discontinued their API but didn't tell anyone, I found out when I rang up to get a price.

So suddenly I was in the situation of dealing with maths that was harder than anything I'd done at school years and years ago.

In the end I transliterated the equations into sage, checked the results carefully and then wrote the PHP to do the same calculations using a large set of tests against the official stuff, stressful two weeks but sage was useful as hell.


Same for me ... my MsC thesis relied heavily on the result of a single complex three-dimensional integral ... I spend weeks trying to solve it by hand. SageMath wasn't able to solve it either, but it helped me towards the solution.


I used Mathematica a lot during my PhD. Now, using Sage and I am disconcerted by it. The great things about the Wolfram Language is that it is functional, which is a very nice way to think about maths, and how I am now used to. Sage is not functional. You create mathematical objects and those objects have properties that have to extract using Python class functions.

My other gripe, more objective than the above, with Sage is the lack of good documentation. The documentation is certainly complete, but it is painful to read. Mathematica documentation is a treat to read. Every function has its own page with plenty of examples to show capabilities, and show relations to other functions.

With Sage I constantly have to search the web to how to do things, while in Mathematica, I rarely had to leave the inbuilt help.


The programming language of Sage is indeed imperative (Python) rather than functional. Python's approach is much better than Mathematica's for some kinds of mathematics, and much worse for others. This is more generally true of imperative versus functional programming -- each is good for some classes of problems and terrible for others.

Regarding examples, currently there are 50,283 functions defined in the Sage library, and 96.8% of these functions have documentation that is illustrated with working tested examples. Also, you can read the source code of 100% of these functions (unlike with Mathematica) in case something isn't clear. Much of the Sage reference manual (find it here: https://doc.sagemath.org/) is autogenerated from the sagemath library source code; that's why there are 1,287,666 source lines of comments in sage, versus 636,899 lines of non-comment code.


The reference site here https://doc.sagemath.org/html/en/reference/index.html is a travesty. As I said above, it is indeed complete, but it is a pain to find something in it. Pages are long, and you have to keep scrolling, hoping that the function you are looking for exists and is somewhere on this page.

One of the best features of Mathematica documentation (https://reference.wolfram.com/) is that every function has its own page, and there are helpful links to related functions. I have found so many functions via these links. I really wish Sage had something like this.


“you can read the source code of 100% of these functions (unlike with Mathematica)”

This is an important observation. The source is the ultimate documentation, and, in many cases (in my experience) the only correct documentation for a software system. If you can’t see the source, you don’t know what the program does, you only know what someone says it does (aside from exhaustive experimentation).


What stuff is functional programming bad at? You can just introduce loops and mutation with tail recursion and get all the "benefits" of imperative code.


Not OP.

First of all I wanna say that Mathematica/Wolfram Language is not just functional and certainly not purely functional.

Thus said, I feel trying to be purely functional has its drawbacks whenever you have to keep track of a lot of stuff that requires state: for example if you have to declare that some of your constants are real you end up having to use Assuming or Assumptions a lot and that can get verbose quickly. Setting the $Assumptions global makes for terser code.

If you wanna dig more into the differences of the two approaches in the same language you can look at the xAct package vs. the built-in symbolic tensors: xAct has many more features but feels less idiomatic, because you have to set they type of your symbols beforehand and expressions are not really self-contained.


I highly suggest using this package if you're in school or otherwise learning higher level math. Being able to programmatically interact and manipulate abstractions over the mathematical concepts you're learning is an enriching experience, and it can help you check your answers to your homework. It's also a Python module so you can learn a skill that transfers well to other domains compared to, say, Mathematica.


Could you refer to a tutorial or a bit more description about what you mean by 'manipulate abstraction over the mathematical concepts', especially when doing higher math?

Simple arithmetic, or even computer-algebra simplifications are too simplistic. They help with high-school stuff but are useless for higher math where the bread and butter are theorem-proof-theorem-proof based learning/understanding/research.

Geometric plotting/vis, again, good for high-school and freshman stuff mainly. (Plotting is useful for research, data science, numerics, what not, but that's a whole other story. And computer graphics is a rabbit hole).

Same with Analysis. Good to have an automatic integrator for Calculus, useless for Real Analysis.

Numerical calculations are too laborious and you have to have a good understanding of a wide body of numerical literature, plus have experience. (again a rabbit hole)

That leaves us with proof-assistants, model-checkers, and small-scale automatic theorem-provers. And experience research mathematicians are still learning those.

Am I missing something?


Not a mathematician. Used Sage for engineering purposes.

But I think one example would be: you're investigating something and get a large linear system, a polynomial, etc. Sage can solve equations with symbols. It saves a lot of manual labor. Various expressions can be manipulated, simplified, etc. It can readily verify equality of huge expressions (which can be error prone by hand), and so on. More specific fields have more specific tools that could be used to assist, so it would depend on the field I guess.

See here:

https://ask.sagemath.org/question/24866/how-to-simplify-with...

Edit: I also think it should be fairly common to need to perform an actual numerical calculation in mathematical work? I think it's quite better than a simple calculator for that too, since it gives exact e.g. rational results, and approximations would be unfit for a proof (unless extensive precautions are made).

I remember I got an expression for an eigenvalue of a matrix (as a function of some parameters) that would be very laborious to get by hand.


"It builds on top of many existing open-source packages: NumPy, SciPy, matplotlib, Sympy, Maxima, GAP, FLINT, R and many more. Access their combined power through a common, Python-based language or directly via interfaces or wrappers."


As someone who needs math software somewhat infrequently, I had assumed that SageMath was a sort of de facto standard for people using Python with math. I was surprised to see that Google Colab doesn't support Sage in its notebooks.

I asked a coworker about it, someone who had previously worked on Sage. It sounds like some parts of the community are now favoring using lighter-weight libraries directly (like SymPy for symbolic math).

I discovered that Sage is not pure Python: Sage is translated to Python before running, which is how it can support syntax like "f(x) = x + 1" to define a function (whereas in pure Python you would need to use "def".


Be careful with your last statement: Sage is actually accessible as a python library with purely python syntax, but it also has an interface that supports weirder syntax like the one you mentioned.


Do you know how to install the library in a Python environment?


In one sense, what you want is possible but not currently supported, though people are working on it (https://trac.sagemath.org/ticket/29705 is a good start). In another sense, the SageMath install is just a Python environment. When you install Sage (from source or a binary) you are install a Python environment, similar to Anaconda. You can then type "sage -sh" to setup the environment, then install packages (pip3 install), or run a Python interpreter (by typing "python3") and do "import sage.all" to get the full sage library as a normal Python library. You could write a Python program and use any of Sage in them by importing "sage.all" in your Python program.

The reason Sage is currently distributed this way is similar to the reason Anaconda exists, which is that Python's package manager isn't (or wasn't in 2005 when I started this!) meant to build something as complicated as Sage, which has about 100 complicated dependencies. I really hope this eventually changes someday and people can type "pip install sagemath" and get something useful.

Oh, I think for several Linux distributions there are SageMath packages that just build Sage into the standard system-wide Python. So if you're using Linux, the problem may already be solved for you.


I think it's unlikely that pip will be able to easily install something like Sage anytime soon, but one could use conda [1] which is pretty popular in the scientific community, or alternatively docker [2]. It also seems there's support in the Nix package manager [3] which is actually more powerful than any other package manager I'm aware of (GUIX notwithstanding).

(I realize that this response is probably useless for the Sage author, but hopefully will benefit others who struggle with installation)

[1] https://doc.sagemath.org/html/en/installation/conda.html#sec... [2] https://hub.docker.com/r/sagemath/sagemath/ [3] https://github.com/NixOS/nixpkgs/blob/master/pkgs/applicatio...


Graduate educational background in math here and working in software engineering and machine learning. Like your coworker said, I do my work in Python and libraries like Sympy/pandas/numpy, not Sage. Sage never made more sense than Python since Python covers everything I need to do, including what Sage does that I need.

I've never met anyone who uses Sage and work at large research center. If your college background is math, you used Matlab in school. If your background is in computer science, you go with Python or another programming language. Sage seems like the middle ground between those two, but who is that?

The cases posted here seem to be like yours where there is occasional need for workers or students whose employer or school doesn't or won't supply a Matlab license. Matlab is in most college math departments and offers keys directly to students for like $50-100, so there are few of those cases. An employer with math researchers isn't going blink at the $2k for a perpetual license, so anyone doing the work regularly gets Matlab who wants it.

I do think Sage is good software and it is important to have a free alternative to Matlab. The audience is pretty limited, though.


Sage is primarily written and developed to support pure mathematics research, and you're describing applied/numerical mathematics. They are completely different things. Look at the chapters and sections in the Sage reference manual to begin to get a sense of what Sage is about: https://doc.sagemath.org/html/en/reference/index.html Sage has basically no overlap at all with Matlab in terms of new interesting code, but does have around a million lines of new code written by over 600 people: https://trac.sagemath.org/#AccountNamesMappedtoRealNames That code is mostly about the world of pure mathematics research, which has almost nothing to do with Matlab.


My background is pure math; sorry if that wasn't clear. Even in that environment I have not seen someone use Sage over Matlab.


In my experience, the math community is a very lumpy peanut butter... People use matlab, mathematica or sage depending largely on what was easily available and usable when they were in grad school, and or what their colleagues and collaborators were using. So some areas end up with lots of Matlab plugins, and other freedom-loving folks work in sage, slowly winning others to the cause with the promise of open source.


- The total available functionality of Matlab is dramatically different than that of SageMath. It's apples to oranges. I've never once even heard of a single research in arithmetic geometry (my area) using Matlab for research. For example, look at the top google hit for matlab and "elliptic curve": https://www.mathworks.com/matlabcentral/answers/282367-may-i... Compare that with what you find for Sage: https://doc.sagemath.org/html/en/constructions/elliptic_curv...

- Research mathematicians often use Sage not just because they are "freedom-loving folks", but because their research fundamentally demands that they can see, modify and extend the source code of the software they are using to do computations, and in many cases this simply isn't possible with commercial options.


> Research mathematicians often use Sage not just because they are "freedom-loving folks", but because their research fundamentally demands that they can see, modify and extend the source code of the software they are using to do computations, and in many cases this simply isn't possible with commercial options.

First of all IANAL not an expert on free software nor is any of this legal advice. Also this post is a bit tangential to the OP topic as it talks mostly about free software. Seeing modifying and extending the source code is exactly what free software is about. If you need or want that then you would often appreciate the free software movement. Free software can be commercial it just usually comes with some form of support or more looser licensing options that you would pay for in order to use it in a closed source product. Really I mainly say this to mention that free software is not free as in price but free as in freedom to see, change, and modify as you see fit. (I assume the parent poster already knew most of this and what I’m about to say by his use of ‘just, but I wanted to make this point more clear to anyone else who may not understand the purpose of free software.) It has taken me a while to understand the ethos, pathos, and logos of the whole free software movement and I’m sure there’s a whole lot more I could learn about it, but I am convinced it is a very necessary and good thing. It has troubled me that I can’t just throw in a GPL licensed software into a commercial product willy-nilly, but I appreciate what free software has accomplished due to it’s principles towards that freedom mentioned above and that is why I think it has accomplished them. I couldn’t imagine a world without Linux and other nice free softwares. I think without the principle of freedom that free software sticks to and has mandated in its licensing has freed a lot of developers that buy into that message a lot less fear that their work will be taken over by some who don’t value that freedom to see, change, and modify the software. I think in that sense those scientists who want the ability for those and themselves in the future to see modify and extend software are very much “freedom-loving folks”.


I very strongly disagree with your suggestion. Matlab is mostly for numerical work (e.g. what NumPy/SciPy/R/Octave are usually used for). Almost universally, this is not research mathematics (although it is certainly useful for many cutting edge engineering research topics and plenty of applied math work).

Sage can deal with these tasks as well as Matlab, simply by virtue of having interfaces to NumPy/SciPy/Octave/others, but this is not where Sage shines. Sage is indispensable for research math (some examples I understand: group theory, cryptography, abstract algebras; but there are many others that are far beyond my level of math education).

In short, I think you are misrepresenting or missing who Sage is really useful for. Matlab simply does not have these features. The competitors would be Mathematica/Maple/Magma.


Applied math can still be research and often is.


You are right. Bad phrasing on my part. Research applied math and research "pure" math even overlap, and the distinction is fuzzy. I do try to distinguish them from engineering research.


> An employer with math researchers isn't going blink at the $2k for a perpetual license, so anyone doing the work regularly gets Matlab who wants it.

Not all employers can splash for matlab. You might be right about a simple license, but in my experience most matlab developers rely on toolkits which ratchet that price up through the roof.

For one example, somebody I worked with rewrote the parfor functionality as a c extension, because we couldn't justify the expense of that addon for every seat. Not a great use of that math researcher's time, but it got the job done, I guess.

I and a couple others at my company showed that Python / Cython could be meet and beat matlab's performance, and we built up an open source stack that our customers love and contribute to -- good luck doing that with matlab.

Our physicists found that the only feature they needed of matlab was its plotting functionality -- so they rewrote that in their native lisp and moved on with their lives.

Today, we only need a few seats for some researchers with seniority. I can't say how much we're saving, obviously, but we eliminated a significant cost in two departments' budgets and our finance folks are quite pleased.

My regret in this is that I used to be a Sage developer, but I've only got so much sway at the company and GPL'd code is a no-go.


With GNU Octave[1] you can run your existing MATLAB code with minimal changes. And since 5.x versions it's now way faster than ever.

[1] https://www.gnu.org/software/octave/


Matlab is very strong for controls, well beyond anything I've seen in Python, but for general numerical work and plotting I feel its advantages over numpy+scipy+matplotlib (if any) cannot justify the cost and loss of freedom.


> If your college background is math, you used Matlab in school.

This is as misinformed as you can get. Matlab is not meant for math - it's meant for computation and the target is science/engineering. Sage likely does a lot that Matlab doesn't do well.

> I've never met anyone who uses Sage and work at large research center.

My company has licenses for MATLAB and Maple. Still, quite a few employees prefer to use Sage over those two.


Sage is wonderful. It has a huge number of uses but I mostly use it for cryptography. Sage has the best (certainly open source) support I know of for a myriad of things like group theory and elliptic curves. Here's a short example for how easy it is to play around with a tiny elliptic curve:

    sage: p = 19; p.is_prime()
    True
    sage: K = GF(p); K
    Finite Field of size 19
    sage: E = EllipticCurve(K, [5, 9]); E
    Elliptic Curve defined by y^2 = x^3 + 5*x + 9 over Finite Field of size 19
    sage: E.count_points(), E.order(), E.gens()
    (19, 19, [(4 : 6 : 1)])
There are far too many things to name that sage can do, but the CLI has a great autocomplete. Here's an example: let's say you have ECDH with point compression, and you specify only an x coordinate. Point compression limits the effectiveness of invalid curve attacks, where an attacker gives you a maliciously picked Diffie-Hellman value that isn't actually on the curve you're supposed to be on. However, if the x coordinate doesn't map to a point on the curve, it's necessarily on its "nontrivial quadratic twist". Sage makes this easy to play with because sage makes pretty much everything easy to play with:

   sage: E.lift_x(6, all=True)
   []
   sage: E.quadratic_twist()
   Elliptic Curve defined by y^2 = x^3 + 6*x + 13 over Finite Field of size 19
   sage: E.quadratic_twist().lift_x(6, all=True)
   [(6 : 6 : 1), (6 : 13 : 1)]
If you want to do a full-on invalid curve attack, the easiest way to do that is with Sage. You look up how the explicit formulas work in the EFD[efd], you write a ladder, you figure out how to create other elliptic curves for which the short Weierstrass doubling formulas still work (which parameter doesn't appear in the formula?), and then just let sage generate every possible curve and see which ones have the poor cryptographic properties you're after.

There's a reason the introduction to Cryptopals Set 8[set8] sends with the words:

> By the time you're done, you will have written an ad hoc, informally-specified, bug-ridden, slow implementation of one percent of SageMath.

As much as I'm a Clojure fanboy none of the Java libraries come even close. Unfortunately, sage is mildly annoying to use/install as a Python library (that would help interop significantly).

[efd]: https://www.hyperelliptic.org/EFD/g1p/auto-shortw.html

[set8]: https://cryptopals.com/sets/8


I haven’t used CAS for nontrivial algebra and number theory in a while (think half a decade), but IIRC Magma is a fair bit more powerful than Sage on these topics and more consistent as well. But alas, it’s not open source and not free. There’s a free calculator though subject to limits. http://magma.maths.usyd.edu.au/calc/


Never used sage but William Stein is a dope skater and I’m always very stoked to have other skateboarders involved in tech.


If you are interested in trying sagemath, read the PREP tutorials.

https://doc.sagemath.org/html/en/prep/quickstart.html

These contain have examples for linear algebra, calculus, diff equations, statistics, etc.

I use sagemath with Jupyter lab and it works pretty well. You can evaluate an expression and ask sage to output the LaTeX code for it, so you can have everything nicely formatted.


I used SageMath for my master's thesis in cryptography and group theory. It was awesome! I highly recommended it and its unfortunately very underrated.


Using it extensively for my crypto PhD. Several well-known cryptographers contribute to it.

It's an amazing bit of kit. But I'm not without criticisms. I feel it could do with the kind of fresh-start overhaul that really isn't practical for an open-source code base of this nature. E.g. move python 2.6 to python3. Also, you have excellent multi-precision support, but many of the algorithms from other modules don't support precision beyond machine lengths.

But really really good. Love it.


fyi from the website :

Since version 9.0 released in January 2020, SageMath is using Python 3.


Sagemath already switched to python3 a while ago.


I've contributed some code to matroid optimization. The people working on it are very knowledgable, often professors at universities donating their time. I definitely learned a lot through implementing some algorithms from the 70s.


Would anyone suggest a way to make use of Sage for non-mathematical work? Is it better for plotting things, compared to plain matplotlib for example?

I once used Sympy to parse formulas written in infix notation and convert them to S-expressions. But that's just less than 1% of what Sympy can do. I'd like to find more uses for it.


Plotting is a killer feature of Sage, IMO. It's a wrapper over matplotlib, and eliminates reams of boilerplate. In my experience, it's not just easier to use, but also easier to navigate the Sage docs than figure out the right way to do something in matplotlib.

I'm a weensy bit biased; I probably took part in conversations around the plotting interface as it was taking shape, and got familiar with that before learning matplotlib in earnest.


> It's a wrapper over matplotlib, and eliminates reams of boilerplate.

What happened is that in 2006 I hired Alex Clemesha to implement a "Mathematica-like API on top of matplotlib for Sage", and he spent a year doing so. Then Robert Bradshaw (lead dev of Cython) and Carl Witty wrote some really sophisticated just in time compiler code to make it more efficient to evaluate symbolic expression at many floating point values, which helps in plotting (especially for 3d plots). Over many years after that other people filled in little missing pieces of functionality and exposed more of Matplotlib's functionality, and also just added a bunch of new functionality (e.g., for drawing gridlines, 3d implicit plots, etc.) that wasn't available in the Python ecosystem.

And that's Sage's plotting functionality...



See also:

https://news.ycombinator.com/item?id=19682126 - "Should I Resign from My Full Professor Job to Work Fulltime on Cocalc?" - 2019

https://news.ycombinator.com/item?id=19485166 - "Computational Mathematics with SageMath" - 2019

https://news.ycombinator.com/item?id=11883987 - "The Origins of SageMath" - 2016

https://news.ycombinator.com/item?id=11078220 - "Open source is now ready to compete with Mathematica for use in the classroom" - 2016

https://news.ycombinator.com/item?id=10175563 - "The Simons Foundation and Open Source Software" - 2015

https://news.ycombinator.com/item?id=10147401 - "React, Flux, RethinkDB and SageMathCloud – Summer 2015 Update" - 2015

https://news.ycombinator.com/item?id=2088871 - "SageMath: Python-based Mathematics. Rock it." - 2011 - a little bit of editorializing there...

https://news.ycombinator.com/item?id=983423 - "Conception, birth and developement of a Free math software (Sage)" - ditto...

https://news.ycombinator.com/item?id=179416 - "Sage: Can There be a Viable Free Open Source Alternative to Magma, Maple, Mathematica, and Matlab?" - 2008

Any others?


I remember way back when this project was getting started (around 2005), I hosted a public use Sage instance that was linked to on their website! I was in high school at the time


I love sage and I used it for multivar calc this year but unfortunately it's not as good in some aspects (mainly symbolic integration) as Mathematica. One of my primary motivations for learning math is being able to contribute


I hope these systems will be more modern in terms of tooling. For example, having the LSP server[1] will help a lot for those who don't want to leave their favorite editor. Or a better Unicode support[2].

[1] https://savannah.gnu.org/bugs/?57106

[2] https://savannah.gnu.org/bugs/?57103


Sagemath is probably the best you'll get in the free software ecosystem. I don't think anything comes close.

Yes, better tooling would be nice. But I think better math support would be better. I encourage everyone to read William Stein's posts on the challenges they face on that front (incredibly hard to get funding, etc). Their resources are very limited, and they have to prioritize heavily.


Regarding LSP support, SageMath is a Python library and Python has LSP support, as does JupyterLab...


On emacs, sagemath can be used on babel blocks in org mode, and it can keep a sage session open for all such blocks, updates result blocks when executing, etc. Since with babel you can do this with multiple languages, this means you can create multi-language documents (that are like notebooks, minus the collaborating part) that include sage blocks.


I used Sage years ago. Since I've felt that jupyter and such have taken its place. Does sage have a place outside of use for mathematicians?

I'm a physicist, and the most I'd need a CAS for is essentially mathematica's "Simplify". DESolve is great too but back then (2010 or so) Sage's diffeq solvers felt limited.


We used SageMath in cryptography lessons at university. Very useful stuff and easy to get!


I really wish I started using Sage instead of maxima directly. The documentation for maxima is pretty difficult to understand for a noob just looking to solve some non linear equations


Is there an easy way to embed a sage notebook viewer / editor inside a webpage without installing a sagecell server?


You can upload it to cocalc.com, then share it publicly, then click the embed link to get a version that is suitable for embedding in an iframe...


It might be a good strategic move to publish a React component to do this for the non iframe solution enthusiasts out there. It would be good to see people start using SageMath notebooks where they otherwise might be using Katex or Mathjax today. It could always have an "Open/Run on CoCalc" link as part of it.


I probably should, since the underlying renderer mentioned above is actually implemented using React (it takes as input JSON describing a notebook and renders it, entirely on the frontend). Also, in case it isn't clear, these days "Sage notebook" just means "Jupyter notebook with the SageMath kernel"... since "the Sage notebook" (=the SageMath project's predecessory to Jupyter, but written in 2007) is basically deprecated now in favor of the official Jupyter notebook project.


How does it compare to Mathematica?


Nothing compares to Mathematica, unfortunately. Mathematica really is the best, if you can afford it.


More realistically. Mathematica is the best at some things, but is hopelessly behind in others (e.g. algebraic number theory and group theory). Computational mathematics is deep and vast.


Well, I can't argue with the Father of Sage :-)

A bit surprised to hear that, though. Do you mean Sage is better in algebraic number theory as a whole, or is it more of some aspects are better with Sage and others with Mathematica?

Any one done a writeup comparing the strengths of Sage w.r.t Mathematica/Maple/etc? (In detail, not just big picture).


There was a "mock" mathematica a few years ago called "mathomatica" which was the mathematica language implemented in common lisp (if I recall correctly). It was a pleasure to use and a drop-in replacement of the language (but not for all the standard library of functions). Unfortunately, they god bullied to death and its trace is almost gone. The author just wanted to prove a point "you are so damn crazy by that silly language that anybody can re-implement in a few hundred lines of lisp", and once his point was proven he did not want to pursue it any further. And here we are.

EDIT: got some names wrong, here's a possible starting point for this rabbit hole https://def.fe.up.pt/pipermail/maxima-discuss/2009/029211.ht...


How good is it for machine learning? I'm currently using julia which I also really enjoy.


Sage is not something that you would want to use for ML per say. It can, however, help you with understanding of the underlaying math and algorithms. It has excellent support for symbolic math, statistics (distributions etc.) and just about everything else you are going to need to study ML. I recently switched from Mathematica and could not be happier.


How are sage's differential equation solvers now? How does it compare to Mathematica's? I'd love to get back into sage if it worked better with that sort of thing now.


why is the existence of sagemath have any news relevance on HN?


> why is the existence of sagemath have any news relevance on HN?

Ideas from STEM (Science Technology Engineering and Mathematics) are pretty large and pervasive throughout the tech industry. I think there are also a large area of tech startups that could come from any area of STEM. Also one of the goals of info on hacker news is to be intriguing to hackers themselves and to fulfill some sense of intellectual curiosity. For me personally SAGEMath opens doors for me as a programmer to better understand abstract math concepts that might or might not have relevance to my daily work as a programmer and as a cofounder. In that sense I think SAGEMath helps fulfill that intellectual curiosity. Heck it may even help me complete that next projecteuler problem. (Which also is only done for the fun and experience of it.)

Also people who come up with really creative company ideas or that build free software that really do something quite amazing are often at the intersection of tech and some other field. This is not to say that tech solves all other fields’ problems. It’s that tech can benefit other fields when it takes the approach of how can I make this field’s work easier which often comes from a good amount of knowledge of how that field actually works otherwise it’s just too superficial. SAGEMath is a great example of tech actually helping research mathematicians and most of it is made by mathematicians themselves (who clearly have some programming prowess.)

By the way I’m sorry you were downvoted. Looking at your profile I see you’ve only been on here for 82 days. I see your comment as very genuine but I also understand a little of why you might have been downvoted but for that I’ll just point you to the sites guidelines:

https://news.ycombinator.com/newsguidelines.html

The original post very clearly meets the guidelines though it is not your typical news, it is news to hackers. Happy Hacking. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: