What is Dictu?
Dictu is a high-level dynamically typed, multi-paradigm, interpreted programming language. Dictu has a very familiar C-style syntax along with taking inspiration from the family of languages surrounding it, such as Python and JavaScript.
What does Dictu mean?
Dictu means simplistic
in Latin.
Documentation for Dictu can be found here
import System;
const guess = 10;
while {
const 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);
}
def fibonacci(num) {
if (num < 2) {
return num;
}
return fibonacci(num - 2) + fibonacci(num - 1);
}
print(fibonacci(10));
More here.
Dictu requires that you have CMake installed and it is at least version 3.16.3.
$ 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
Refer to Dictu Docker
For a full installation, make sure curl
is installed. It can be installed from the commands below:
$ pkg install -y curl linenoise-ng
The following variables need to be set/available to run cmake
successfully.
For Bourne compatible shells...
export CPATH=/usr/local/include
export LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH=/usr/local/lib
$ git clone -b master https://github.com/dictu-lang/Dictu.git
$ cd Dictu
$ cmake -DCMAKE_BUILD_TYPE=Release -B ./build
$ cmake --build ./build
$ ./dictu
Dictu has a Visual Studio Code extension here with the implementation located in the DictuVSC repo.
This language was initially based on the very good craftinginterpreters book, along with inspiration from Wren.
This project is supported by: