Skip to content

Releases: mech-lang/mech

v0.2.13-beta

30 Sep 18:57

Choose a tag to compare

Enums

<foo> := `A | `B
x<foo> := `A   -- Works!
y<foo> := `C   -- Causes an error

v0.2.12-beta

23 Sep 18:21

Choose a tag to compare

Added enum definitions:

<foo> := A | B | C;

They don't do much yet.

Full Changelog: v0.2.11-beta...v0.2.12-beta

v0.2.11-beta

17 Sep 01:38

Choose a tag to compare

v0.2.10-beta

09 Sep 18:40

Choose a tag to compare

Define Kinds

<foo> := <i64>
x<foo> := 123

More Number Literals

0b10101   -- bin
0x123abc  -- hex
0o1234    -- oct
0d1234    -- dec

Full Changelog: v0.2.9-beta...v0.2.10-beta

v0.2.9-beta

02 Sep 18:48

Choose a tag to compare

Scientific Notation

x = 123.456e5
y = 123.456E-5

Full Changelog: v0.2.8-beta...v0.2.9-beta

v0.2.8-beta

27 Aug 20:19

Choose a tag to compare

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

18 Aug 19:53

Choose a tag to compare

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

12 Aug 21:31

Choose a tag to compare

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

05 Aug 23:57

Choose a tag to compare

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

30 Jul 01:13

Choose a tag to compare

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