Hacker News new | ask | show | jobs
by rotorblade 2985 days ago
>> The tie-breaker is social, not technical.

> The tie-breaker is financial. Jupyter is winning because it's free [...]

It is a bit more nuanced than that. Personally I do not pay from Mathematica usage, so why do I like Jupyter more?

The Mathematica notebook interface is horrible. You may go "oh, neat" the first few times you try it then, at least I, get more and more frustrated on all the idiotic issues

* Indentation/text-wrapping. Write a long line that starts wrapping, it gives it a little indentation to signify this, an your next line that you have indented is slightly more indented, but it is really hard to see, so you have no idea of where your line-breaks are.

* Brackets. "[" are used for function calls and for part-specification. The number of square brackets in your expression makes it necessary hard to read when it is big enough.

* Jumping text. The notebook interface does not have the "auto-complete brackets" (maybe v11 does), so you add your first, all the text in the Cell gets reformatted and you have to find the fucking place you wanted end the bracket. This is akin to working with images in MS Word.

* Exporting. The notation is just ugly, fine, that is personal, but "Sin[]" as "sin()"... ok. Ah, good, it has a "Copy as Latex", nice... "Sin[]" -> "\text{Sin}[]". Really? Who in the world uses "\text{Sin}" for the sine-function and square brackets for function-calls when typesetting maths in Latex?

It is just a complete nightmare to try and incorporate these things into your workflow, at least for me.

Jupyter just behaves as you'd expect. Just that it is so much smoother to work with wins. For me, I do symbolic calculations, SymPy can do some things much easier than Mathematica, but a lot of things it can't or you have to work some more to get going. That Jupyter allows you not to have an aneurysm every day at work, which makes you actually wanna spend the extra time working it out.

3 comments

These are matters of taste, I use both & find Mathematica's notebooks much better than Jupyter. Editing text in a web browser is just painfully clumsy, and plain text is not great for reading mathematical expressions of any length. But obviously it depends what you're doing with it.

You complain about Sin[] but not about ugly things like np.sin()? Also I think you're looking for

    Sin[θ] //TraditionalForm //TeXForm
Using \text{} instead of \sin is, arguably, plain incorrect. Or at least at odds with the tex philosophy of separation between content and formatting.
Yeah, I guess that is fair. It might just be that it is more or less the furthest way from how I like to work as I can imagine.

> Sin[θ] //TraditionalForm //TeXForm

Did not know of this. Thanks!

TeXForm automatically applies TradionalForm unless another *Form is applied.

So TeXForm[Sin[x]] gives "\sin (x)"

Indeed, sorry! It even says so in the help.

And while I swear I've had rotorblade's problem before, right now "Copy as LaTeX" seems to do this too.

Regarding the double brackets for representing Part, you can instead use〚 and 〛which can be input with `ESC`-[-[-`ESC` and `ESC`-]-]-`ESC` respectively. This makes the code prettier and easier to read.

There is a very easy to implement modification you can make to allow the keyboard shortcuts `CMD`-[ and `CMD`-] for the double bracket symbol, which is described here:

http://szhorvat.net/pelican/pages/mathematica.html

I rather wish Wolfram would provide these keyboard shortcuts in the base software

This is a good summary of the problems I have with the Mathematica notebook interface. And just as with the problems I described with the typography on PDF output, when you encounter something like Latex output that reads "\text{Sin}[]" you have to wonder, is this bad by mistake or bad on purpose?