Link Search Menu Expand Document

Dictu v0.31.0

Dictu is a simple, dynamically typed programming language.

Install in 30 Seconds View on GitHub

import HTTP;
import JSON;

HTTP.get("https://api.coindesk.com/v1/bpi/currentprice.json").match(
    def (response) => {
        const data = JSON.parse(response.content).unwrap();
        print("${} per BTC".format(data["bpi"]["USD"]["rate"])); // $10,577.70 per BTC
    },
    def (error) => print(error)
);

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.


Installing Dictu

All it takes is a couple of lines! Fire up a terminal and copy the following, one by one (without the $).

CMake

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

Let’s make sure that everything went as planned by entering the Dictu REPL.

$ ./dictu

Note: On Windows systems the executable may be within a Debug or Release directory.

You should be able to run Dictu code here! REPL stands for “read evaluate print loop” and it allows you to receive instantaneous feedback about your code.

Dictu Version: 0.31.0
>>> print("Hello, World!");

Use Control + C to exit the REPL when you’re finished.

Build Options

Dictu supports several CMake build options:

Option Description Default
DISABLE_HTTP Build without HTTP support (removes cURL dependency) OFF
ENABLE_VCPKG Use VCPKG for dependency management OFF
BUILD_CLI Build the CLI executable ON
# Build without HTTP support
$ cmake -DCMAKE_BUILD_TYPE=Release -DDISABLE_HTTP=1 -B ./build

# Build with VCPKG
$ cmake --preset release-vcpkg

Contributing

We want to make the Dictu community as friendly and welcoming as possible, so pull requests are encouraged. Any contribution, from the smallest typo in the documentation to a new feature in the language itself, is greatly appreciated!

Licence

Dictu is under the MIT licence.


This site uses Just The Docs, with modifications.