Skip to content

Commit 691cdd4

Browse files
committed
Merge branch 'v0.2-beta' into 'main'
V0.2.26 beta See merge request mech-lang/mech!89
2 parents 70b57e1 + 0f1bf1e commit 691cdd4

39 files changed

+3387
-2263
lines changed

Cargo.toml

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mech"
3-
version = "0.2.25"
3+
version = "0.2.26"
44
authors = ["Corey Montella <[email protected]>"]
55
description = "Mech is a reactive programming language for building robots, games, and animations."
66
documentation = "https://mech-lang.org/docs"
@@ -18,9 +18,9 @@ gitlab = { repository = "mech-lang/mech", branch = "main" }
1818
maintenance = { status = "actively-developed" }
1919

2020
[dependencies]
21-
mech-core = "0.2.25"
22-
mech-syntax = "0.2.25"
23-
mech-interpreter = "0.2.25"
21+
mech-core = "0.2.26"
22+
mech-syntax = "0.2.26"
23+
mech-interpreter = "0.2.26"
2424

2525
clap = {version = "4.5.21", features = ["cargo"]}
2626
colored = "2.1.0"
@@ -60,10 +60,10 @@ mech-interpreter = { path = 'src/interpreter'}
6060
#mech-logic = { path = '../machines/logic' }
6161

6262
[patch.'https://gitlab.com/mech-lang/core']
63-
mech-core = { path = 'src/core', version = '0.2.25' }
63+
mech-core = { path = 'src/core', version = '0.2.26' }
6464

6565
[patch.'https://gitlab.com/mech-lang/syntax']
66-
mech-syntax = { path = 'src/syntax', version = '0.2.25' }
66+
mech-syntax = { path = 'src/syntax', version = '0.2.26' }
6767

6868
[patch.'https://gitlab.com/mech-lang/interpreter']
69-
mech-interpreter = { path = 'src/interpreter', version = '0.2.25' }
69+
mech-interpreter = { path = 'src/interpreter', version = '0.2.26' }

README.md

