Releases: mech-lang/mech
v0.2.27-beta
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
v0.2.25-beta
Full Changelog: v0.2.24-beta...v0.2.25-beta
v0.2.24-beta
Full Changelog: v0.2.22-beta...v0.2.24-beta
v0.2.22-beta
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
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
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
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
Full Changelog: v0.2.17-beta...v0.2.18-beta
v0.2.17-beta
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