Live data from Hacker News

GNU Octave: A high-level interactive language for numerical computations [pdf]

octave.org

41–50 of 70 posts

Re: GNU Octave: A high-level interactive language for numerical computations [pdf]

#41
post #4
post #2

What benefit does Octave have over the Python ecosystem? Esp as a clone of proprietary software? The only thing I can see is as a way of running Matlab codes in clusters on cloud w/o having to also run the license servers.

I work as an applied mathematician writing numerical codes and I prefer to prototype in MATLAB/Octave for a number of reasons: 1. I believe it to be far easier to debug an algorithm in MATLAB/Octave than Python. When I drop into the debugger, I can immediately check things like the eigenvalues of a matrix with a simple "eig(A)" or look at the sparsity visually with "spy(A)". Though this is possible in Python, I belie…

The other thing Octave/Matlab has over Python: it's a lot easier and clearer to express numeric algorithms in Matlab than Python, as Python isn't designed as an array language.

Citation: go on github, search PRML and look at the Python versus Matlab results.

I don't know why people have a problem porting Matlab code to Octave; it's been drag and drop for me except for the more esoteric package dependencies.

Re: GNU Octave: A high-level interactive language for numerical computations [pdf]

#42

As somebody in an academic field where many scripts exist for MATLAB (mostly digital signal processing focused), there are few projects I want to succeed more than Octave. It's very hard to recommend that students and colleagues grow invested in toolchains involving proprietary software that they may not reliably be able to afford/activate/use in the future, particularly when some students may end up working in devel…

Just curious, what's your opinion on simulink

Re: GNU Octave: A high-level interactive language for numerical computations [pdf]

#43
post #2

What benefit does Octave have over the Python ecosystem? Esp as a clone of proprietary software? The only thing I can see is as a way of running Matlab codes in clusters on cloud w/o having to also run the license servers.

Matlab:

    exp(-i*pi*[0 0.5 1])
Python:

    import cmath
    import numpy as np
    np.exp(-1j*cmath.pi*np.array([0, 0.5, 1]))
Note that you can't use math.exp for complex numbers, and neither math.exp nor cmath.exp works for arrays, you need the separate np.exp. Also, while np.exp actually works on lists, the multiplication doesn't, so you need to keep in mind which variables are python lists (that you mostly cannot do arithmetic on) and which are numpy arrays.

When you are experienced in Python, you know these differences by heart. But if you are a domain specialist and want to test an idea quickly, you will see lots of TypeError messages from Python, you need to google manuals to sort it out, and it will slow you down 10x.

Re: GNU Octave: A high-level interactive language for numerical computations [pdf]

#44

Earlier quoted context omitted.

just use Julia. It's faster than Matlab, and a better language.

It is a better language indeed. Too bad that their IDE options are not par with it. Julia REPL is just that — a REPL. Julia IDEs are just editors for writing code. MATLAB integrated environment, where you can see all variables immediately, is what makes it popular; why not imitate it?

For what it's worth, the Spyder IDE for python imitates many features of MATLAB and I don't find myself missing much. The data viewer in particular is great.

Re: GNU Octave: A high-level interactive language for numerical computations [pdf]

#45
post #38

As somebody in an academic field where many scripts exist for MATLAB (mostly digital signal processing focused), there are few projects I want to succeed more than Octave. It's very hard to recommend that students and colleagues grow invested in toolchains involving proprietary software that they may not reliably be able to afford/activate/use in the future, particularly when some students may end up working in devel…

> Here's hoping that someday, Octave does to MATLAB what R has done to SPSS and SAS. SPSS and SAS have horrible, horrible scripting languages. R is just ...slighly wonky. So as a language, R was a huge improvement on its alternatives. Whereas Octave is just a clone of the Matlab language, (almost) no improvement, just slower and less access to libraries.

Its funny to me because for a lot of R users programming has very little to do with their use of R i.e. hypothesis testing using libraries like lme4 for mixed models.

Re: GNU Octave: A high-level interactive language for numerical computations [pdf]

#46
post #27

Earlier quoted context omitted.

