{"id":17280867,"url":"https://github.com/initerworker/koak","last_synced_at":"2025-10-10T10:21:31.284Z","repository":{"id":143861853,"uuid":"121243969","full_name":"IniterWorker/Koak","owner":"IniterWorker","description":"Kind Of Alternative Kaleidoscope","archived":false,"fork":false,"pushed_at":"2018-02-25T22:25:14.000Z","size":258,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-03T09:35:19.370Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IniterWorker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-12T12:27:37.000Z","updated_at":"2018-04-12T19:36:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"6d74f11d-bc5b-413c-9e25-8fb30c2e429d","html_url":"https://github.com/IniterWorker/Koak","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/IniterWorker/Koak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IniterWorker%2FKoak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IniterWorker%2FKoak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IniterWorker%2FKoak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IniterWorker%2FKoak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IniterWorker","download_url":"https://codeload.github.com/IniterWorker/Koak/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IniterWorker%2FKoak/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003506,"owners_count":26083594,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-15T09:22:15.487Z","updated_at":"2025-10-10T10:21:31.252Z","avatar_url":"https://github.com/IniterWorker.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kind Of Alternative Kaleidoscope [![Build Status](https://travis-ci.org/Arignir/koak.svg?branch=master)](https://travis-ci.org/Arignir/koak)\n\n\nThis is (kind of) a Kaleidoscope compiler, written in Rust.\n\n# Build Dependencies\n\n* rustup, with the 1.25.0 nightly toolchain.\n* python 3.6\n* llvm with debug assertions enabled\n\n# Building the compiler\n\nIf you don't want ton install our build dependencies, you can use our docker image (`arignir/llvm_debug`):\n\n```bash\n./docker.sh\n```\n\nThe source code will be located in the `/koak` directory of the container.\n\nThe compilator can be compiled with:\n\n```bash\ncargo build\n```\n\n# Running the compiler\n\nThe easiest way to run the compiler is using it's execution engine. You can do so with the following command:\n\n```bash\ncargo run\n```\n\n# Examples\n\n```koak\n#\n# Computes the x'th fibonacci number\n#\n\ndef fib(x: double) -\u003e double {\n    if x \u003c 3.0 then {\n        1.0\n    }\n    else {\n        fib(x - 1.0) + fib(x - 2.0)\n    }\n}\n```\n\n```llvm\n$ cargo run\n\u003e\u003e import \"examples/fib\";\n\ndefine double @fib(double %x) {\nentry:\n  %fcmptmp = fcmp olt double %x, 3.000000e+00\n  %condtmp = icmp ne i1 %fcmptmp, false\n  br i1 %condtmp, label %then, label %else\n\nthen:                                             ; preds = %entry\n  br label %merge\n\nmerge:                                            ; preds = %else, %then\n  %ifphi = phi double [ 1.000000e+00, %then ], [ %faddtmp, %else ]\n  ret double %ifphi\n\nelse:                                             ; preds = %entry\n  %fsubtmp = fsub double %x, 1.000000e+00\n  %calltmp = call double @fib(double %fsubtmp)\n  %fsubtmp1 = fsub double %x, 2.000000e+00\n  %calltmp2 = call double @fib(double %fsubtmp1)\n  %faddtmp = fadd double %calltmp, %calltmp2\n  br label %merge\n}\n\n\u003e\u003e fib(42);\n=\u003e 267914296\n```\n\n# Roadmap\n\n- [X] Lexer\n- [X] Parser\n- [X] Code generation abstraction\n- [X] Nice error reporting\n- [ ] Language\n  - [X] Local \u0026 extern function definition\n  - [X] Expression evaluation (basic maths)\n  - [X] Unary operators\n  - [X] Binary operators\n  - [X] Control flow (`if`/`then`/`else`)\n  - [X] Loops (`for`/`while`)\n  - [ ] Mutable variables\n  - [X] Type system (`void`, `bool`, `char`, `int`, `double` etc.)\n  - [X] Blocks (`{` and `}`)\n  - [ ] Strings\n  - [X] Module system (`import`)\n- [ ] Execution and compilation\n  - [X] JIT Integration\n  - [ ] Compilation into object file (.o)\n  - [ ] Linking all object file into a final binary\n  - [ ] Linking with the c library\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finiterworker%2Fkoak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finiterworker%2Fkoak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finiterworker%2Fkoak/lists"}