Releases: mech-lang/mech
v0.2.9-beta
v0.2.8-beta
Column dot select
x := { x<i64> y<i8>|
1 2
3 4
5 6
7 8 };
x.y
Table swizzle
x := { x<i64> y<u8>|
1 2
4 5 };
x.x,x,y
Logical indexing
ix := [false, false, true]';
x := [1 2 3
4 5 6
7 8 9];
x[:,ix]
x[[1,2,3,3],ix]
x[ix,ix]
Full Changelog: v0.2.7-beta...v0.2.8-beta
v0.2.7-beta
1. Table dot access
x := { x<i64> y<u8>|
1 2
3 4
5 6 }
x.x -- i64 vector
x.y -- u8 vector
2. Matrix logical indexing in 2D
ix := [true false true]'
x := [1 2 3
4 5 6
7 8 9]
x[ix,2] -- slice col 2: [2; 8]
x[2,ix] -- slice row 2: [4, 6]
3. More shapes supported
a := [1.0 2.0 3.0
4.0 5.0 6.0];
b := [4.0 5.0
6.0 7.0
8.0 9.0];
c := a ** b
a := [1 2
3 4];
b := [4 5
6 7];
c := a ** b
[2] ** [10]
-[1]
[1;2] + 3
3 + [1;2]
Full Changelog: v0.2.6-beta...v0.2.7-beta
v0.2.6-beta
More matrix access patterns:
x := 4..10
x[1..=3]
x := [1 2 3
4 5 6
7 8 9];
x[2..=3, 2..=3]
x := [94 53 13];
y := [3 3]; x[y]
y := [3; 3]; x[y]
x := [94 53 13
4 5 6
7 8 9];
x[2,1..3]
x[1..3,2]
x := 1..10;
y := x';
ix := 1..5;
y[ix]'
Record dot access and Swizzling:
x := {x: 1, y: 2, z: 3};
x.x
x.y,z,z
Matrix dot access:
x := [1,2,3];
x.1
Also added a desktop application that launches a Mech REPL. It will be the basis for an IDE in the future.
Full Changelog: v0.2.5-beta...v0.2.6-beta
v0.2.5-beta
Mostly work on matrix slicing, still working on fleshing it out though.
x := [1 2; 4 5];
x[:]
x[:,2]
x[2,:]
x := [1 2 3 4; 5 6 7 8];
x[:,1..=2]
x := [1 2 3; 4 5 6; 7 8 9];
x[1..=2,:]
x[[1 1],:]
x[:,[1,1]]; y[:]
x := [94 53 13];
y := [3 3]; x[y]
y := [3; 3]; x[y]
y := 3; x[y]
ix := [false true true]; x[ix]
a := [1,2,3]'; a[2]
Full Changelog: v0.2.4-beta...v0.2.5-beta
v0.2.4-beta
Type conversion for floats, sin and cos for f32, figured out range slicing
math/cos([0.0 0.0])
math/cos(0.0)
math/sin(1.5707963267948966)
math/sin([1.570796327 1.570796327])
x := [1 2 3; 4 5 6; 7 8 9]; x[2..=3, 2..=3]
a := [1,2;3,4]; a[1,2]
false != true
x<f32> := 123;
2<u8> ^ 2<u8>
2.0 ^ 2.0
Full Changelog: v0.2.3-beta...v0.2.4-beta
v0.2.3-beta
This one has operations defined for all the numeric types.
a := [1,2;3,4]; a[2,1]
a := [1.0,2.0,3.0]; a[2]
x := [66 2 3; 66 4 66]; y := [1 2 3; 4 5 6]; x < y
[1<u8> 2<u8> 3<u8>]'
1<u8>..=4<u8>
1<u8>..4<u8>
![false true false]
!false
[true false false] ⊕ [true true false]
[true false true] | [false false true]
[true false true] & [false false true]
Full Changelog: v0.2.2-beta...v0.2.3-beta
v0.2.2-beta
Most types and operations implemented.
true == false
true == true
10 == 11
10 != 11
10 >= 10
10 <= 10
[1 8; 10 5] > [7 2; 4 11]
[1 8 10 5] < [7 2 4 11]
3 * [1 2 3]
[1 2 3] * 3
a := [1 2; 3 4]; b := [4 5; 6 7]; c := a ** b
a := [1.0 2.0 3.0; 4.0 5.0 6.0]; b := [4.0 5.0; 6.0 7.0; 8.0 9.0]; c := a ** b
Full Changelog: v0.2.1-beta...v0.2.2-beta
v0.2.1-beta
Full Changelog: v0.2-beta...v0.2.1-beta