Giter VIP home page Giter VIP logo

mlatu's Introduction

The Mlatu Programming Language

Mlatu is a statically typed, stack-based functional programming language designed for simplicity, speed, and safety.

Very experimental: contributions welcome, but please don't use this in production. If you wish to contribute see here for more information.

I make announcements, discuss the languaage, and am available to answer questions on this Discord channel.

Examples

Here's a naive recursive fibonacci function:

define fib (Int -> Int) {
  -> n;
  if (n < 2) {
    1
  }
  else {
    (n - 2) fib + (n - 1) fib
  }
}

20 fib print

Here's the definition of or in common/list.mlt, which demonstrates a more functional style, as well as some of the functions available out of the gate in the prelude.

define or (List[Bool] -> Bool) {
  true \(|) (fold_left)
}

See the /examples folder for more examples.

Installation and Usage

Installation

These installation instructions presume you have the Haskell Tool Stack installed. If you don't you can install it here.

Via stack:

git clone https://github.com/brightly-salty/mlatu.git
cd mlatu
stack install

Note: cabal install should also work.

Usage

The Mlatu programming language

Usage: mlatu COMMAND

Available options:
  -h,--help                Show this help text

Available commands:
  repl                     Start the interactive REPL
  check                    Checks Mlatu files for correctness without running
                           them
  fmt                      Formats Mlatu files prettily
  run                      Runs Mlatu files

Type //help in the interactive REPL for command options.

Miscellany

"Mlatu" is the Lojban word for "cat", referencing Cat by Christopher Diggins, Kitten by Jon Purdy, and the fact that Mlatu is a concatenative programming language.

"Mlatu" is pronounced "melatoo".

The source is based with gratitude off of the source of Kitten by Jon Purdy.

Mlatu is licensed under the Peace Public License v0.0+ available here. The canonical version is located at https://github.com/brightly-salty/peace-license

mlatu's People

Contributors

brightly-salty avatar mend-bolt-for-github[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.