+29-6
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,45 @@ Comprehensive documentation is available at [mech-lang.org](https://mech-lang.or
1818

1919
Download the latest release for your platform [here](https://github.com/mech-lang/mech/releases/latest).
2020

21-
### 🔨 From Source
21+
### 📦 From Source
2222

23-
To build Mech from source, you’ll need to install [Rust](https://www.rust-lang.org/learn/get-started) (nightly version). Follow the instructions below to compile the Mech toolchain, bundled in a single executable called `mech`:
23+
To build Mech from source, you’ll first need to install [Rust](https://www.rust-lang.org/learn/get-started) (make sure to install a recent version on the nightly release channel).
24+
25+
Then follow the instructions below to compile the Mech toolchain, bundled in a single executable called `mech`:
2426

2527
```bash
2628
git clone https://gitlab.com/mech-lang/mech
2729
cd mech
2830
cargo build --bin mech --release
2931
```
3032

31-
## 🚧 Project Roadmap
33+
### 🪐 Community
34+
35+
- 👾 [Discord](https://discord.gg/asqP25NNTH) - for live chat
36+
- 🐙 [GitHub](https://github.com/mech-lang) - for code and issues
37+
- 📺 [YouTube](https://youtube.com/@coreymontella3520?si=EUy2Mrv1aNo-4uQr) - for video tutorials
38+
- 🛸 [Reddit](https://www.reddit.com/r/mechlang/) - for help and discussion
39+
40+
## 🗺️ Project Roadmap
41+
42+
Mech v0.2 is currecntly **beta** status, meaning most intended features are implemented, but there are still rough edges and a general lack of documentation.
43+
44+
This release focuses on specifying data and formulas.
45+
46+
A Brief Roadmap:
47+
48+
- 📍 v0.2 - data specification - formulas, defining and manipulating data
49+
- v0.3 - program specification - functions, modules, state machines
50+
- v0.4 - system specification - tools, distributed programs, capabilities
51+
52+
For more details, read the [ROADMAP](ROADMAP.mec).
53+
54+
A new version of Mech is [released every week](https://github.com/mech-lang/mech/releases).
3255

33-
Mech is being redesigned to integrate state machines into the language, with development happening in the v0.2-beta branch.
56+
## 🐲 Notice
3457

35-
The v0.2 release is planned for October 2024. For more details, check out the [ROADMAP.mec](ROADMAP.mec).
58+
Mech should be considered unstable and therefore unfit for use in critical systems until v1.0 is released.
3659

3760
## ⚖️ License
3861

39-
Licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0).
62+
Licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0).

ROADMAP.mec

+59-6
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,73 @@ Mech Project Roadmap
99
Conception: started 2014
1010
Implementation: started 2018
1111

12-
(b) Stage 2 - Beta v0.1.0 - ?
12+
(b) Stage 2 - Beta v0.1.0 - v0.4+ (???)
1313

1414
Started: December 2022
15-
Currently: v0.2.7 (2024)
15+
Currently: v0.2.25 (2024)
1616

17-
- v0.2 (data specification)
18-
- v0.3 (program specification)
19-
- v0.4 (system specification)
17+
- v0.2 (data specification) (Wrapping Up)
18+
- v0.3 (program specification) (Starting in 2025)
19+
- v0.4 (system specification)
2020

2121
(c) Stage 3 - Stable v1.0.0
2222

2323
Target release date: ???
2424

25-
2. Nearterm Goals
25+
2. Feature Status
26+
-------------------------------------------------------------------------------
27+
28+
o - concept
29+
p - proof of concept implementation
30+
a - alpha implementation
31+
b - beta implementation
32+
c - feature complete
33+
34+
a) Data Specification
35+
- variety of numerical datatypes
36+
- imaginary and scientific numbers
37+
- flexible matrix type with fixed and dynamic sizes for homogeneous data
38+
- typed tables for heterogeneous data
39+
- sets
40+
- maps
41+
- enums
42+
- bools
43+
- strings
44+
- atoms
45+
- variable slicing
46+
- operator broadcasting
47+
- builtin linear algebra tools
48+
- logical indexing
49+
- matrix builder notation
50+
- variable type and size checking
51+
- variable type inference
52+
- standard library functions
53+
54+
b) Program Specification
55+
- physical units with dimension checking
56+
- state machines
57+
- user functions
58+
- automatic differentiation
59+
- introspection
60+
- tests
61+
- profiler
62+
- file/parameter server
63+
- repl
64+
- gui
65+
- executables
66+
- time travel debugging
67+
- literate programming
68+
- live coding
69+
- multiple dynamic dispatch
70+
- language server
71+
72+
c) System specification
73+
- capability permissions
74+
- gpgpu
75+
- distributed programs
76+
- concurrent programming
77+
78+
3. Nearterm Goals
2679
-------------------------------------------------------------------------------
2780

2881
Version 0.3.0 (Spring 2025) ---------------------------------------------------

src/bin/main.rs

+39-32
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use std::time::Instant;
1111
use std::fs;
1212
extern crate nalgebra as na;
1313
use na::{Vector3, DVector, RowDVector, Matrix1, Matrix3, Matrix4, RowVector3, RowVector4, RowVector2, DMatrix, Rotation3, Matrix2x3, Matrix6, Matrix2};
14+
use std::thread;
1415

1516
fn main() -> Result<(),MechError> {
1617

@@ -20,43 +21,49 @@ fn main() -> Result<(),MechError> {
2021

2122
match parser::parse(&s) {
2223
Ok(tree) => {
23-
println!("----------- SYNTAX TREE ---------");
24-
println!("{:?}",hash_str(&format!("{:#?}", tree)));
25-
println!("{:#?}", tree);
26-
//let result = analyze(&tree);
27-
//println!("A: {:#?}", result);
28-
let mut intrp = Interpreter::new();
29-
let result = intrp.interpret(&tree)?;
30-
31-
println!("{:#?}", intrp.symbols);
32-
println!("{}", result.pretty_print());
33-
34-
/*{
35-
let plan_brrw = intrp.plan.borrow();
36-
let p1 = &plan_brrw[1];
37-
println!("&&& {:?}", p1.out());
38-
}*/
39-
40-
println!("Plan: ");
41-
for fxn in intrp.plan.borrow().iter() {
42-
println!(" - {}", fxn.to_string());
43-
}
44-
45-
let now = Instant::now();
46-
let n = 1e3 as usize;
47-
for _ in 0..n {
24+
let handle = thread::spawn(move || {
25+
println!("----------- SYNTAX TREE ---------");
26+
println!("{:?}",hash_str(&format!("{:#?}", tree)));
27+
println!("{:#?}", tree);
28+
//let result = analyze(&tree);
29+
//println!("A: {:#?}", result);
30+
let mut intrp = Interpreter::new();
31+
let result = intrp.interpret(&tree).unwrap();
32+
33+
println!("{:#?}", intrp.symbols);
34+
println!("{}", result.pretty_print());
35+
36+
/*{
37+
let plan_brrw = intrp.plan.borrow();
38+
let p1 = &plan_brrw[1];
39+
println!("&&& {:?}", p1.out());
40+
}*/
41+
42+
println!("Plan: ");
4843
for fxn in intrp.plan.borrow().iter() {
49-
fxn.solve();
44+
println!(" - {}", fxn.to_string());
5045
}
51-
}
52-
let elapsed_time = now.elapsed();
53-
let cycle_duration = elapsed_time.as_nanos() as f64;
54-
println!("{:0.2?} ns", cycle_duration / n as f64);
5546

56-
let tree_string = hash_str(&format!("{:#?}", tree));
57-
println!("{:?}", tree_string);
47+
let plan_brrw = intrp.plan.borrow();
48+
let now = Instant::now();
49+
let n = 1e6 as usize;
50+
for _ in 0..n {
51+
for fxn in plan_brrw.iter() {
52+
fxn.solve();
53+
}
54+
}
55+
let elapsed_time = now.elapsed();
56+
let cycle_duration = elapsed_time.as_nanos() as f64;
57+
println!("Total Time: {:0.2?} ns", cycle_duration as f64);
58+
println!("Cycle Time: {:0.2?} ns", cycle_duration / n as f64);
59+
60+
5861

62+
let tree_string = hash_str(&format!("{:#?}", tree));
63+
println!("{:?}", tree_string);
64+
});
5965

66+
handle.join().unwrap();
6067

6168
//let mut ast = Ast::new();
6269
//ast.build_syntax_tree(&tree);

0 commit comments

Comments
 (0)