Live data from Hacker News

In Defense of Matlab Code

runmat.org

31–40 of 174 posts

Re: In Defense of Matlab Code

#31
For MATLAB, there exist many high quality free and/r open source toolboxes from community and academia.

Also there are high quality free and/or open source alternatives.

GNU Octave https://octave.org and Octave online https://octave-online.net/

Freemat https://freemat.sourceforge.net/ (sadly no ongoing development)

Scilab https://www.scilab.org/ and Scilab online https://cloud.scilab.in/

Re: In Defense of Matlab Code

#33
post #15
post #7

Earlier quoted context omitted.

Precisely; today Julia already solves many of those problems. It also removes many of Matlab's footguns like `[1,2,3] + [4;5;6]`, or also `diag(rand(m,n))` doing two different things depending on whether m or n are 1.

I don't think Julia really solves any problems that aren't already solved by Python. Python is sometimes slower (hot loops), but for that you have Numba. And if something is truly performance critical, it should be written or rewritten in C++ anyway. But Julia also introduces new problems, such as JIT warmup (so it's not really suitable for scripting) and is still not considered trustworthy: https://yuri.is/not-julia…

> Python is sometimes slower (hot loops), but for that you have Numba

This is a huge understatement. At the hedge fund I work at, I learned Julia by porting a heavily optimized Python pipeline. Hundreds of hours had gone into the Python version – it was essentially entirely glue code over C.

In about two weeks of learning Julia, I ported the pipeline and got it 14x faster. This was worth multiple senior FTE salaries. With the same amount of effort, my coworkers – who are much better engineers than I am – had not managed to get any significant part of the pipeline onto Numba.

> And if something is truly performance critical, it should be written or rewritten in C++ anyway.

Part of our interview process is a take-home where we ask candidates to build the fastest version of a pipeline they possibly can. People usually use C++ or Julia. All of the fastest answers are in Julia.

Re: In Defense of Matlab Code

#34

What a terrible article. The author does not understand matlab at all and he is also either lying or totally clueless. Matlab is successful because of precisely one thing, which nobody has replicated. It offers a complete software environment from one source. Nowhere else can you get scientific computing, a GUI toolkit, a high level embedded software environment, a HiL/SiL toolkit, a model based simulation environmen…

>> The engine is closed source. You cannot see how fft or ode45 are implemented under the hood. For high-stakes engineering, not being able to audit your tools is a risk. This is just a lie. Open matlab and you can inspect all the implementation details behind ode45. It is not a black box.

How do I see the .c files / trace how `ode45` will execute on my machine? Can I see the JIT's source code?

--

Entitled to your view, but clearly difference of opinion here. From perspective of open / closed source -- maybe for you it qualifies as open source, but I can't follow the logic chain, so to me MATLAB is not open source.

Re: In Defense of Matlab Code

#35
post #8

Many people use Octave https://octave.org/ which is compatible (generally) with Matlab, supports this simple syntax, and is open source software. Indeed, I've taken at least one class where the instructor asked people use Octave for these kinds of calculations.

Yep -- Octave was very helpful for me in school.

Octave is not particularly fast.

RunMat is very fast (orders of magnitude -- see benchmarks).

Re: In Defense of Matlab Code

#36

What a terrible article. The author does not understand matlab at all and he is also either lying or totally clueless. Matlab is successful because of precisely one thing, which nobody has replicated. It offers a complete software environment from one source. Nowhere else can you get scientific computing, a GUI toolkit, a high level embedded software environment, a HiL/SiL toolkit, a model based simulation environmen…

You're too generous here. This has all the hallmarks of an AI-generated article, and HN is once again duped into passionately arguing with something that took zero effort to produce.

Re: In Defense of Matlab Code

#38

For MATLAB, there exist many high quality free and/r open source toolboxes from community and academia. Also there are high quality free and/or open source alternatives. GNU Octave https://octave.org and Octave online https://octave-online.net/ Freemat https://freemat.sourceforge.net/ (sadly no ongoing development) Scilab https://www.scilab.org/ and Scilab online https://cloud.scilab.in/

Shameless plug for RunMat (we wrote this blog article, also an open source alternative for MATLAB):

https://runmat.org

Re: In Defense of Matlab Code

#40
Of the things matlab has going for it, looking just like the math is pretty far down the list. Numpy is a bit more verbose but still 1-to-1 with the whiteboard. The last big pain point was solved (https://peps.python.org/pep-0465/) with the dedicated matmul operator in python 3.5.

Real advantages of matlab:

* Simulink

* Autocoding straight to embedded

* Reproducible & easily versioned environment

* Single-source dependency easier to get security to sign off on

* Plotting still better than anything else

Big disadvantages of matlab:

* Cost

* Lock-in

* Bad namespaces

* Bad typing

* 1-indexing

* Small package ecosystem

* Low interoperability & support in 3rd party toolchains

Post reply on HN