Logo Lanfrica

kriol-lang/kriol

Domaine:

natural language processing

Type de record:

software
Créateur:
kri
Hôte:
Programming Language based on The Cape Verdian Creole # 🦈 KriolLang **KriolLang** or **Kriol** is a programming language based on the **Cape Verdean Creole**. It was made to be easy for anyone who understands Cape Verdean Creole while keeping the same versatility as some other languages, such as C, Go, and Rust. ```kriol fn ola(textu nomi, bool naKriolu) { si naKriolu { mostran(f"Olá {nomi}, ami nta programa na Kriolu!"); } sinon { mostran(f"Hello {nomi}, I program in Kriol!"); } } fn inisiu() { ola("Visitanti", sin); ola("Guest", nau); } ``` ### Description The syntax of this programming language was initially based on C, Go, and Rust, but other programming languages such as Liquid played a good role in the initial design. For more concrete specifications about the language, you are recommended to read the KriolLang Language Documentation. The file extension of the KriolLang programming language is `.kriol` or `.kr` and the name of the lang's compiler is **kriol**. # Install The easiest way to test it currently is using a linux-based OS (if you're on Windows I would recommend trying it inside WSL), and as a dependency at least make sure to have a cc linker available like `gcc` or `clang` to ensure proper linkage of the produced object file `.o` into the binary code required to run in the system. You can install it using the following command: ```sh curl -fsSL raw.githubusercontent.com | sh -s -- --pre ``` After that add the following to your shell env: ```sh export PATH="$HOME/.kriol:$PATH" ``` Then close and reopen the shell and try `kriol --version`. ## Usage The first thing to do after compiling the compiler is to execute the help command: ```sh kriol --help ``` After executing that command you may see the usage section and some of its options. An example of how it could be used is to compile one of the example files in the examples folder: ```sh kriol examples/fibonacci_recursive.kriol ``` This compiles `fibonacci_recursive.kriol` to a nati …