Live data from Hacker News

A new release for GNU Octave

lwn.net

41–50 of 99 posts

Re: A new release for GNU Octave

#41
post #38

Earlier quoted context omitted.

If people have to reduce to this hack, why doesn't the language just declare every character string a symbolic variable by default, like Mathematica?

Because the vast majority of Python programs aren't doing symbolic maths with Sympy. It's not a hack, and it's pretty trivial. I type "a," and press up, and run the line from my command history with all the letters in it. Sympy also has a submodule named abc you can import variables from, but I like defining them as real number variables so I don't get complex answers when they don't make sense. Sympy is just a Pytho…

> Because the vast majority of Python programs aren't doing symbolic maths with Sympy.

And this, my friends, is why mathematicians will never feel at home using Python+libraries. Instead of having a programming environment ideally suited to the needs of math, you need to fit your math to the Procrustean bed of Python syntax.

Re: A new release for GNU Octave

#42
post #31
post #11

Earlier quoted context omitted.

I'll say one option is bad :-) I don't use Octave, but I have a little in the past, and I have to teach students to use Matlab (2021 should be the last year of that before we switch to Python though), and I've done a lot of numerical and other programming in Python and Matlab, in each for ~20 years. In my opinion Matlab is a terribly designed language that has haphazardly grown features by accretion. Anything other t…

I agree wholeheatedly. Python is everything matlab the language could hope to be and more, if you just want to crunch matrices python beats matlab as it's own game (just the broadcasting features in numpy alone are an amazing step up from matlab's approach, let alone trying to ingest data which isn't a csv). But, some of those toolboxes are pretty damn good and don't have an equivilent in python. For example, if you'…

I have never understood why MATLAB hasn't introduced proper broadcasting like APL and its successors. My problem with Numpy is its awkward notation/syntax when compared to Matlab/APL.

Re: A new release for GNU Octave

#43
post #19

Earlier quoted context omitted.

> I really dislike Matplotlib, so rendering is done in something else, usually gnuplot. This! My biggest gripe against Python numerical stuff was matplotlib, until I realized that it is an entirely optional component of the stack, and you can plot by other, much saner means.

Yes, there are many good alternatives. Seaborn, Plotly, and many more. I still use Matplotlib for most things (with the OO API), as I can control its fine details and it's more versatile. For non-graph visual things that I could use Matplotlib for, I've been generating SVGs and displaying them directly in Jupyter notebooks (with Cairo is one option, but just directly is pretty easy too).

You may have other reasons for preferring Matplotlib, but I don’t think anything allows more control over fine details or is more versitile than gnuplot.

Re: A new release for GNU Octave

#44
post #38

Earlier quoted context omitted.

Because the vast majority of Python programs aren't doing symbolic maths with Sympy. It's not a hack, and it's pretty trivial. I type "a," and press up, and run the line from my command history with all the letters in it. Sympy also has a submodule named abc you can import variables from, but I like defining them as real number variables so I don't get complex answers when they don't make sense. Sympy is just a Pytho…

> Because the vast majority of Python programs aren't doing symbolic maths with Sympy. And this, my friends, is why mathematicians will never feel at home using Python+libraries. Instead of having a programming environment ideally suited to the needs of math, you need to fit your math to the Procrustean bed of Python syntax.

SageMath solves these problems.

Re: A new release for GNU Octave

#45
post #38

Earlier quoted context omitted.

Because the vast majority of Python programs aren't doing symbolic maths with Sympy. It's not a hack, and it's pretty trivial. I type "a," and press up, and run the line from my command history with all the letters in it. Sympy also has a submodule named abc you can import variables from, but I like defining them as real number variables so I don't get complex answers when they don't make sense. Sympy is just a Pytho…

> Because the vast majority of Python programs aren't doing symbolic maths with Sympy. And this, my friends, is why mathematicians will never feel at home using Python+libraries. Instead of having a programming environment ideally suited to the needs of math, you need to fit your math to the Procrustean bed of Python syntax.

Eh, it's fine even despite your hyperbole. Applied mathematicians such as myself often use python without complaint. Setting up sympy takes no effort. Plus, #python on freenode.

Re: A new release for GNU Octave

#46

Earlier quoted context omitted.

> Because the vast majority of Python programs aren't doing symbolic maths with Sympy. And this, my friends, is why mathematicians will never feel at home using Python+libraries. Instead of having a programming environment ideally suited to the needs of math, you need to fit your math to the Procrustean bed of Python syntax.

SageMath solves these problems.

Exactly. Grandparent commenter is complaining about resolved issues that the community worked out years ago.

Re: A new release for GNU Octave

#47
post #16

I’m curious, are there any Octave users on HN? What are your use cases, in particular different to just an open-source Matlab-like clone? Why Octave not Python? I’m curious, not saying either option is bad.

I would say "Why Octave not Julia?" since Julia is specifically designed for the scientific notations and speed, unlike Python.

I have my own answer at the end of the article. It is: use Julia if you’re serious; but Octave will serve you well if you’re already used to MATLAB or have MATLAB scripts and just want to do some numerical work.

Re: A new release for GNU Octave

#49

I’m curious, are there any Octave users on HN? What are your use cases, in particular different to just an open-source Matlab-like clone? Why Octave not Python? I’m curious, not saying either option is bad.

I didn't see it anywhere, so: Octave start up speed is magnificent. If you have a larger shell script and just need to grab some eigenvalues, Octave can be as fast to startup, do its work and exit, as awk or grep would be for text manipulation.

MATLAB takes a while to start, Julia and Python need to spend a good amount of time importing/compiling.

Re: A new release for GNU Octave

#50
post #19

Earlier quoted context omitted.

Yes, there are many good alternatives. Seaborn, Plotly, and many more. I still use Matplotlib for most things (with the OO API), as I can control its fine details and it's more versatile. For non-graph visual things that I could use Matplotlib for, I've been generating SVGs and displaying them directly in Jupyter notebooks (with Cairo is one option, but just directly is pretty easy too).

You may have other reasons for preferring Matplotlib, but I don’t think anything allows more control over fine details or is more versitile than gnuplot.

GNU plot syntax somehow feels less discoverable, less intuitive, one constantly needs to be looking at the docs while doing it, was my experience.
Post reply on HN