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.
Documentation for Dictu can be found here
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.
$ git clone -b master https://github.com/dictu-lang/Dictu.git
$ cd Dictu
$ cmake -DCMAKE_BUILD_TYPE=Release -B ./build
$ cmake --build ./build
$ ./dictu
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
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
Refer to Dictu Docker
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.