A complicated eso-lang written in Rust that doesn't limit your creativity!

Overview

Documentation for mott

Introduction

mott (from french "mot" = word) is (maybe) the first programming language, that doesn't limit your creativity to preset keywords!
Get if, let and var out of here!
All tokens are defined by the words length and it's case.

Operations

This chapter (as if there were more than one ...) will briefly go over all the possible operation in mott (9 in total)
Remember: All tokens/lines must end in an period/dot/full stop (.)!

Important

  1. In the below examples I use comments, but they are not yet supported by motts!
  2. The Arg Count in the tables refers to arguments which do not include the token that defines the action. Therefore the action P form hello. would have 2 arguments: form and hello

Table of Contents

Variables
Printing
Input
Addition
Substraction
Multiplication
Division
Branching
Labels


Var

Key Value
Case upper/lower
Word Length 4
Arg Count 1 - ∞

This is most likely the most common operation you will use, since there are no string/number constants - huray!
There are two types of Variables: Numbers (double) and Strings. The word you use as an identifier for "Var" will become the variables name or identifier.
Let's see this in action:

mott Zero. // eg. mott = 0
dumb hello there, this is a string!.
pleb One three Three seven. // eg. pleb = 1337
case Minus seven comma three five. // case = -7,35

As you might have seen, you have to may finally spell out numbers. Important When declaring a number, the first argument has to be uppercase,
meanwhile strings are indicated by a lowercase first arg.
You can use the mot Minus to declare a negative number and comma to declare the numbers after the - you guessed it - comma!

Print

Key Value
Case upper
Word Length 1
Arg Count 1 - ∞

A programming language would not be a programming language withoug some I/O so lets get to work on that. Printing to the console is really simple: Use an uppercase letter followed by all the vars you want to print.

form some string here. // declaring a string variable
numb Five zero two comma three.
D form.
B numb.
P form numb.

Another quick side note:
Since it is impossible to get a space, newline or dot into a string, predefined vars exist for them.
newl = "\n"
spce = " "
dott = "."

Input

Key Value
Case lower
Word Length 1
Arg Count 2

Input reads data from the user into the program - yay, interactivity!
Let's start with an example:

r NumPls result. // Reads a number into "result"
k Bummmm numm.   // Does the same, but shows how much creativity you have :)

l strInn vrbl.  // Reads a string into "vrbl" (reads until newline, not including it)

If you have the pattern-recognition skills of a Neural Network you might have already figured out the syntax:
<lowercaseLetter> <Uppercase-Word for Number/Lowercase for String> <destination>.

To see this in an actual (!) program, check out this example.

Add

Key Value
Case upper
Word Length 2
Arg Count 3

All the following arithmethic operations follow the same, simple syntax: => dst = op1 +|-|*|/ op2 Example for 1 + 2:

onne One. // Define constant 1
twwo Two. // Define constant 2
rslt Zero. // Optional: predefine result var (would also be created by add!)

To onne twwo rslt. // Add 1 to 2 and place into rslt
P rslt.            // Print resulting value

Sub

Key Value
Case lower
Word Length 2
Arg Count 3

The same as add, just different token to indicate Substraction. Example for 9 - 5

ninn Nine. // Define constant 9
blub Five. // Define constant 5
rslt Zero. // Optional: predefine result var (would also be created by add!)

bk ninn blub rslt. // Sub 5 from 9
P rslt.            // And print result

Mul

Key Value
Case upper
Word Length 3
Arg Count 3

The same as the other operations, just different token to indicate Multiplication. Example for 2 * 4

twoo Two. // Define constant 2
more Four. // Define constant 4
           // showcasing, that you don't have to define the result var

Mut twoo more rslt. // Mul 2 * 4 => 8
P rslt.            // And print result

Div

Key Value
Case lower
Word Length 3
Arg Count 3

The same as the others, just different token to indicate Division. Example for 10 divided by 5 (none-int results work too! e.g. 7/2 is no problem)

alot One zero. // Define constant 10
less Five.     // Define constant 5
           // showcasing, that you don't have to define the result var

bla alot less rslt. // Mul 10/5 => 2
P rslt.            // And print result

Branching

Key Value
Case upper/lower
Word Length 5
Arg Count 3

A programming language would not work without branching - so here we go! Branching just refers to interpreting a situation and reacting to it or - in simpler terms - conditional statements like if a == b {c()}

Example time!

onne One.
numb Two.

Ebubl onne numb labels.
form they are not equal.
P form

labels.

Hmmm, what could labels be? Maybe a LABEL ?!

But now back to Branches: There are 3 different conditions: [E]qual [L]ess [G]reater

The case does not matter.

Ecran a b destin. // jump to "destin" if a == b
lessr a b destin. // jump  to "destin" if a < b
Gregr a b destin. // jump  to "destin" if a > b

Labels

Key Value
Case upper/lower
Word Length 6
Arg Count 0

