Skip to content

Commit a4ea135

Browse files
committed
Merge branch 'v0.2-beta' into 'main'
V0.2.66-beta See merge request mech-lang/mech!148
2 parents 8da4284 + fc8d5d5 commit a4ea135

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+929
-531
lines changed

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mech"
3-
version = "0.2.65"
3+
version = "0.2.66"
44
authors = ["Corey Montella <[email protected]>"]
55
description = "Mech is a programming language for building reactive systems like robots, games, and animations."
66
documentation = "https://docs.mech-lang.org"
@@ -167,9 +167,9 @@ matrix_vertcat = ["matrix"]
167167
nalgebra = "0.34.0"
168168

169169
[dependencies]
170-
mech-core = { version = "0.2.65", default-features = false }
171-
mech-syntax = { version = "0.2.65", default-features = false }
172-
mech-interpreter = { version = "0.2.65", default-features = false }
170+
mech-core = { version = "0.2.66", default-features = false }
171+
mech-syntax = { version = "0.2.66", default-features = false }
172+
mech-interpreter = { version = "0.2.66", default-features = false }
173173

174174
sevenz-rust = "0.6.1"
175175
colored = "3.0.0"
@@ -232,13 +232,13 @@ mech-logic = { path = 'machines/logic' }
232232
mech-set = { path = 'machines/set' }
233233

234234
[patch.'https://gitlab.com/mech-lang/core']
235-
mech-core = { path = 'src/core', version = '0.2.65' }
235+
mech-core = { path = 'src/core', version = '0.2.66' }
236236

237237
[patch.'https://gitlab.com/mech-lang/syntax']
238-
mech-syntax = { path = 'src/syntax', version = '0.2.65' }
238+
mech-syntax = { path = 'src/syntax', version = '0.2.66' }
239239

240240
[patch.'https://gitlab.com/mech-lang/interpreter']
241-
mech-interpreter = { path = 'src/interpreter', version = '0.2.65' }
241+
mech-interpreter = { path = 'src/interpreter', version = '0.2.66' }
242242

243243
#[patch.'https://gitlab.com/mech-lang/wasm']
244244
#mech-wasm = { path = 'src/wasm', version = '0.2.44' }

README.md

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,41 @@
1-
<p align="center">
1+
<center>
22
<img width="500px" src="https://mech-lang.org/img/logo.png" alt="Mech Logo">
3-
</p>
3+
</center>
44

5-
**Mech** is a language for building **data-driven** and **reactive** systems like robots, games, user interfaces, and more. It simplifies **composing**, **transforming**, and **distributing** data, so you can focus on the core complexities of your project.
5+
**Mech is for building** data-driven, reactive systems like **robots**, games, embedded devices and more.
66

