News for hackers. Stuff that matters.
Re:Mathics: A free, open-source alternative to Mathematica by TheRealPomax on Saturday November 05, 2022 @01:18AM (#33478209)
Every time someone makes a "free mathematica", my first question is "can I write, and see, maths as actual maths instead of as programming statement?" and every time so far the answer has been "no". So... can I write, and see, maths as actual maths?
Re:Mathics: A free, open-source alternative to Mathematica by davnn on Saturday November 05, 2022 @01:33AM (#33478279)
I understand the wish, and Mathematica does a pretty great job of making the mathematical notation less ambiguous, but I‘m surprised that this would be your highest priority. Do you actually enjoy writing in math notation?
Re:Mathics: A free, open-source alternative to Mathematica by laingc on Saturday November 05, 2022 @01:45AM (#33478348)
If you’re a working mathematician, it’s the only way you think.
Re:Mathics: A free, open-source alternative to Mathematica by esperent on Saturday November 05, 2022 @01:54AM (#33478389)
If you are the X then you must do/be Y is called gatekeeping.

And of course this is not true.

I know mathematicians who work almost exclusively on a computer, and others who have an old dusty computer from 20 years ago in the corner of their office that they barely touch. Most are somewhere in between.

Re:Mathics: A free, open-source alternative to Mathematica by qubex on Saturday November 05, 2022 @02:52AM (#33478677)
Mathematics is one of the oldest disciplines in the world. Grumbling about the legacy of its ancient history as ‘gatekeeping’ is puerile.
Re:Mathics: A free, open-source alternative to Mathematica by Beldin on Saturday November 05, 2022 @04:38AM (#33479279)
This started worth talking about notation. Notation of mathematics has changed significantly over time - Newton's Principae is not readable without accounting for changes. In the history of maths, that is a fairly recent work.
Re:Mathics: A free, open-source alternative to Mathematica by qubex on Saturday November 05, 2022 @04:43AM (#33479311)
I actually agree with your premise: mathematics and it’s notations (plural) are ancient. The current notations are those that were found to be most convenient by centuries of practice by expert practitioners.
Re:Mathics: A free, open-source alternative to Mathematica by tikej on Saturday November 05, 2022 @06:34AM (#33480066)
This is of course very true but doesn’t take into account invention of computer that is relatively recent.

Since it in principle never makes mistakes (in practice there are of course bugs, but they are usually different in nature than human errors) it changes what is possible and most convenient. You no longer have to optimise for simplicity as heavily for example. On the other hand computers basically can’t deal with ambiguity, so the rules and statements have to be stated very simply and clearly.

I believe computers can change the landscape of what’s best notation. This is an interesting, interdisciplinary topic to explore.

Re:Mathics: A free, open-source alternative to Mathematica by Qem on Saturday November 05, 2022 @08:27AM (#33480780)
I think APL was originally created as a fix to this problem. A completely revamped math notation to make it more fit to computers as a medium, instead of pen and paper.
Re:Mathics: A free, open-source alternative to Mathematica by hilbert42 on Saturday November 05, 2022 @10:14AM (#33481661)
If it was created thus then it could hardly be considered successful. To all but the dedicated and obsessive cognoscenti APL is nothing but gobbledygook.
Re:Mathics: A free, open-source alternative to Mathematica by hdjjhhvvhga on Saturday November 05, 2022 @07:15AM (#33480352)
> If you are the X then you must do/be Y is called gatekeeping.

Let's be precise here: the parent hasn't used "must" here, just stated their observation. It's possible that many if not most mathematicians work this way, but it's not definitely the only one, and it doesn't mean it can't be changed. Actually, there is a lot of work being done on theorem provers, for example.

Re:Mathics: A free, open-source alternative to Mathematica by traverseda on Saturday November 05, 2022 @11:38AM (#33482494)
If you are a python programmer you must program in python.
Re:Mathics: A free, open-source alternative to Mathematica by adastra22 on Saturday November 05, 2022 @01:47AM (#33478355)
Yes. I'm sorry but how is this not obvious? Do you enjoy hand-writing code on paper?

The natural medium for math is on whiteboards and paper. A computer algebra system like Mathematica is useful, but it augments what is traditionally a paper-and-pencil activity. It makes sense that the standard notation for math is something that is amenable to physical tools.

And it makes sense that the computer tools to assist mathematicians should more closely match this standard notation.

Re:Mathics: A free, open-source alternative to Mathematica by dagw on Saturday November 05, 2022 @07:15AM (#33480353)
In many cases yes. Especially non-programmers really like that the equation they type into their software looks exactly the the equation in the paper they are copying it from.
Re:Mathics: A free, open-source alternative to Mathematica by TheRealPomax on Saturday November 05, 2022 @12:06PM (#33482760)
Who said it was my highest priority? Obviously having a solver is the highest priority, but it turns out that if you purport to have made a mathematica competitor, that was the baseline. If you don't have that, you have nothing. So the question is never "can it do what it needs to", it's always "can it do the things which keep me using Mathematica, instead of Sage, like letting me compose notebooks that contain, and show, actual maths?"

And yes, I enjoy writing in math notation because it's an immediately understandable notation compared to 500 character programming statement.

Re:Mathics: A free, open-source alternative to Mathematica by lokedhs on Saturday November 05, 2022 @01:49AM (#33478367)
I'm not sure you'd want to write maths that way. Every WYSIWYG equation editor I've used are very annoying to work with.

Displaying equations is a different thing and it's supported by many tools. Maxima for example has wxMaxima: https://sourceforge.net/projects/wxmaxima/

I've also been working on a different UI for Maxima: https://peertube.functional.cafe/w/qnx1onPEx9LCtDP3wFqjWz

Re:Mathics: A free, open-source alternative to Mathematica by tgv on Saturday November 05, 2022 @03:37AM (#33478896)
I sometimes use wxMaxima. For my needs it works perfectly fine. Nice to know there are people working on the interface, because you definitely need to know quite a bit about different functions with similar tasks.

Would you know how Mathics compares to Maxima? Mathics' information is pretty sparse.

Re:Mathics: A free, open-source alternative to Mathematica by richardw on Saturday November 05, 2022 @03:52AM (#33478982)
I’d guess the end state is: tablet, stylus and convert scrawls into print-worthy output. Many pitfalls along the way I’m sure but nothing will beat just drawing what you mean.
Re:Mathics: A free, open-source alternative to Mathematica by anigbrowl on Saturday November 05, 2022 @04:04AM (#33479061)
Surprised nobody has made an app that lets you photograph/cut & paste formulae from books or web pages, or just write with a stylus. It's the layout with keyboard and mouse that's the stumbling block. There's lots of good options for symbolic logic, numeric analysis etc.
Re:Mathics: A free, open-source alternative to Mathematica by munch117 on Saturday November 05, 2022 @05:07AM (#33479471)
You underestimate how hard the problem is. Things that in other fields would be minor typographical differences are often semantically meaningful in traditional math notation. Formula OCR would need to distinguish chi from x, lowercase delta from o with an overbar, a dot-product dot from a dot intended as multiplication, parentheses from brackets, v from the or sign. It needs to be able to determine whether your fraction "a / b / c" (by / I mean horizontal lines) was intended as "a / (b / c)" or "(a / b) / c" from the size of your letters, or from the relative widths of the fraction lines.

Of course, anything a human can do, ML can learn to do eventually. Which invites the question: is reading arbitrary hand-written math actually something any human can do?

Re:Mathics: A free, open-source alternative to Mathematica by shashasha2 on Saturday November 05, 2022 @06:34AM (#33480067)
Microsoft Math Solver does a good job at scanning hand drawn equations. Graph and solve simple polynoms
Re:Mathics: A free, open-source alternative to Mathematica by hilbert42 on Saturday November 05, 2022 @01:44PM (#33483715)
It seems to me that few would underestimate how hard the problem is as the difficulty would be obvious to those who develop such software.

There are at least two issues here, the first is that there isn't any agreed typographical standard that would make OCR more reliable, and second, there's no consistent or uniform way OCR algorithms are applied. To use your example, the OCR software ought to be able to recognize 'a dot-product dot from a dot intended as multiplication' from its useage context, and where ambiguities or doubts exist the item or aspect of the converted text should be flagged and dropped into an editor that would provide easy access to a choice of selectable options to choose from.

In the absence of accurate AI/ML, having ready access to a flexible mathematically-aware editor so as humans can easily make corrections seems an absolute necessity (especially so when OCRed text originates from source material that has not been typeset with OCR in mind).

It seems odd that mathematicians and programmers haven't yet agreed on standards and protocols around the OCR of mathematical formulae given that the problem has been with us since the outset OCR.

Re:Mathics: A free, open-source alternative to Mathematica by anigbrowl on Sunday November 06, 2022 @11:20PM (#33501100)
> You underestimate how hard the problem is.

It's hrd, but it's not that hard. Character recognition is half the problem, the other half is context recognition - and there's abundant reference material available. I think we'll see 'copilot for math' aimed at AP/college level users within a few years.

It's not something that any human can do, bu something that any human can do with help. The first killer app will be 'I found this formula, please tell me how to read it.' Not in the sense of being a math tutor (although that may come, but simply in the sense of helping students to read it out loud, identify symbols like hats or bars and son so on. Most math books are terrible in this respect because they assume the student already knows all the notation or has someone who can lecture or tutor them about it. This massively inhibits solo learners who can't engage in the practice of 'teaching themselves' by verbally walking through formulae or discussing them fluently, unless they're lucky enough to have found a good reference for notation.

If you are not in the latter group, Wikipedia has OK summary articles on notation; and these two books offer variously concise and in-depth tools to built mathematical literacy:

https://www.amazon.com/Mathematical-Notation-Guide-Engineers...

https://www.amazon.com/Programmers-Introduction-Mathematics-...

Re:Mathics: A free, open-source alternative to Mathematica by crispyambulance on Saturday November 05, 2022 @05:35AM (#33479645)
> Surprised nobody has made an app that lets you photograph/cut & paste formulae from books or web pages, or just write with a stylus...

https://mathpix.com/

I can't vouch for it, but it seems to be trying to do that.

Re:Mathics: A free, open-source alternative to Mathematica by dagw on Saturday November 05, 2022 @06:52AM (#33480198)
There have been lots of apps that have tried to convert hand written math on a tablet. I've personally tried at least 4 or 5 over the last decade or so. None of the really manage to pull it off successfully for anything beyond the most trivial examples.
Re:Mathics: A free, open-source alternative to Mathematica by newaccount74 on Saturday November 05, 2022 @04:09AM (#33479097)
Mathematica had a really nice way of entering equations, once you learned the shortcuts. It's so much nicer to see fractions, matrices and integrals in proper notation, rather than an endless sea of parenthesis.

Eg. when you enter a rotation matrix, it's obvious when you make a mistake when you use the graphical editor in Mathematica. It takes a lot more effort to check if ((1,0,0),(0, sin(2pit),cos(2pit)),(0, cos(2pit),-sin(2pit))) is correct.

Re:Mathics: A free, open-source alternative to Mathematica by smithmayowa on Saturday November 05, 2022 @04:57AM (#33479400)
This, so much this, writting nested equations are hell in python and other mathematica alternatives but they are so easy in mathematica.
Re:Mathics: A free, open-source alternative to Mathematica by The_suffocated on Saturday November 05, 2022 @06:30AM (#33480032)
What is a nested equation?
Re:Mathics: A free, open-source alternative to Mathematica by isitmadeofglass on Saturday November 05, 2022 @08:29AM (#33480790)
Nesting is the concept of having a thing under another thing. 1+2 will be referred to as a mathematical equation and 1+((((a-b)/3+2/87)-6)23) will be referred to as a nested equation. Of cause this is rather lose semantics since both are expressions or statements and not equations, but that’s how the language is typically used.

This is what that looks like in wolfram alpha: https://www.wolframalpha.com/input?i=1%2B%28%28%28%28a-b%29%... It looks the same in Mathematica while your typing it in, which makes I extremely easy to work with, because even very complex equations look exactly like usual in Mathematica instead of ending up looking like lisp implementation of the Fibonacci sequence.

Re:Mathics: A free, open-source alternative to Mathematica by MikePlacid on Saturday November 05, 2022 @12:05PM (#33482750)
> looking like lisp implementation of the Fibonacci sequence.

I wonder if Lisp can benefit from a similar 2d visualization sugar.

Re:Mathics: A free, open-source alternative to Mathematica by pmayrgundter on Saturday November 05, 2022 @12:26PM (#33482954)
Yeah, the nesting Viz shouldn't be too hard. Just nested divs in HTML really.

And super/sub scripts are in HTML as well.

Unicode is doing all the symbols these days

Param placement like n=0 under a summation, etc are a little more idiosyncratic

Re:Mathics: A free, open-source alternative to Mathematica by isitmadeofglass on Saturday November 05, 2022 @08:21AM (#33480754)
> I'm not sure you'd want to write maths that way. Every WYSIWYG equation editor I've used are very annoying to work with.

Try Marhematica and you’d change your mind. Yes every other tool does it poorly, but Mathematica does it right. It’s fantastic and you miss it everywhere else when you have to leave the Mathematica eco system.

Re:Mathics: A free, open-source alternative to Mathematica by blablabla123 on Saturday November 05, 2022 @08:57AM (#33480968)
Also the actual value of Mathematica or Maple seems to me how good solvers are. E.g. when it comes to Integrals or just solving a non-linear equation. Also most common tasks work good enough. A good/fast UI is also important (like for Maxima, although I miss modern convenience a bit)
Re:Mathics: A free, open-source alternative to Mathematica by TheRealPomax on Saturday November 05, 2022 @12:02PM (#33482719)
Cool: the fact that I'm asking suggests I do, though. And I absolutely want to see the results in maths, not in programming notation. If I'm solving a complicated bit of maths, I want to see the result and intermediary steps as maths, not as programming code.
Re:Mathics: A free, open-source alternative to Mathematica by sterlind on Saturday November 05, 2022 @02:04AM (#33478432)
in Mathematica at least, you can use TraditionalForm to format your equations like maths. and what's more, you can edit things in that form without dropping out of it. you can also make palettes for commonly used symbols and such. it's not a magic blackboard, but with the symbolic nature of Mathematica and the rendering, it's kinda close.
Re:Mathics: A free, open-source alternative to Mathematica by TheRealPomax on Saturday November 05, 2022 @12:08PM (#33482784)
Indeed, so does this have that?
Re:Mathics: A free, open-source alternative to Mathematica by larryliu on Saturday November 05, 2022 @02:36AM (#33478591)
what about recognizing handwritten math? https://mathpix.com/handwriting-recognition
Re:Mathics: A free, open-source alternative to Mathematica by hmottestad on Saturday November 05, 2022 @03:15AM (#33478780)
I agree. Mathematica and Wolfram Alpha are amazing because of how close they get to maths as it is taught in school, uni and through books.

There are many other ways of working with maths. Graphing calculators are very common, and some models even have proper algebra support. There are also the likes of Matlab, R, Python + numpy, and obviously the addition of Jupyter notebooks.

“Mathematica®-compatible syntax and functions” seems to be the main selling point of Mathics. I presume that this means that I can copy-paste Mathematica examples I find online or that are shared with my by someone else.

Re:Mathics: A free, open-source alternative to Mathematica by loa_in_ on Saturday November 05, 2022 @06:17AM (#33479938)
A simplistic but nice application for Android I found looking for this after reading parent's comment. https://play.google.com/store/apps/details?id=us.mathlab.and... (Adware/Non-free/closed source)
Re:Mathics: A free, open-source alternative to Mathematica by navane on Saturday November 05, 2022 @06:29AM (#33480023)
The industry standard (in my industry) software to do that is MathCad, of which version 15 is the peak release. Although not maintained anymore, it is still used a lot today. Because it is not maintained anymore, it doesn't change and has been the same for the past ~15 years.

A free, still maintained, alternative of that is smathhttps://en.smath.com/view/SMathStudio/summary, which also has a cloud option.

Re:Mathics: A free, open-source alternative to Mathematica by jopsen on Saturday November 05, 2022 @06:44AM (#33480151)
Oh, I miss MathCad, I wish we had a decent FOSS clone.
Re:Mathics: A free, open-source alternative to Mathematica by tikej on Saturday November 05, 2022 @07:04AM (#33480277)
I find Julia’s Pluto to be reasonably close alternative.

Of course it lacks many features, but plugins systems and overall architecture gives hope for possible extension to include many of the desired features.

Re:Mathics: A free, open-source alternative to Mathematica by phkahler on Saturday November 05, 2022 @07:35AM (#33480477)
Wait, Mathcad is unmaintained? What happened?
Re:Mathics: A free, open-source alternative to Mathematica by theFco on Saturday November 05, 2022 @07:57AM (#33480623)
It became Mathcad Prime that is still maintained and had a release this year.
Re:Mathics: A free, open-source alternative to Mathematica by data_maan on Saturday November 05, 2022 @07:36AM (#33480491)
Which is your industry, if you don't mind me asking?
Re:Mathics: A free, open-source alternative to Mathematica by navane on Saturday November 05, 2022 @01:59PM (#33483903)
Civil engineering
Re:Mathics: A free, open-source alternative to Mathematica by benhurmarcel on Saturday November 05, 2022 @04:41PM (#33485451)
In that space, https://blockpad.net/ is interesting also
Re:Mathics: A free, open-source alternative to Mathematica by soegaard on Saturday November 05, 2022 @06:36AM (#33480086)
> my first question is "can I write, and see, maths as actual maths instead of as programming statement?"

What would that look like?

Do you have a hypothetical example?

Re:Mathics: A free, open-source alternative to Mathematica by dagw on Saturday November 05, 2022 @06:48AM (#33480175)
I suspect they mean they want something like this: https://i.stack.imgur.com/Ymrym.png

As opposed to something like

  def f(x,k) = Sum(k,math.inf, (math.pi*pow(sqrt(x),k))*sin(2*theta*(sqrt(...
Re:Mathics: A free, open-source alternative to Mathematica by hdjjhhvvhga on Saturday November 05, 2022 @07:11AM (#33480319)
> So... can I write, and see, maths as actual maths?

Sorry to be nitpicking, but it seems you conflate "actual maths" with "maths notation we're accustomed to (since the 19 century)".

As to what "actual maths" really is, it's an extremely interesting question that belongs to the philosophy of mathematics (mostly).

Re:Mathics: A free, open-source alternative to Mathematica by aflag on Saturday November 05, 2022 @09:44AM (#33481414)
That's indeed a bit of a nitpick. If you're working with maths, going back to your notes and reading them is really important. If your notes look like Sum(k,math.inf, (math.pipow(sqrt(x),k))...)), it's really not great. So, while you're correct that it's just notation, the issue remains that it's much harder to read maths in ascii.
Re:Mathics: A free, open-source alternative to Mathematica by TheRealPomax on Saturday November 05, 2022 @12:20PM (#33482907)
That's not a conflation, that is using the word "actual" correctly.

Amusingly, the one thing that the word "actual" does not permit is lead the conversation to that "extremely interesting question": the word "actual" forces an interlocutor to consider only those contexts in which something is understood as real and existing.

In this case, that would be modern maths notations. So this is kind of artificial nitpicking: English is not a zero-context language, you are still required and expected to understand the context words are used in based on understanding that they wouldn't make a lot of sense in other -even related- contexts.

Of course, if I'd been glib and said this:

> So... can I write, and see, maths?

Then the insinuating that maths and programming are mutually exclusive concepts should definitely lead to a philosophical discussion.

Re:Mathics: A free, open-source alternative to Mathematica by graphpapa on Monday November 07, 2022 @12:26PM (#33508974)
I think you’ve just each used a different sense of the word ‘actual’.

Sense 1) “‘Actual’ mathematics does not consist in notational embodiments”

‘Actual’ as in essence rather than appearance, territory rather than map. Implies platonic reality of an eternal ephemeral mathematics. Conceived of as beyond and beneath all the particulars of any given representation.

Sense 2) “‘Actual’ mathematics consists in notational embodiments”

‘Actual’ as in embodied. Material. Implies mathematics is the set of mathematics which has been ‘actually’ done.

You describe the second sense as self evident but with mathematics in particular this is bound to cause issue.

I find it hard to even write the description of the second sense without tying some linguistic knot. If ‘actual’ mathematics is its embodiments, what is the thing being embodied? Not actual. So the inscriptions characterise a non existence. What does it mean to describe the characteristics of a thing which doesn’t exist?

From another angle, what does it mean for something to ‘materially exist’ so that it can be considered ‘actual’. I think this concept so nebulous as to make impossible the patching up of all the holes a proper investigation would reveal.

Of course ‘material existence’ is used and understood perfectly well in ordinary circumstances but when the topic at hand is “what counts as ‘actual’ mathematics?” it seems a bold post to tie yourself to.

Re:Mathics: A free, open-source alternative to Mathematica by Ciantic on Saturday November 05, 2022 @09:01AM (#33481002)
Desmos has open source library called MathQuill, which converts typed chars to mathematical representation similar to Mathematica. Sure there is some "programming statements" with some (La)TeX like syntax there, but so does Mathematica too.

[1]: http://mathquill.com/

Re:Mathics: A free, open-source alternative to Mathematica by asoneth on Saturday November 05, 2022 @10:37AM (#33481887)
Reading these replies, it's surprising to me how many people think that constraining writing a linear sequence of fixed characters is somehow natural as opposed to a simplification made for cost and technical reasons by Gutenberg, typewriters, keyboards, and ASCII.

Writing is more than this. Writers can arrange characters in 2d space to convey semantic relationships in equations or among words. You can have multiple degrees of emphasis and italics. You can get a sense of which parts of the equation or prose were written quickly and which were written slowly and carefully. Often it conveys a bit of personality. You can even include small drawings or sketches embedded within the text like Gallelo's illustration of Saturn's rings.

I get that we have to strip out this kind of nuance for technical reasons, but claiming that writing ought to be constrained to only what can be represented in plain text feels like claiming that painting should be constrained to only what can be represented in a bitmap.

Re:Mathics: A free, open-source alternative to Mathematica by traverseda on Saturday November 05, 2022 @11:34AM (#33482439)
I have adhd, and personally I find it a lot easier to follow through "math" when it's step by step. When I can say "first this happens, than this". I'm sure part of it is a don't have a great toolbox to break problems down, but personally what you're describing sounds horrible. Like trying to read a book out of order.
Re:Mathics: A free, open-source alternative to Mathematica by User23 on Saturday November 05, 2022 @11:44AM (#33482551)
I strongly agree that representing multidimensional structures with one dimensional strings is suboptimal.

On the computing side I see this as an editor problem. It’s not hard to conceptualize some multidimensional editor, but evidently it is hard to build one that will overtake the traditional text editors and their not particularly more advanced IDE cousins.

The closest such thing I’ve personally used was HyperCard. I think that for real progress in this area we’ll have to abandon the desire to keep editor and language separated.

Re:Mathics: A free, open-source alternative to Mathematica by bobbylarrybobby on Saturday November 05, 2022 @10:14PM (#33488148)
Edward Tufte, is that you?
Re:Mathics: A free, open-source alternative to Mathematica by User23 on Saturday November 05, 2022 @11:41AM (#33482528)
What is “actual maths?”