#programming-language #interpreter #language #sloth

app slothlang

A weird, slow and a bit moldy interpreted programming language

13 releases (6 stable)

1.2.1 Dec 8, 2022
1.2.0 Dec 5, 2022
1.1.0 Oct 29, 2022
0.9.3 Oct 9, 2022
0.1.1 Jul 30, 2022

#32 in Programming languages

Download history 2/week @ 2022-11-23 33/week @ 2022-11-30 31/week @ 2022-12-07 5/week @ 2022-12-14 16/week @ 2022-12-21 4/week @ 2022-12-28 1/week @ 2023-01-04 7/week @ 2023-01-11 2/week @ 2023-01-18 7/week @ 2023-01-25 6/week @ 2023-02-01 30/week @ 2023-02-08 39/week @ 2023-02-15 26/week @ 2023-03-01

78 downloads per month

Apache-2.0

200KB
4K SLoC

🦥 Sloth - The weird, slow and a bit moldy programming language

Sloth is an interpreted programming language, implemented in Rust. Its syntax is inspired by C-like languages, Rust, Python, and Lisp-like languages.
I do not ensure the stability of the language: use it at your own risk!

Syntax example

# Return the factorial of @0
define factorial: num -> num {
    @return = 1;
    i = 2;

    while <= i @0 {
        @return = * @return i;
        i = + i 1;
    };
}

define main: num -> num {
    print(factorial(@0) "\n");
}

The syntax, logic and specifications of Sloth are described in the documentation.

Installation

Install using cargo:

$ cargo install slothlang

I may provide executables in the future.

License

Sloth is licensed under the Apache-2.0 License.

Dependencies

~18MB
~399K SLoC