7-
[Try Mech](https://try.mech-lang.org) online in your browser or stay updated through our [blog](https://mech-lang.org/blog/).
7+
**It simplifies data** distribution, transformation, and analysis **so you can focus** on your project.
88

9-
## 📂 Download and Install
9+
- [Try Mech](https://try.mech-lang.org) online in your browser.
10+
- [Read the docs](https://docs.mech-lang.org) to learn the language.
11+
- [Follow our blog](https://mech-lang.org/blog/) to stay updated on new developments.
1012

11-
### 💾 From Binary
13+
The following code implements FizzBuzz in Mech:
1214

13-
Download the latest release for your platform [here](https://github.com/mech-lang/mech/releases/latest).
15+
<center>
16+
<img width="680px" src="https://mech-lang.org/img/fizzbuzzblock.png" alt='The classic FizzBuzz program expressed in Mech: x := 1..=10;~out<[string]>:=x;ix2:=(x % 2) == 0;ix3:=(x % 3) == 0;out[ix2]="✨";out[ix3]="🐝";out[ix2 && ix3]="✨🐝";'>
17+
</center>
1418

15-
### 📦 From Source
19+
See the docs for an [extended version](https://docs.mech-lang.org/examples/fizzbuzz.html) that runs live in your browser.
1620

17-
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, currently `nightly-2025-01-15`).
21+
Some notable features of Mech are demonstrated in this short program:
22+
23+
- **Concise Syntax**: Expressive and flexible, with no need for keywords or semicolons; Mech programs are generally shorter than in other languages.
24+
- **Broadcast Operations**: Vector operations apply elementwise automatically, removing explicit loops and enabling efficient vectorization.
25+
- **Logical Indexing**: Vector elements are conditionally selected using broadcast logic operations, enabling declarative iteration and parallel execution.
26+
- **Type Inference**: Variable and expression types are inferred, so explicit type declarations are often unnecessary.
27+
- **Immutable**: Variables are immutable unless specified, promoting safer code and easier reasoning.
28+
- **Rich Text**: Mech programs support rich formatting and literate programming through Mechdown, a Markdown dialect.
29+
30+
## 💾 Download and Install
31+
32+
### From Binary
33+
34+
[Download](https://docs.mech-lang.org/getting-started/install.html) the precompiled latest release for your platform.
35+
36+
### From Source
37+
38+
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, currently we are developing against `nightly-2025-07-31`).
1839

1940
Then follow the instructions below to compile the Mech toolchain, bundled in a single executable called `mech`:
2041

@@ -32,19 +53,19 @@ cargo install mech
3253

3354
## 📚 Documentation
3455

35-
New to Mech? Start with [Learn Mech in Fifteen Minutes](https://docs.mech-lang.org/III.guides/mech-in-fifteen-minutes.html).
56+
New to Mech? Start with [Learn Mech in Fifteen Minutes](https://docs.mech-lang.org/guides/mech-in-fifteen-minutes.html).
3657

3758
Comprehensive documentation is available at [docs.mech-lang.org](https://docs.mech-lang.org) and open-sourced on [GitHub](https://github.com/mech-lang/mech/tree/main/docs).
3859

3960
## 🪐 Community
4061

4162
The Mech community stays active at a few places around the Internet:
4263

43-
- 👾 [Discord](https://discord.gg/asqP25NNTH) - for live chat
44-
- 🐙 [GitHub](https://github.com/mech-lang) - for code and issues
45-
- 📺 [YouTube](https://www.youtube.com/@MechLang) - for video tutorials
46-
- 🛸 [Reddit](https://www.reddit.com/r/mechlang/) - for help and general discussion
47-
- 📧 [Mailing List](https://groups.google.com/g/mechtalk) - for dev discussion
64+
- [Discord](https://discord.gg/asqP25NNTH) - for live chat
65+
- [GitHub](https://github.com/mech-lang) - for code and issues
66+
- [YouTube](https://www.youtube.com/@MechLang) - for video tutorials
67+
- [Reddit](https://www.reddit.com/r/mechlang/) - for help and general discussion
68+
- [Mailing List](https://groups.google.com/g/mechtalk) - for dev discussion
4869

4970
Feel free to stop by and introduce yourself -- we're happy to meet new users and answer questions!
5071

@@ -59,7 +80,7 @@ A Brief Roadmap:
5980
- ☐ v0.3 - program specification - functions, modules, state machines
6081
- ☐ v0.4 - system specification - tools, distributed programs, capabilities
6182

62-
For more details, read the [ROADMAP](https://docs.mech-lang.org/IV.design/roadmap.html).
83+
For more details, read the [ROADMAP](https://docs.mech-lang.org/design/ROADMAP.html).
6384

6485
A new version of Mech is [released every week](https://github.com/mech-lang/mech/releases).
6586

docs/design/ROADMAP.mec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Implementation: started 2018
1212
(1.2) Stage 2 - Beta v0.1.0 - v0.4+ (???)
1313

1414
Started: December 2022
15-
Currently: v0.2.64 (Summer 2025)
15+
Currently: v0.2.66 (Fall 2025)
1616

1717
- v0.2 (data specification) (Current Work)
1818
- v0.3 (program specification) (Starting in 2026)
@@ -142,7 +142,7 @@ Current work is focused on reimplementing the core of the Mech language to reori
142142
-[x] Language Spec
143143
-[x] Learn Mech in 15 Minutes
144144

145-
(3.2) Version 0.3.0 (Summer 2025)
145+
(3.2) Version 0.3.0
146146

147147
-[ ] Dec64
148148
-[ ] Currency

docs/design/history.mec

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,30 @@ Mech includes all of the matrix operations, data manipulation, and high-level ab
5454
which make it more suitable for building complex, distributed systems from prototype to production.
5555

5656
So why Mech? If you're looking to build a complex system, something on the order of a robot car, Mech will allow you to implement it in fewer lines of code, with performance on par with systems langauges, but safety and flexibility that you would expect from a high-level language.
57+
58+
***
59+
60+
[^1]: The United States Defense Advanced Research Projects Agency, formerly ARPA, which is responsible for developing emerging technologies for the United States military. Its most famous project is the ARPANET, which was the precursor to the modern Internet.
61+
62+
[^2]: The Ben Franklin Racing Team was a partnership between University of Pennsylvania, Lehigh University, and Lockheed Martin. Lehigh University is the author's graduate alma mater.
63+
64+
65+
[CMU1]: CMU: http://www.tartanracing.org/team.html
66+
[CMU2]: CMU: https://www.ri.cmu.edu/pub_files/2007/4/Tartan_Racing.pdf
67+
[CMU3]: CMU: https://www.cs.cmu.edu/~aldrich/courses/654/tools/coverity-on-boss.pdf
68+
69+
[STAN1]: Stanford: https://cs.stanford.edu/group/roadrunner/team.html
70+
[STAN2]: Stanford: https://robots.stanford.edu/papers/junior08.pdf
71+
72+
[MIT1]: MIT: https://grandchallenge.mit.edu/index.shtml
73+
[MIT2]: MIT: https://dspace.mit.edu/handle/1721.1/39822
74+
75+
[VT1]: Virginia Tech: https://www.romela.org/wp-content/uploads/2015/05/Odin-Team-VictorTango’s-Entry-in-the-DARPA-Urban-Challenge.pdf
76+
[VT2]: Virginia Tech: https://web.archive.org/web/20080524000738/http://www.victortango.org/
77+
[VT3]: Virginia Tech: https://news.vt.edu/articles/2007/08/2007-429.html
78+
79+
[BFRT1]: BFRT: https://vaderlab.wordpress.com/the-ben-franklin-racing-team/
80+
[BFRT2]: BFRT: https://onlinelibrary.wiley.com/doi/abs/10.1002/rob.20260
81+
82+
[CU1]: Cornell: https://onlinelibrary.wiley.com/doi/abs/10.1002/rob.20253
83+
[CU2]: Corenell: http://www.coep.ufrj.br/~ramon/COE-841/robotics/book%202009%20-%20The%20DARPA%20Urban%20Challenge%20-%20Buehler,%20Iagnemma%20&%20Singh.pdf

docs/design/language-design.mec

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,27 @@ Some design goals of Mech include:
7777
- The language should be learnable by a wide range of people, from beginners to experienced programmers, from students to professionals, and from artists to scientists.
7878

7979

80-
(1.3) Family Tree
80+
(1.3) Lineage
8181

82-
Mech is inspired by the following programming languages:
82+
Mech draws inspiration from a number of other languages and paradigms, including:
8383

84-
- **Matlab** - the primary influence for Mech'd data model and syntax.
85-
- **Eve** - the primary influence for Mech's programming model, which is built on a database.
86-
- **Rust** - Mech is implemented in Rust, and so adopts some of the design principles and expressions of Rust, like pattern matching.
87-
- **Smalltalk** - Mech is a programming system like Smalltalk, with a focus on interactive programming and live coding.
88-
- **Logo** - the design principle of Logo which make it a language accessible to children have
89-
- **Lucid** - the first dataflow programming language.
84+
- **Eve** - Aside from MATLAB, Eve is the most direct influence on Mech. Eve was a dataflow language and environment focused on reactivity, declarative programming, and live coding. Mech builds on Eve's strengths, such as its spreadsheet-like model and live programming environment.
85+
86+
- **Rust** - The Mech compiler is implemented in Rust, and so it inherits some of Rust's design principles, such as its focus on safety, concurrency, and performance.
87+
88+
- **Smalltalk** - Mech is inspired by Smalltalk's introspective programming model, which allows you to inspect and modify the program's structure and behavior at runtime. Mech also shares Smalltalk's focus on object-oriented programming, in the original sense as a message-passing model for communication between objects.
89+
90+
- **Logo** - Mech shares in Logo's mission of being accessible to beginners, especially kids, and its focus on interactive, visual programming.
91+
92+
- **Visual Basic 6** - The best version of Visual Basic, which was a popular for its GUI for building Windows desktop apps. Mech takes inspiration from VB6's event-driven programming model and its focus on building interactive applications with a GUI.
93+
94+
- **ROS** - Not a programming language, but a middleware for building robot applications. Mech draws inspiration from ROS's modular architecture, its focus on data-driven design, and its use of a publish-subscribe messaging model for communication between components.
95+
96+
- **Lucid** - The first dataflow programming language, designed for building data-driven programs. Mech is inspired by Lucid's focus on data dependencies, its use of a declarative programming model, and its support for temporal operators.
97+
98+
- **Excel** - The ubiquitous spreadsheet application, which popularized the idea of defining data dependencies and transformations in a tabular format. Mech takes inspiration from Excel's cell-based model, its use of formulas for data transformation, and its focus on interactivity and live updates.
99+
100+
- **Lua** - Mech has many design goals and features similar to Lua, so it might surprise people to know it was *not* a major influence in Mech's design. I think most of what Mech has in common with Lua came from Matlab. That said, lately we have picked up some ideas from Lua tooling that have inspired some Mech tools.
90101

91102

92103
[^1]: If you squit (and not especially hard) C++, Java, Python, Javascript, are all the same programming language. Jakubovic, Edwards and Petricek have referred to this as a ["Hornets Nest" of programming languages](https://tomasp.net/techdims/#footer=index,navigation;left=catalogue,list;top=catalogue,index). This is not to say that these languages are not distinct, but rather that they are all variations on a well-studied theme. There is still a lot of unexplored territory in the programming language design space.

0 commit comments

Comments
 (0)