chaos-lang / chaos

The Chaos Programming Language
https://chaos-lang.org
GNU General Public License v3.0
281 stars 17 forks source link
chaos chaos-language cyclomatic-complexity functional immutability procedural programming-language typesafe

Chaos

Logo

Turn chaos into magic!

GitHub Last Commit GitHub Commit Activity GitHub License GitHub Workflow Linter Checks Status GitHub Workflow Automated Tests Status GitHub Workflow Memory Leak Checks GitHub Workflow Memory Sanitizer GitHub Workflow Address Sanitizer GitHub Workflow Undefined Behavior Sanitizer GitHub Workflow Chaos C Extension Feature Tests Status Code Coverage (Codecov)

Chaos is a strongly typed, dynamic yet compilable, test-oriented procedural programming language that achieves zero cyclomatic complexity.

Influenced by

Featured Aspects

Installation

Install the requirements:

make requirements

Compile the Chaos source:

make

Install the chaos binary system-wide:

make install

Interpreter

Interactive Shell

$ chaos
    Chaos Language 0.2.0 (Jan 20 2021 02:39:23)
    GCC version: 9.3.0 on linux
    Turn chaos into magic!

kaos> print "hello world"
hello world
kaos> exit
    Bye bye!

Program File as Command-line Argument

hello.kaos:

print "hello world"
$ chaos hello.kaos
hello world

Compiler

$ chaos -c hello.kaos -o hello
Starting compiling...
Compiling Chaos code into build/hello.c
Compiling the C code into machine code...
Cleaning up the temporary files...

Finished compiling.

Binary is ready on: build/hello
$ build/hello
hello world

Run chaos --help to see more options.

Uninstallation

You can uninstall the chaos binary and its C headers with:

make uninstall

Useful Links

Language Reference

Developing Chaos C Extensions

API Reference

Template for Chaos C Extension Developers

Documentation Repository

Bug Tracker

Occultist Dependency Manager

Contribution Guide

Code of Conduct