News for hackers. Stuff that matters.
Re:Looking for Work After 25 Years of Octave by supahfly_remix on Wednesday February 08, 2017 @08:10PM (#13603758)
It seems that octave has been overtaken (in mindshare) by python/numpy. Why is that the case?
Re:Looking for Work After 25 Years of Octave by nuntius on Wednesday February 08, 2017 @08:50PM (#13603959)
Matlab has always been a quirky language. It has good libraries for common math operations, good visualization tools, good documentation, and toolboxes available for many special tasks. There are a number of common pitfalls, with well-known workarounds, that cannot be fixed without breaking backwards compatibility. The performance of a "for loop" is usually dog slow (some special cases were optimized recently). You often spend hours figuring out how to vectorize your code so it runs decently fast. OOP and other techniques have been bolted on in a workable but unusual way, and they are not widely used. Licensing costs add up.

People looking for a free Matlab replacement often gravitate to a full replacement, rather than a clone. In the past, this meant learning something like C++, a significant hurdle to migration.

Python is generally seen as a much better general-purpose language than Matlab. It is building a much larger developer community. It is no harder to learn than Matlab, and it supports similar interactive development. Tools like numpy start adding easy support for Matlab's core strengths. Python is free, even in commercial deployments.

Matlab's primary competitor used to be Excel. Python is emerging as a very real threat. Outside of the core Matlab user base, preference for Python (or Go or ...) is building fast.

Re:Looking for Work After 25 Years of Octave by SandB0x on Thursday February 09, 2017 @03:38AM (#13605513)
> The performance of a "for loop" is usually dog slow (some special cases were optimized recently). You often spend hours figuring out how to vectorize your code so it runs decently fast.

A similar story for Python and NumPy on this point, mitigated by NumPy's elegant broadcasting rules. Agree with everything else!

Re:Looking for Work After 25 Years of Octave by BeetleB on Thursday February 09, 2017 @01:07PM (#13609223)
>A similar story for Python and NumPy on this point

Not as similar. When I was in grad school and encountered NumPy, I ported over my Matlab code to NumPy. It was hard to vectorize and so I had an explicit for loop (in both code bases).

NumPy ran 7x faster.

Did not really drill down to whether it was the loop itself or the operation in it, but I suspect it was the loop itself.

Matlab really has a slow for loop.

Re:Looking for Work After 25 Years of Octave by sedachv on Thursday February 09, 2017 @01:41PM (#13609580)
Matlab/Octave is an array programming language. You are supposed to use array and matrix operations. If you are using a for loop you are writing Matlab code wrong.
Re:Looking for Work After 25 Years of Octave by BeetleB on Thursday February 09, 2017 @03:01PM (#13610364)
I think you're missing the point of the thread.

Obviously, you should vectorize your code and avoid explicit loops. In both Octave and NumPy

However, what the thread is pointing out is that if you do have explicit for loops, Octave is much slower than NumPy.

For the code I was writing, I had trouble vectorizing a particular piece of code. I'm sure if I spent many extra hours, I'd figure out some way. But why should I when it's 7x faster in NumPy without vectorizing?

And whatever way I would discover for vectorizing it in Octave would likely work for NumPy as well. It'll be a rare exception that NumPy is slower than Octave.

For me, the only reason to use Octave is if someone hands me Matlab legacy code. For my scientific computation, NumPy/SciPy has always been superior.

Ironically, Octave usage is inherently tied to Matlab's existence. Were Matlab to disappear, Octave would have little use when it comes to developing new code. I cannot think of a good reason for someone new to the field to develop in Octave, other than the need to interface with others who use Matlab.

I know this comment sounds critical, but I'm not anti-Octave. When I first started using it, I was very impressed, and I learned far more about Matlab by using Octave and reading Octave's docs than any docs from Mathworks. As a Matlab clone, it is superb.

It's just that now the alternatives to Octave are superior. Personally, I would like to see development continue for Octave, just because I appreciate it so much as an open source project. But the reality is when I give new young scientists advice, it is almost always "Use NumPy/SciPy".

Re:Looking for Work After 25 Years of Octave by Jach on Wednesday February 08, 2017 @08:43PM (#13603916)
Did Octave ever have a larger mindshare? It always seemed like the cheapskate's Matlab substitute, but if you know enough Matlab where you might consider a substitute, you probably have a Matlab license already. (Or like me a need to run on an embedded Linux while you work on a python port + a distaste for proprietary software...)

Anyway, my thought on why numpy seems more widespread is simple: efficiency.

Even Matlab code gets rewritten if it needs to be used for something intense, and Matlab has many more optimizations than Octave to get away with sloppy coding. Python+numpy is pretty easy even for a non-programmer to write (at least compared to C++ or whatever a DSP wants you to use) and even sloppily done is generally fast, plus it has a great and large community. But both Matlab and Octave are great (at least if you use octave-forge) for prototyping and doing a lot of domain specific things python/numpy/scipy don't support out of the box. Matlab especially has a lot of neat GUI helper tools. Meanwhile R is over in its own world where if you're doing anything in that domain it's a questionable choice not to take advantage.

Re:Looking for Work After 25 Years of Octave by wenc on Wednesday February 08, 2017 @10:54PM (#13604546)
The problem with Octave for most of its life was it never had a very good GUI, and that made it hard for university departments to adopt as course software. I know we tried to push Octave in our department, but it just never took off. That, plus the Mathworks offered some pretty good educational pricing.

Octave also never had the span of toolboxes that MATLAB had. With MATLAB, you could always find fairly usable toolboxes that covered most engineering computation needs.

Octave was on par with MATLAB on some fronts, but it rarely exceeded MATLAB capabilities. And it was worse than MATLAB on tooling maturity. People hate The Mathworks for charging an arm and leg for its software, and for breaking backward compatibility, but most people will admit the MATLAB environment is pretty polished and seamless compared to open-source offerings in the same space.

So far no one has mentioned Scilab (http://www.scilab.org/). Scilab is a much a better MATLAB alternative than Octave, though Scilab code is less compatible with MATLAB that Octave code.

Re:Looking for Work After 25 Years of Octave by beagle3 on Thursday February 09, 2017 @01:42PM (#13609586)
There's also FreeMat http://freemat.sourceforge.net/ which at the time had much better Matlab compatibility than Octave, and a much better GUI (comparable to Matlab's circa 2007 or so, which was when I compared them).

And for some reason, it was virtually unknown - Octave is superfamous compated to FreeMat.

Re:Looking for Work After 25 Years of Octave by HerraBRE on Thursday February 09, 2017 @09:32AM (#13607136)
Something you didn't mention, which I suspect is a major factor in why promoting FOSS alternatives proves surprisingly difficult in education.

I remember when I was in university students were acutely aware that tools like PhotoShop, Microsoft* and MATLAB were used in businesses. I doubt this has changed.

Even if superior Free options had been available, many of them would still have opted for the "safe" proprietary options because they wanted to be sure they could get work and felt (rightly or wrongly) that it was important they could put the right product names on their resumés.

Re:Looking for Work After 25 Years of Octave by jkaunisv1 on Thursday February 09, 2017 @02:03PM (#13609797)
I can't speak to Matlab/Octave but as for Photoshop, FOSS folks always say use GIMP. But the interface is just so terrible compared to PS and I think they underestimate how important that is. Maybe it's configurable but for example, simple things like alt-tabbing between GIMP and other programs was painful because it opened parts of its interface as separate windows, so you'd alt-tab to your browser, then back to GIMP, but it wouldn't show the artboard, just the tool panels. That's a separate alt-tab. And more generally, it felt like everything in GIMP took two extra clicks than the equivalent PS operation.

Most people are goal-oriented when it comes to using software, not ideological, and they'll go with what gets the job done with the least amount of effort.

Re:Looking for Work After 25 Years of Octave by Jach on Thursday February 09, 2017 @04:29PM (#13611161)
What's funny is Gimp used to be single-window, then for some reason they redesigned to multi-window crap, and now they're back to single window (at the cost of ctrl+s -- fine, whatever). Still many UI quirks for sure. I don't know how much it matters for non-trained users though, Photoshop confuses me too on the rare occasion I get to try using it. For professional artists, they're likely using more tools than just "Photoshop for everything", so it's not like they're incapable of learning new UIs even if they suck. (Edit: And generally these days I'd rather advocate for more diversity in tooling, regardless of closed/openness, just to avoid monoliths and monoculture.)

The GIMP-over-Photoshop argument should be because it does something Photoshop doesn't (very possible with its ecosystem of plugins/filters -- for example a "smart remove" plugin was around for quite some time before Adobe made their own and spent who knows how much in marketing/demos for it) or because the artist wants to save money.

Agree that people are goal oriented. OSS that's free-as-in-beer can help drive adoption on account of being free, but ultimately the best OSS succeeds because it's better than its competition in important ways. Pure clones are risky, I'm glad Gimp doesn't try too much to be a clone.

Re:Looking for Work After 25 Years of Octave by jkaunisv1 on Friday February 10, 2017 @02:53PM (#13618329)
It's not really about being incapable of learning new UIs though - I'm perfectly capable, I just don't want to. Why learn a UI that takes 3X as many steps to chop up a site design when there's one that takes X?

Sadly most artists who want to save money just pirate, which is what led to the terrible Creative Cloud situation. But that led to Affinity which seems to be a solid, buy-once (for cheap!) replacement. I agree the monolithic nature of Adobe is bad for everybody but that's not a reason to choose a subpar tool. Also people can write and sell their own plugins for Adobe products as well.

Anyway I think we're mostly on the same page.

Re:Looking for Work After 25 Years of Octave by wenc on Thursday February 09, 2017 @11:00AM (#13607810)
You make a good point. MATLAB, rightly or wrongly, has become a signal for engineering computation skillset on resumes.

That said, the world has become more accommodating in other ways. Python and R are now more well-accepted signals for data skillset than say, SAS. (exceptions: finance, pharma)

Re:Looking for Work After 25 Years of Octave by geokon on Wednesday February 08, 2017 @10:11PM (#13604339)
While R is superficially very similar - having used both, my impression is that it's actually not for the same use-cases as Matlab/Octave. Matlab is primarily for linear algebra, while R is primarily for data-frame manipulation (which is more like SQL). So while they both can do the others job, things get clunky really fast
Re:Looking for Work After 25 Years of Octave by alexhutcheson on Wednesday February 08, 2017 @10:34PM (#13604466)
Out of curiosity, what are the pain points you run into using R for linear algebra? I've found it's not too bad for the basic things I've used it for, but my needs admittedly weren't very complex.
Re:Looking for Work After 25 Years of Octave by lukaslalinsky on Thursday February 09, 2017 @01:04AM (#13605023)
The scientific libraries for Python have gotten so good that Octave doesn't really have a chance, unless you are just interested in running some (old) MATLAB code and can't get MATLAB itself. This is really all about the libraries and frameworks, rather than the language. And with Jupyter notebooks you get a great UI which is something Octave never had.
Re:Looking for Work After 25 Years of Octave by tavert on Thursday February 09, 2017 @01:19AM (#13605085)
Octave has a GUI nowadays which is pretty good, but a bit late to make much difference.
Re:Looking for Work After 25 Years of Octave by pm90 on Wednesday February 08, 2017 @08:48PM (#13603939)
Like other have said, the #1 reason is probably just being part of the python ecosystem. But there were other reasons as well: there has been a big push in academia where MATLAB was used extensively to use Python when it became available (because its free and open source; but also many licensing restrictions around MATLAB). So there has been a significant investment in the python/numpy ecosystem from both academics and industry players who don't want to deal with these licensing issues (e.g. Oil and Gas companies).
Re:Looking for Work After 25 Years of Octave by xapata on Wednesday February 08, 2017 @08:12PM (#13603767)
Python is general-purpose and more people use it. There are many reasons, but the preferential attachment model is sufficient to explain your observations, in this comparison.
Re:Looking for Work After 25 Years of Octave by thanatropism on Wednesday February 08, 2017 @08:17PM (#13603797)
The short answer is "scikit-learn".
Re:Looking for Work After 25 Years of Octave by supahfly_remix on Wednesday February 08, 2017 @08:23PM (#13603818)
Can you please give the longer answer? I don't understand what you mean. What does scikit-learn have that octave doesn't? (Asking out of ignorance)
Re:Looking for Work After 25 Years of Octave by CydeWeys on Wednesday February 08, 2017 @08:35PM (#13603878)
It's commonly featured in machine learning MOOCs. Sometimes things win mindshare for reasons other than feature sets.
Re:Looking for Work After 25 Years of Octave by hprotagonist on Wednesday February 08, 2017 @08:26PM (#13603835)
and/or pandas, opencv, seaborn, bokeh.

or R.

Re:Looking for Work After 25 Years of Octave by GFK_of_xmaspast on Wednesday February 08, 2017 @08:39PM (#13603895)
Octave is basically a not-as-good-but-free version of matlab, and matlab is an abomination. See forex: http://archive.is/tCo6B