The thing with Matlab is that, just as software, it's "great-terrible". It has an amazing number of cool little tweaks that allow quick development and it has umpteen convenient algorithms and allows one to work with matrices in a very self-contained way. But all this niceness means really that the software is more in the realm of spreadsheets than standard programming languages. Maintenance is guaranteed to be a nig…

I have to use Matlab professionally in my organization for financial risk modelling and there are some larger legacy codebases. However, I wouldn't share your opinion about maintenance issues. Like with every other language, if the code is well organized, everything is fine. Matlab integrates with SVN or GIT, you have got the functionality for unit-testing, proper debugging and profiling and namespaces through packag…

This is more or less my experience in bioinformatics, computer vision, and machine learning. MATLAB is much better than people without MATLAB experience believe. It’s also much worse than people with _only_ MATLAB experience believe. From a robust package perspective, MATLAB is probably more complete than non-statistical R, but in recent years it’s lagged far behind the scientific Python ecosystem. It’s difficult to imagine it catching up to an alternative that’s free and better (from a completeness, performance, or user experience perspective).

Re: GNU Octave: A high-level interactive language for numerical computations [pdf]

#47

As somebody in an academic field where many scripts exist for MATLAB (mostly digital signal processing focused), there are few projects I want to succeed more than Octave. It's very hard to recommend that students and colleagues grow invested in toolchains involving proprietary software that they may not reliably be able to afford/activate/use in the future, particularly when some students may end up working in devel…

I've been porting over a bunch of my old academic Matlab to Julia. It's obviously nowhere as close to Matlab syntax as Octave is, but it's a lot closer than Python. YMMV of course, but there are enough similarities that a decent proportion of my code has worked after pretty easy find/replace changes like switching array indexing from parentheses to square brackets. And I usually end up with something that runs about…

Totally. Julia (and NumPy) made a savvy decision adopting MATLAB semantics (and occssiaonally syntax) for many multi-dimensional array creation and manipulation operations. It usually takes me an afternoon or less to port complex methods written in MATLAB to NumPy.

Re: GNU Octave: A high-level interactive language for numerical computations [pdf]

#48

Earlier quoted context omitted.

> Julia is even slower Huh? This has definitely not been my experience -- most of the things I've ported over seem to run about twice as fast in Julia as in the original vectorized Matlab (and probably more like 10x faster than naive non-vectorized Matlab)..

Well written Julia should definitely be faster in most cases unless Matlab is using a specific well performing algorithm that Julia doesn't have built-in. With that being said, there are a lot of Julia posts on the subreddit or stack overflow that go like "Why is this Julia code 10x slower than my Python code"? One issue is that getting good performance out of Julia isn't always obvious without a pretty good understa…

They should be similar if they both rely on standard LLVM optimizations. I assume both have their own optimization passes on some mid-level IR but I personally don’t know whether one or the other has any particular language features that dramatically improve performance over the other. I’d like to hear more!

Re: GNU Octave: A high-level interactive language for numerical computations [pdf]

#49
post #38

Earlier quoted context omitted.

> Here's hoping that someday, Octave does to MATLAB what R has done to SPSS and SAS. SPSS and SAS have horrible, horrible scripting languages. R is just ...slighly wonky. So as a language, R was a huge improvement on its alternatives. Whereas Octave is just a clone of the Matlab language, (almost) no improvement, just slower and less access to libraries.

Its funny to me because for a lot of R users programming has very little to do with their use of R i.e. hypothesis testing using libraries like lme4 for mixed models.

If the language doesn't matter, why do you use R and not GLIMMIX in SAS?

Re: GNU Octave: A high-level interactive language for numerical computations [pdf]

#50
post #49

Earlier quoted context omitted.

Its funny to me because for a lot of R users programming has very little to do with their use of R i.e. hypothesis testing using libraries like lme4 for mixed models.

If the language doesn't matter, why do you use R and not GLIMMIX in SAS?

I didn't mean it didn't matter, just that it is not at the forefront. The real reason is the open source licensing, the huge number of quality or advanced packages for stat analysis and graphing.
Post reply on HN