kylecods / Dictu

Dictu is a simple dynamically typed programming language built upon the craftinginterpreters tutorial.

Home Page:https://dictu-lang.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dictu

What is Dictu?
Dictu is a very simple dynamically typed programming language built upon the craftinginterpreters tutorial.

What does Dictu mean?
Dictu means simplistic in Latin.

Dictu documentation

Documentation for Dictu can be found here

Codacy Badge CI

Running Dictu

Dictu currently has two options when building, there is a CMakeLists file included so the build files can be generated with CMake or there is an included makefile for users that are more familiar with that.

CMake

$ git clone -b master https://github.com/dictu-lang/Dictu.git
$ cd Dictu
$ cmake -DCMAKE_BUILD_TYPE=Release -B ./build 
$ cmake --build ./build
$ ./dictu

Compiling without HTTP

The HTTP class within Dictu requires cURL to be installed when building the interpreter. If you wish to build Dictu without cURL, and in turn the HTTP class, build with the DISABLE_HTTP flag.

$ git clone -b master https://github.com/dictu-lang/Dictu.git
$ cd Dictu
$ cmake -DCMAKE_BUILD_TYPE=Release -DDISABLE_HTTP=1 -B ./build 
$ cmake --build ./build
$ ./dictu

Compiling without linenoise

Linenoise is used within Dictu to enhance the REPL, however it does not build on windows systems so a simpler REPL solution is used.

$ git clone -b master https://github.com/dictu-lang/Dictu.git
$ cd Dictu
$ cmake -DCMAKE_BUILD_TYPE=Release -DDISABLE_LINENOISE=1 -B ./build 
$ cmake --build ./build
$ ./build/Dictu

Docker Installation

Refer to Dictu Docker

Example program

var userInput;
var guess = 10;

while {
    userInput = input("Input your guess: ").toNumber().unwrap();
    if (userInput == guess) {
        print("Well done!");
        break;
    } else if (userInput < guess) {
        print("Too low!");
    } else {
        print("Too high!");
    }

    System.sleep(1);
}

More here.

About

Dictu is a simple dynamically typed programming language built upon the craftinginterpreters tutorial.

https://dictu-lang.com

License:MIT License


Languages

Language:C 99.7%Language:C++ 0.2%Language:Python 0.0%Language:CMake 0.0%Language:Objective-C 0.0%