Yes, after this you are done! So a quick explanation of what labels are: They mark the location, a branch jumps to if the condition is fulfilled. See the example in the BRANCHES category.

Final Notes

  1. Go add motts to the programming languages you have mastered in your resume.
  2. Try to create something in motts and don't forget, that it is possible to write full sentences while writing code!
  3. Examples can be found in /examples (if you want to add one, create a PR)
  4. The file extension for \mott\ files is .mt
  5. Have a good day :)
You might also like...
qfetch is a tool that fetches info about your linux install.

qfetch qfetch is a tool that fetches info about your linux install. Status Dependencies /proc/meminfo with the following fields: MemTotal in the 1st l

Goodname is a tool to assist you with cool naming of your methods and software

Goodname is a tool to assist you with cool naming of your methods and software. Given a brief description of your method or software, this tool enumerates name candidates forming subsequences of the description (i.e., abbreviation).

A webapp that reads your articles to you while you're on the subway
A webapp that reads your articles to you while you're on the subway

ReadToMyShoe Video Demo A website that reads articles to you, even when you're offline. Still in early development. This is a full-stack Rust webapp,

Make your IDs strongly typed!!

About TypedId introduces a single type, aptly named TypedId. This is a generic wrapper any type, often types that you would use as an identifier. Howe

Send Youtube videos as audio podcasts to your personal Pocket Casts files section.

yttopocketcasts Send Youtube videos as audio podcasts to your personal Pocket Casts files section. Quick Start Prerequisites: Docker and Make must be

Unify your game sources in one place and aquire more of them, using modules made by the community.

Project Black Pearl Unify your game sources in one place by using modules made by the community. What is Project Black Pearl? Project Black Pearl (or

Keep a Hetzner Cloud firewall up to date with your dynamic public IP address.

hcloud-firewall-controller hcloud-firewall-controller determines the current public IP and creates or updates a Hetzner Cloud firewall with this IP. S

Gain intuition about the goings-on of your multithreaded/multicomponent programs
Gain intuition about the goings-on of your multithreaded/multicomponent programs

Intuition: a super simple profiler with a terminal ui based on tui-rs. Gain intuition about the goings-on of your multithreaded/multicomponent program

Control your .env like a boss

envctl 🚀 Take full control over your .env environment variables usage $ envctl --help Environment Variable Control Usage: envctl COMMAND Commands

Owner
Lars
I'm a student coding in C++, Python and JS. I also do CTF's. https://coronavis.ml http://verben.freemyip.com (maybe down)
Lars
Open-source Autonomy Software in Rust-lang with gRPC for the Roomba series robot vacuum cleaners

CleanIt Open-source Autonomy Software in Rust-lang with gRPC for the Roomba series robot vacuum cleaners Motivation Motivation is to build a complete

Kristoffer Rakstad Solberg 216 Dec 13, 2022
A conky-like system monitor made for the sole purpose of teaching myself rust-lang.

Pomky A conky-like system monitor made for the sole purpose of teaching myself rust-lang. It is not as configurable, modular, or feature packed as con

null 3 Nov 17, 2022
Orion lang is a lispy programming language that is strongly and statically typed.

Orion Orion is a lisp inspired statically typed programming language written in Rust Install To install orion you can either: Download binary from the

Wafelack 226 Dec 17, 2022
VoceChat is a superlight rust written social server. Easy integration to your site/app.

Re-decentralized the Internet through personal cloud computing. VoceChat is the lightest chat server prioritizes private hosting! Easy integratation t

Privoce 134 Feb 22, 2023
TypeRust - simple Rust playground where you can build or run your Rust code and share it with others

Rust playground Welcome to TypeRust! This is a simple Rust playground where you can build or run your Rust code and share it with others. There are a

Kirill Vasiltsov 28 Dec 12, 2022
Take your first step in writing a compiler. Implemented in Rust.

first-step-rust Take your first step in writing a compiler, using Rust. Building from Source Make sure the Rust toolchain is installed on your compute

PKU Compiler Course 13 Aug 28, 2022
Some UwU and OwO for your Rust code

UwU Types Some UwU and OwO for your Rust code This is a Rust crate inspired by this tweet from @thingskatedid / @katef. Credits Some extra functionali

Evan Pratten 12 Feb 8, 2022
Rust crate: Overloaded Literals to construct your datatypes without boilerplate and with compile-time validation.

overloaded_literals   Overloaded Literals to construct your datatypes without boilerplate and with compile-time validation. Features Compile-time vali

Qqwy / Marten 6 Apr 14, 2023
A cli tool to write your idea in terminal

Ideas ideas is a cli tools to write your idea in your terminal. Demo Features tagged idea, contains tips, idea, todo status switch ascii icon write yo

王祎 12 Jun 22, 2022
Notifications for your Argo Workflows.

Hermes -- notifications for Argo Workflows Hermes aims to provide a streamlined way of sending notifications to various messaging services from your A

Krzysztof Jagiełło 24 Nov 26, 2022