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.
A new release for GNU Octave
61–70 of 99 posts
Re: A new release for GNU Octave
#62I’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.
However, its lack of support for Unicode variables and filenames is very frustrating in this day and age…
(I understand that they are being stuck due to Matlab having poor support too.)
Re: A new release for GNU Octave
#63Earlier 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.
Re: A new release for GNU Octave
#64There was a point in my education where I had mastered my trusty TI-83; I knew the purpose of every single function and how to use them. But then, I started running into problems in the real world that required more than 32 KB of memory to solve. When I moved to a laptop I had to relearn all of that knowledge again. Haven't touched my TI-83 since.
It would be nice if the tools we learned how to use in school could also be useful in solving our problems after we graduate!
Re: A new release for GNU Octave
#65Earlier 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.
Re: A new release for GNU Octave
#66Earlier quoted context omitted.
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
#67Earlier quoted context omitted.
> how much better MATLAB is at plotting than Python or Octave (or Julia). To make sure I’m understanding you correctly, you’re saying Matlab is much better at plotting than Octave? I’ve only ever used the latter, so I guess that would be one reason to consider switching to the former.
Last time I tried a few years ago, Octave couldn't hold a candle to Matlab's plotting functions. It's a different league.
Re: A new release for GNU Octave
#68Earlier quoted context omitted.
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.
Matlab has had broadcasting since 2016 (and obviously octave since forever)
Re: A new release for GNU Octave
#69Earlier quoted context omitted.
This is the main use case where I've used octave: working with someone of a group who has developed fairly involved Matlab codebase and we need to make it more scalable in some way, either for long running computation, reducing license costs, perform distributed memory work, or enable more robust parametric space exploration. The Achilles heel here is that in Matlab, there's quite often a licensed toolbox dependency…
The luck in my case is, since we're testing either algorithms for formulations, most (if not all) code is written in pure MATLAB and has no toolbox dependency. However, we're living in a matrix world. MATLAB is slow and Octave is even slower while working with matrices. I have no idea how to fix that part.
I'm curious what you mean with this. Matlab was always fast with matrices (but my experience is now from 2 decades ago). The thing that was slow was loops. That is:
for i = 1:100
c(i) = a(i) + b(i);
end
would always be slower than this: c = a .+ b;
The trick in my work was to always find matrix/vector operations that were equivalent to my desired loop and conditional structures. I could improve execution by 100x or more for many programs doing this.Re: A new release for GNU Octave
#70I’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'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…
If I'm allowed to offer a (non-opinionated) counterpoint, I have almost the opposite experience and opinions to you (both in the positives and negatives).
Background: I have been working daily with python for the last 3 years in a scientific field. Before this, I worked daily with octave for about 3 years in a similar field. I'm equally happy and skilled in both languages.
So, to counter: point 1: I mostly agree, though I think the 'frequent source of bugs' point is slightly dramatic. If anything, to me it feels like the numpy system is much more conducive to bugs (e.g. given all the acrobatics one needs to do to ensure compatible ranks).
point 2: You absolutely do need to import libraries in octave. And that is generally a positive thing for a number of reasons, not too dissimilar to python. However unlike python, the octave team maintains relatively strict control and quality-processes for 'official' and 'endorsed (third party)' packages. This has an advantage over python where for each popular package there are 100 clones and variants and poor or unfinished packages, sometimes even phishing packages.
As for 'packages' in matlab, it's true you don't need to 'import' toolboxes, but this is only because of matlab's business model which sells them as add-ons. You can think of 'enable in licence' as an import of sorts if you'd like.
point 3: Octave derives its plotting syntax from matlab, and for the most part it's very intuitive. I always felt matplotlib is a poor attempt at replicating that syntax, but thankfully there are alternatives.
point 4: It's true that octave's biggest compatibility problem with matlab is in the 'toolboxes vs equivalent package' case. Which is partly why octave has been providing bindings to equivalent python packages as a workaround (same as Julia). One of the more successful examples is octave's reimplementation of python's sympy package, to create a symbolic package using matlab's api and simplicity of syntax, but calling python's sympy under the hood.
As for the "python has more stuff", this is purely the networking effect. And while obvioulsly the networking effect is not a trivial issue for any language, as an open source project it is always a matter of time, which is not something that can be said for something like matlab. And I'm sure that octave's rising popularity in recent years through its promotion in things like Andrew Ng's introductory course to machine learning, can only lead to an increased engagement with the language, and we can expect lots of good packages to crop up as a result.
point 5 (not labelled as such). I don't think the "python > matlab/octave" mantra is necessarily true. It's just personal opinion + engagement. It is certainly true that python has more users, but there are many reasons for that which cannot be reduced to a simple "python > matlab/octave". As for jupyter notebooks, I really dislike them and much prefer matlab/octave's 'publish' for producing straightforward html reports. But, again, that's just personal preference. Also, I much prefer 1-bassed indexing and closed ranges, as I find them much less prone to bugs.
I agree about the prohibitive nature of Matlab's licence, but I do not necessarily agree that the "natural" choice is therefore python. Surely the decision is more multifactorial than that. After all, if it's ecosystem you're after, why not julia? or c++? or java? In my view, octave is a reasonable contender regardless of an existing matlab codebase. It is a friendly language, with a big open-source community, excellent math and graphing facilities, and can easily interface with other languages if you really need that extra pizzaz on occasion, without the overhead that comes from needing to have your whole project based on those languages.