Mech Programming Language Documentation

Getting Started

Language Reference

Standard Library

Guides

Language Design Documents

Examples

Mech Programming Language Documentation

Getting Started

  1. Introduction

  2. Install Mech

  3. Build and Run Mech Programs

  4. Mech REPL

Language Reference

  1. Data Model

    • Data Types and Kinds

    • Data Structures

      • Enum - defines a set of named constant values

      • Map - stores key-value pairs for fast lookups.

      • Matrix - 2D array of homogenous values arranged in rows and columns.

      • Record - groups related fields, usually for representing structured data.

      • Set - unordered collection of unique values

      • Table - collection of heterogeneous data organized into rows and columns.

      • Tuple - fixed-size, ordered grouping of heterogeneous values.

    • Operators and Expressions

      • Operators

      • Indexing

  2. Programming Model Coming v0.3

    • Functions

    • State Machines

    • Machines

    • Mech Programs

  3. System Model Coming v0.4

    • Capabilities

    • Distributed Computation

    • Concurrency and Parallelism

  4. Mechdown Reference

Standard Library

  • Assign

  • Access

  • Combinatorics

  • Compare

  • Convert

  • Io

  • Logic

  • Math

  • Matrix

  • Range

  • Stats

Guides

  1. Mech in Fifteen Minutes

  2. Tutorials

Language Design Documents

  1. Language Specification

  2. Language Design Principles

  3. Syntax Design Notes

  4. History

  5. Roadmap

Examples

  1. Fizz Buzz - a classic programming exercise that demonstrates the use of Mech's data model and operators.

  2. N-Body Simulation - a simulation of gravitational interactions between multiple bodies.

  3. Extended Kalman Filter - an implementation of the Extended Kalman Filter algorithm for state estimation.