chaos-lang / Chaos
Licence: gpl-3.0
The Chaos Programming Language
Stars: ✭ 171
Programming Languages
c
50402 projects - #5 most used programming language
procedural
45 projects
Projects that are alternatives of or similar to Chaos
Immutable Tuple
Immutable finite list objects with constant-time equality testing (===) and no memory leaks.
Stars: ✭ 29 (-83.04%)
Mutual labels: immutability, functional
php-validation-dsl
A DSL for validating data in a functional fashion
Stars: ✭ 47 (-72.51%)
Mutual labels: functional, immutability
Phunctional
⚡️ λ PHP functional library focused on simplicity and performance
Stars: ✭ 243 (+42.11%)
Mutual labels: immutability, functional
trembita
Model complex data transformation pipelines easily
Stars: ✭ 44 (-74.27%)
Mutual labels: functional, typesafe
pyroclastic
Functional dataflow through composable computations
Stars: ✭ 17 (-90.06%)
Mutual labels: functional, typesafe
swift-di-explorations
Functional DI explorations in Swift
Stars: ✭ 28 (-83.63%)
Mutual labels: functional, typesafe
Eslint Plugin Functional
ESLint rules to disable mutation and promote fp in JavaScript and TypeScript.
Stars: ✭ 282 (+64.91%)
Mutual labels: immutability, functional
Http4k
The Functional toolkit for Kotlin HTTP applications. http4k provides a simple and uniform way to serve, consume, and test HTTP services.
Stars: ✭ 1,883 (+1001.17%)
Mutual labels: typesafe, immutability
Umbrella
"A collection of functional programming libraries that can be composed together.
Unlike a framework, thi.ng is a suite of instruments and you (the user) must be
the composer of. Geared towards versatility, not any specific type of music."
— @loganpowell via Twitter
Stars: ✭ 2,186 (+1178.36%)
Mutual labels: functional
Folktale
[not actively maintained!] A standard library for functional programming in JavaScript
Stars: ✭ 1,995 (+1066.67%)
Mutual labels: functional
Modern Wasm Starter
🛸 Run C++ code on web and create blazingly fast websites! A starter template to easily create WebAssembly packages using type-safe C++ bindings with automatic TypeScript declarations.
Stars: ✭ 140 (-18.13%)
Mutual labels: typesafe
Rangeless
c++ LINQ -like library of higher-order functions for data manipulation
Stars: ✭ 148 (-13.45%)
Mutual labels: functional
Asyncninja
A complete set of primitives for concurrency and reactive programming on Swift
Stars: ✭ 146 (-14.62%)
Mutual labels: functional
Tonal
A functional music theory library for Javascript
Stars: ✭ 2,156 (+1160.82%)
Mutual labels: functional
Redux Zero
A lightweight state container based on Redux
Stars: ✭ 1,977 (+1056.14%)
Mutual labels: functional
Chaos
Turn chaos into magic!
Chaos is a strongly typed, dynamic yet compilable, test-oriented procedural programming language that achieves zero cyclomatic complexity.
Influenced by
- TypeScript's type safety
- Python's syntax, modules and extensibility
- JavaScript's cross-platform support
- Ruby's loops and blocks, Rexx's
FOREVER
keyword - PHP's dedication to server-side
- Haskell's pure functions
- C's speed and interoperability
- Go's standalone executables
Featured Aspects
- There are no control structures. (no
if..else
, noswitch..case
) Decision making only possible on function returns:num def add(num x, num y) num z = x + y end { z == 8 : f1(), z > 10 : f2(), default : f3() }
- A single unit test is enough to have 100% coverage on functions, always.
- Warns you about untested functions in the executed program.
- Detects possible runtime errors in compile-time.
- Unique function call system that combines procedures with some aspects of functional programming paradigm.
- No
while
orwhen
keywords. Loops are mostly predetermined. Infinite loops can only be achievable through theINFINITE
keyword. - There are
break
andcontinue
statements but breaking a multiline loop inside a function is forbidden. - Single source of errors and unique exit codes for each one of them. So the errors are catchable by other programs.
- Language's itself forces you to write less error-prone code.
- Say goodbye to dependency conflicts with Occultist dependency manager.
- Eliminated segmentation fault possibility using strict memory management and predictions.
- Simplest C extension development framework so far.
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
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].