Skip to content

Releases: mech-lang/mech

v0.2.27-beta

30 Dec 21:19
Compare
Choose a tag to compare

Lots of improvements to the REPL.

Added the following commands:

:help, :h       Display this help message
:quit, :q       Quit the REPL
:symbols, :s    Display all symbols
:plan, :p       Display the plan
:whos, :w       Display all symbols
:clear          Clear the interpreter state
:clc            Clear the screen
:load           Load a file
:ls             List directory contents
:cd             Change directory
:step           Step through the plan

Variables are now immutable by default. To make them mutable, prefix with ~

~x := [1 2 
       4 5] 
x[2] = 42      -- x == [1 2; 42 5]

y := 7
y = 10         -- Error!

Full Changelog: v0.2.26-beta...v0.2.27-beta

0.2.26-beta

23 Dec 21:26
Compare
Choose a tag to compare

Performance improvements.

REPL tools.

Full Changelog: v0.2.25-beta...v0.2.26-beta

v0.2.25-beta

17 Dec 20:36
Compare
Choose a tag to compare

v0.2.24-beta

12 Dec 03:34
Compare
Choose a tag to compare

v0.2.22-beta

02 Dec 01:54
Compare
Choose a tag to compare

Modules

Big change here is a refactor separating the interpreter from the base types of Mech, making way for modules. Now the stdlib can be excised from the interpreter.

More Horizontal Concatenate Shapes

x := [4]; y := [5]; w := [6]; v := [7]; 

z := [x x y];
z := [x y x];
z := [y x x];

z := [1 1 y];
z := [1 y 1];
z := [y 1 1];

z := [1 x y];
z := [x 1 y];
z := [1 y x];
z := [x y 1];
z := [y 1 x];
z := [y x 1];

z := [1 2 3 x];
z := [x 1 2 3];
z := [1 x 2 3];
z := [1 2 x 3];

z := [1 x 2 y];
z := [x 1 2 y];
z := [x 1 y 2];

z := [x y w 1];
z := [x 1 y w];
z := [1 x y w];
z := [x y w v];

x := [1 2]; y := [x x x]

Full Changelog: v0.2.21-beta...v0.2.22-beta

v0.2.21-beta

25 Nov 20:50
Compare
Choose a tag to compare

Logical Indexing

x := [1 2 3 4]; ix := [true false true true]; x[ix] = 5;
x := [1 2 3]; x[4 > 3] = 5;
x := [1 2; 4 5]; x[[true false], 2] = 42;
x := [1 2; 4 5]; x[2,[false true]] = 42; 
x := [1 2; 4 5]; x[[true false],[false true]] = 42;

Horizontal Array concatenation

x := [1 2]; y := [x 3];
z := [3]; y := [x z];
y := [z x];
y := [3 x];
y := [x 3];

x := [1]; y := [x]
y := [1 x]

x := [1 2]; y := [x]
y := [x 1]
y := [x x]
y := [1 x]
y := [x 1]

x := [1 2]; y := [x x]

x := [1 2 3]; z := [1]; y := [z x]
z := [1]; y := [x z]

y := [1 2 x]
y := [1 x 2]
y := [x 1 2]
y := [x x x]

z := [2] 
y := [1 z x]
y := [z 1 x]
y := [z x 1]

Full Changelog: v0.2.20-beta...v0.2.21-beta

v0.2.20-beta

18 Nov 23:04
Compare
Choose a tag to compare

This release adds a number of feature flags to turn on/off builtin matrix dimensions. Will help to compile muuuuuuch smaller binaries by only including the functions we need to run the program.

v0.2.19-beta

12 Nov 01:48
Compare
Choose a tag to compare

Table Indexing

x := { x<f64> y<f64> | 
       1      2 
       3      4 }
x.x = [42; 46]

Logical Indexing

x := [1 2 3]
ix := [true false true]
x[ix] = 4     -- [4 2 4]

Full Changelog: v0.2.18-beta...v0.2.19-beta

v0.2.18-beta

05 Nov 18:43
Compare
Choose a tag to compare

v0.2.17-beta

29 Oct 02:31
Compare
Choose a tag to compare

Numbers default to f64

The default numeric type has been switched to f64.

Set Value

-- scalar
x := 1.23; 
x = 4.56;

-- row vector
x := [6,2] 
x[1] = 4

Full Changelog: v0.2.16-beta...v0.2.17-beta