Releases: mech-lang/mech
v0.2.35-beta
Better Formatter
Major changes to the formatter. Here's an example program formatted as an html document:
https://mech-lang.org/nbody.html
Language Spec
Now that we have a way to print these things nicely, work has begun on the language spec. Here's what it looks like so far:
https://mech-lang.org/specification.html
This is supposed to be a one-page document that specifies the syntax and semantics of the base Mech language. Most of the work here went toward formatting the TOC and all of the html elements properly. This document should replace grammar.mec when it's complete.
There are known bugs in the grammar here, they will be fixed as the whole document is written.
New paragraph elements
- strong
- emphasis
- strikethrough
- underline
- inline code
More coming. Because of the syntax for these, *, _, ~, and ` now have to be escaped if you want to write them out in a paragraph.
Full Changelog: v0.2.34-beta...v0.2.35-beta
v0.2.34-beta
Mech File System
The big addition this release is MechFS. With this and the formatter, we can serve Mech files as a website.
e.g.
mech serve dir1 index.mec file2.mec
Starts a server, with a directory "dir1", and two files: index.mec and file2.mec.
Then you can navigate to localhost:8081/index.mec
or localhost:8081/file2.mec
, or any of the files in dir1
. This serves the source as a formatted html file.
Code is hosted at the /code
endpoint.
e.g.
localhost:8081/code/index.mec
It's the program AST, compressed and encoded. So whoever requests it, doesn't have to recompile it they just have to decompress and decode.
Full Changelog: v0.2.33-beta...v0.2.34-beta
v0.2.33-beta
Convert array datatypes:
x<[u8]> := [1 2 3 4]
v0.2.31-beta
Full Changelog: v0.2.30-beta...v0.2.31-beta
v0.2.30-beta
Mostly improvements to formatter.
Full Changelog: v0.2.29-beta...v0.2.30-beta
v0.2.29-beta
Serve
Bring back HTTP server, wasm bin.
Format
Bring back formatter, can output formatted html.
Output formatting
Added better pretty printing for various datatypes.
Full Changelog: v0.2.26-beta...v0.2.29-beta
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
v0.1-beta
Full Changelog: v0.0.5...v0.1-alpha
0.2.26-beta
v0.2.25-beta
Full Changelog: v0.2.24-beta...v0.2.25-beta