Matrix syntax. Please simplify matrix

Matrix syntax is very cool and you don't have to write loops use broadcasting. There is lot of engineers like to use in safe and fast language like rust. I think rust syntax looks more c++. It is hard to use for engineers who don't making programing all the time. I want to make framework to use in data processing and iot easily. Please simplify matrix.
matlab(octave and julia vv.):
a=rand(5)
b=magic(5)
b(b%2==0)=0
c=a+b
d=[c b;a a]
Matlab and Nim generate c,c++ code with that.

I don't quite get what you want, but Rust certainly will be a less ergonomic language for matrix operations compared to languages designed specifically for this field. For existing solutions, take a look at:

http://nalgebra.org/rustdoc/nalgebra/index.html

1 Like

operator overloading should be enough for common matrix manipulations, except we don't have syntactic sugar for dot multiplication, and Algebraic types

Don't you ise any scientific and matrix tools? I mean rust need syntax about data. You can't make with operator overloading. Add Julia syntatic sugar.
For example;
A=[1..10;1..10]; 10x10 matrix
A(A<5)= 7; assing 7 which less than 5
B=[A,A;A,A];
C=A-B; substract B from A

Julia is pretty awesome with matrices from what I've heard. I'm sure some macro magic may help close the gap between Julia and Rust's matrices. But for some things Julia will be the right language for the job - especially if your manipulating matrices all day long.

2 Likes

The crate named rust-ndarray has nice slicing syntax. It is not as advanced as matlab, but it is still very useful. Here is a rust-ndarray introduction for numpy users

1 Like

Sometimes i am using matrices all day. İ just want to use in new mature language. It is not to be advanced. There is lots of engineers want to use matrices in rust, in my opinion.
Thank you community. You are kind :blush:

2 Likes