You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**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.
6
6
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.
8
8
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.
10
12
11
-
### 💾 From Binary
13
+
The following code implements FizzBuzz in Mech:
12
14
13
-
Download the latest release for your platform [here](https://github.com/mech-lang/mech/releases/latest).
15
+
<center>
16
+
<imgwidth="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>
14
18
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.
16
20
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.
-**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`).
18
39
19
40
Then follow the instructions below to compile the Mech toolchain, bundled in a single executable called `mech`:
20
41
@@ -32,19 +53,19 @@ cargo install mech
32
53
33
54
## 📚 Documentation
34
55
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).
36
57
37
58
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).
38
59
39
60
## 🪐 Community
40
61
41
62
The Mech community stays active at a few places around the Internet:
42
63
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
48
69
49
70
Feel free to stop by and introduce yourself -- we're happy to meet new users and answer questions!
50
71
@@ -59,7 +80,7 @@ A Brief Roadmap:
59
80
- ☐ v0.3 - program specification - functions, modules, state machines
Copy file name to clipboardExpand all lines: docs/design/history.mec
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -54,3 +54,30 @@ Mech includes all of the matrix operations, data manipulation, and high-level ab
54
54
which make it more suitable for building complex, distributed systems from prototype to production.
55
55
56
56
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.
Copy file name to clipboardExpand all lines: docs/design/language-design.mec
+19-8Lines changed: 19 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -77,16 +77,27 @@ Some design goals of Mech include:
77
77
- 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.
78
78
79
79
80
-
(1.3) Family Tree
80
+
(1.3) Lineage
81
81
82
-
Mech is inspired by the following programming languages:
82
+
Mech draws inspiration from a number of other languages and paradigms, including:
83
83
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.
90
101
91
102
92
103
[^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