{"id":13511488,"url":"https://github.com/chaos-lang/chaos","last_synced_at":"2025-03-30T20:33:21.543Z","repository":{"id":41519292,"uuid":"229470012","full_name":"chaos-lang/chaos","owner":"chaos-lang","description":"The Chaos Programming Language","archived":false,"fork":false,"pushed_at":"2022-08-17T10:53:03.000Z","size":2193,"stargazers_count":278,"open_issues_count":25,"forks_count":17,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-08-02T03:07:56.642Z","etag":null,"topics":["chaos","chaos-language","cyclomatic-complexity","functional","immutability","procedural","programming-language","typesafe"],"latest_commit_sha":null,"homepage":"https://chaos-lang.org","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chaos-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":[],"ko_fi":"mertyildiran","liberapay":"mertyildiran","custom":["https://giveth.io/project/chaos","https://gitcoin.co/grants/3253/chaos-programming-language"]}},"created_at":"2019-12-21T18:54:08.000Z","updated_at":"2024-07-30T00:05:45.000Z","dependencies_parsed_at":"2022-09-21T11:50:29.538Z","dependency_job_id":null,"html_url":"https://github.com/chaos-lang/chaos","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaos-lang%2Fchaos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaos-lang%2Fchaos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaos-lang%2Fchaos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaos-lang%2Fchaos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaos-lang","download_url":"https://codeload.github.com/chaos-lang/chaos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222581265,"owners_count":17006322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chaos","chaos-language","cyclomatic-complexity","functional","immutability","procedural","programming-language","typesafe"],"created_at":"2024-08-01T03:00:51.674Z","updated_at":"2024-11-01T13:31:05.450Z","avatar_url":"https://github.com/chaos-lang.png","language":"C","funding_links":["https://ko-fi.com/mertyildiran","https://liberapay.com/mertyildiran","https://giveth.io/project/chaos","https://gitcoin.co/grants/3253/chaos-programming-language"],"categories":["C","Multi paradigm"],"sub_categories":[],"readme":"# Chaos\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://chaos-lang.org/img/chaos_logo.png\" alt=\"Logo\" height=\"300px\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    Turn chaos into magic!\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"GitHub Last Commit\" src=\"https://img.shields.io/github/last-commit/chaos-lang/chaos?logo=GitHub\u0026style=flat-square\"\u003e\n    \u003cimg alt=\"GitHub Commit Activity\" src=\"https://img.shields.io/github/commit-activity/m/chaos-lang/chaos?logo=GitHub\u0026style=flat-square\"\u003e\n    \u003ca href=\"https://github.com/chaos-lang/chaos/blob/master/LICENSE\"\u003e\n        \u003cimg alt=\"GitHub License\" src=\"https://img.shields.io/github/license/chaos-lang/chaos?logo=GitHub\u0026style=flat-square\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/chaos-lang/chaos/actions?query=workflow%3A%22Linter+Checks%22\"\u003e\n        \u003cimg alt=\"GitHub Workflow Linter Checks Status\" src=\"https://img.shields.io/github/workflow/status/chaos-lang/chaos/Linter%20Checks?logo=GitHub\u0026label=linter%20checks\u0026style=flat-square\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/chaos-lang/chaos/actions?query=workflow%3A%22Automated+Tests%22\"\u003e\n        \u003cimg alt=\"GitHub Workflow Automated Tests Status\" src=\"https://img.shields.io/github/workflow/status/chaos-lang/chaos/Automated%20Tests?logo=GitHub\u0026label=automated%20tests\u0026style=flat-square\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/chaos-lang/chaos/actions?query=workflow%3A%22Memory+Leak+Checks%22\"\u003e\n        \u003cimg alt=\"GitHub Workflow Memory Leak Checks\" src=\"https://img.shields.io/github/workflow/status/chaos-lang/chaos/Memory%20Leak%20Checks?logo=GitHub\u0026label=memcheck\u0026style=flat-square\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/chaos-lang/chaos/actions?query=workflow%3A%22Memory+Sanitizer%22\"\u003e\n        \u003cimg alt=\"GitHub Workflow Memory Sanitizer\" src=\"https://img.shields.io/github/workflow/status/chaos-lang/chaos/Memory%20Sanitizer?logo=GitHub\u0026label=memory%20sanitizer\u0026style=flat-square\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/chaos-lang/chaos/actions?query=workflow%3A%22Address+Sanitizer%22\"\u003e\n        \u003cimg alt=\"GitHub Workflow Address Sanitizer\" src=\"https://img.shields.io/github/workflow/status/chaos-lang/chaos/Address%20Sanitizer?logo=GitHub\u0026label=address%20sanitizer\u0026style=flat-square\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/chaos-lang/chaos/actions?query=workflow%3A%22Undefined+Behavior+Sanitizer%22\"\u003e\n        \u003cimg alt=\"GitHub Workflow Undefined Behavior Sanitizer\" src=\"https://img.shields.io/github/workflow/status/chaos-lang/chaos/Undefined%20Behavior%20Sanitizer?logo=GitHub\u0026label=undefined%20behavior%20sanitizer\u0026style=flat-square\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/chaos-lang/chaos/actions?query=workflow%3A%22Chaos+C+Extension+Feature+Tests%22\"\u003e\n        \u003cimg alt=\"GitHub Workflow Chaos C Extension Feature Tests Status\" src=\"https://img.shields.io/github/workflow/status/chaos-lang/chaos/Chaos%20C%20Extension%20Feature%20Tests?logo=GitHub\u0026label=Chaos%20C%20Extension%20Feature\u0026style=flat-square\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/chaos-lang/chaos\"\u003e\n        \u003cimg alt=\"Code Coverage (Codecov)\" src=\"https://img.shields.io/codecov/c/github/chaos-lang/chaos?logo=Codecov\u0026style=flat-square\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    Chaos is a strongly typed, dynamic yet compilable, test-oriented procedural programming language that achieves zero cyclomatic complexity.\n\u003c/p\u003e\n\n### Influenced by\n\n - TypeScript's type safety\n - Python's syntax, modules and extensibility\n - JavaScript's cross-platform support\n - Ruby's loops and blocks, Rexx's `FOREVER` keyword\n - PHP's dedication to server-side\n - Haskell's pure functions\n - C's speed and interoperability\n - Go's standalone executables\n\n### Featured Aspects\n\n - There are no control structures. (no `if..else`, no `switch..case`) Decision making only possible on function returns:\n   ```ruby\n    num def add(num x, num y)\n        num z = x + y\n    end {\n        z == 8  : f1(),\n        z \u003e 10  : f2(),\n        default : f3()\n    }\n   ```\n - A single unit test is enough to have 100% coverage on functions, always.\n - Warns you about untested functions in the executed program.\n - Detects possible runtime errors in compile-time.\n - Unique function call system that combines procedures with some aspects of functional programming paradigm.\n - No `while` or `when` keywords. Loops are mostly predetermined. Infinite loops can only be achievable through the `INFINITE` keyword.\n - There are `break` and `continue` statements but breaking a multiline loop inside a function is forbidden.\n - Single source of errors and unique exit codes for each one of them. So the errors are catchable by other programs.\n - Language's itself forces you to write less error-prone code.\n - Say goodbye to dependency conflicts with [Occultist](https://occultist.io/) dependency manager.\n - Eliminated segmentation fault possibility using strict memory management and predictions.\n - Simplest [C extension development](https://chaos-lang.org/docs/16_chaos_c_extensions_development) framework so far.\n\n## Installation\n\nInstall the requirements:\n\n```shell\nmake requirements\n```\n\nCompile the Chaos source:\n\n```shell\nmake\n```\n\nInstall the `chaos` binary system-wide:\n\n```shell\nmake install\n```\n\n## Interpreter\n\n### Interactive Shell\n\n```shell\n$ chaos\n    Chaos Language 0.2.0 (Jan 20 2021 02:39:23)\n    GCC version: 9.3.0 on linux\n    Turn chaos into magic!\n\nkaos\u003e print \"hello world\"\nhello world\nkaos\u003e exit\n    Bye bye!\n```\n\n### Program File as Command-line Argument\n\n**hello.kaos**:\n\n```ruby\nprint \"hello world\"\n```\n\n```shell\n$ chaos hello.kaos\nhello world\n```\n\n## Compiler\n\n```shell\n$ chaos -c hello.kaos -o hello\nStarting compiling...\nCompiling Chaos code into build/hello.c\nCompiling the C code into machine code...\nCleaning up the temporary files...\n\nFinished compiling.\n\nBinary is ready on: build/hello\n$ build/hello\nhello world\n```\n\nRun `chaos --help` to see more options.\n\n## Uninstallation\n\nYou can uninstall the `chaos` binary and its C headers with:\n\n```shell\nmake uninstall\n```\n\n## Useful Links\n\n[**Language Reference**](https://chaos-lang.org/docs/03_comments)\n\n[**Developing Chaos C Extensions**](https://chaos-lang.org/docs/16_chaos_c_extensions_development)\n\n[**API Reference**](https://chaos-lang.org/docs/api)\n\n[**Template for Chaos C Extension Developers**](https://github.com/chaos-lang/template)\n\n[**Documentation Repository**](https://github.com/chaos-lang/chaos-lang.org)\n\n[**Bug Tracker**](https://github.com/chaos-lang/chaos/issues)\n\n[**Occultist Dependency Manager**](https://github.com/chaos-lang/occultist)\n\n[**Contribution Guide**](https://github.com/chaos-lang/chaos/blob/master/CONTRIBUTING.md)\n\n[**Code of Conduct**](https://github.com/chaos-lang/chaos/blob/master/CODE_OF_CONDUCT.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaos-lang%2Fchaos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaos-lang%2Fchaos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaos-lang%2Fchaos/lists"}