Live data from Hacker News

In Defense of Matlab Code

runmat.org

51–60 of 174 posts

Re: In Defense of Matlab Code

#51
post #10

Earlier quoted context omitted.

Actually, I just tried Y @ X in Numpy and it works just fine. It's because in Python 1-dimensional arrays are actually a thing, unlike in Matlab. That line of code is a non-example; it is easier to make it work in Python than in Matlab.

The result of `Y @ X` has shape (3,), so the next line (concatenate as columns) fails. To make `Z` a column vector, we would need something like `Z = (Y @ X)[:,np.newaxis]`. Although, I'm not sure why the author is using `concatenate` when the more idiomatic function would be stack, so the change you suggest works and is pretty clean: Z = Y @ X np.stack([Z, Z], axis=1) # array([[14, 14], # [32, 32], # [50, 50]]) with…

You do realize how many arbitrary words and concepts that are nowhere to be found in “conventional” math there are here, right?

I know what all of these do, but I just can’t shake the feeling that I’m constantly fighting with an actual python. Very aptly named.

I also think it’s more to do with the libraries than with the language, which I actually like the syntax of. But numpy tries to be this highly unopinionated tool that can do everything, and ends up annoying to use anywhere. Matplotlib is even worse, possibly the worst API I’ve ever used.

Re: In Defense of Matlab Code

#52

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…

They’re trying to sell their product, which seems like a new language + runtime inspired by matlab. Reinventing Julia perhaps? It will be missing all the things that make matlab unique, as you point out.

Re: In Defense of Matlab Code

#53
post #52

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…

They’re trying to sell their product, which seems like a new language + runtime inspired by matlab. Reinventing Julia perhaps? It will be missing all the things that make matlab unique, as you point out.

It's open source / free. But yes, of course we want people to try it and get value from it.

Re: In Defense of Matlab Code

#54
> The issue was never the syntax—it was the runtime. Why readable math still matters in a world aided by LLM-assisted code generation

I’m going to stop you right there. Matlab has 5 issues:

1. The license

2. Most users don’t understand what makes Matlab special and they write for loops over their arrays.

3. The other license

4. The other license

5. The license server

Mathworks seems to have set up licensing to maximize how much revenue they can extract with no thought given to how deeply annoying it is to use.

Re: In Defense of Matlab Code

#55
One small piece of feedback for the dev, since I see you've been replying to comments here.

I had to jump like 3 links and 4 pages down to figure out what runmat actually "is" / "does".

As someone who's done their whole thesis using Octave this looks interesting.

I love Octave, it's one of my favourite languages. And, for reasons I don't understand even myself, I don't like matlab that much (though I admit their documentation is excellent).

How would you "sell" runmat to someone like me?

Re: In Defense of Matlab Code

#56

Interesting... I wrote a similar post about MATLAB's syntax a while ago, and I still think MATLAB is one of the best calculators on the market. RunMat is an interesting idea, but a lot of MATLAB's utility comes from the toolboxes, and unless RunMat supports every single toolbox I need, I'm going to be reaching for that expensive MATLAB license over and over again.

It's funny that you listed 1-based index as a strength, and another poster here lists it as a weakness. Goes to show there's really no agreement when it comes to indexing!

Re: In Defense of Matlab Code

#57

One small piece of feedback for the dev, since I see you've been replying to comments here. I had to jump like 3 links and 4 pages down to figure out what runmat actually "is" / "does". As someone who's done their whole thesis using Octave this looks interesting. I love Octave, it's one of my favourite languages. And, for reasons I don't understand even myself, I don't like matlab that much (though I admit their docu…

Thanks for digging in ;) We just released RunMat in August as an open-source, fast MATLAB runtime. The goal is to make it the fastest way to run math, period.

Coming from Octave, you'll notice significant speedup advantages, you can see some of our benchmarks with it here https://runmat.org/blog/introducing-runmat

Last month, we put out 250+ built-in functions and Accelerate, which fuses operations and routes between CPU/GPU without any extra code/memory management, i.e. no GPUarray.

We're still flushing out the plotting function, but we'll have updates to share around that and a browser version very soon.

Re: In Defense of Matlab Code

#59

> The issue was never the syntax—it was the runtime. Why readable math still matters in a world aided by LLM-assisted code generation I’m going to stop you right there. Matlab has 5 issues: 1. The license 2. Most users don’t understand what makes Matlab special and they write for loops over their arrays. 3. The other license 4. The other license 5. The license server Mathworks seems to have set up licensing to maximi…

That's precisely the point(s), the runtime's issues (closed source, cost, etc) are what is helping with the declining popularity of the language when really the language can be handy to people who work in math-heavy industries.

thankfully there are fast open source alternatives out there now, hint hint runmat ;)

Re: In Defense of Matlab Code

#60

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…

> Nowhere else can you get scientific computing, a GUI toolkit, a high level embedded software environment, a HiL/SiL toolkit, a model based simulation environment, a plotting and visualization toolkit and so much more in a single cohesive package. Nobody else has any offering that comes even close.

Mathematica does. Arguably Mathematica is even more cohesive because it's not split up into "feature sold separately" packages.

Post reply on HN