{"id":15101399,"url":"https://github.com/corejust/coreproject2024","last_synced_at":"2026-02-25T19:31:11.561Z","repository":{"id":250380167,"uuid":"830238672","full_name":"CoreJust/CoreProject2024","owner":"CoreJust","description":"The core programming language, written in C++ and LLVM","archived":false,"fork":false,"pushed_at":"2024-09-06T22:23:03.000Z","size":381,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-26T12:02:50.908Z","etag":null,"topics":["compiler","core","cpp","cpp20","llvm","programming-language"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CoreJust.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"docs/roadmap.txt","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-17T22:00:27.000Z","updated_at":"2024-09-06T22:23:05.000Z","dependencies_parsed_at":"2024-07-26T23:46:38.681Z","dependency_job_id":"65091a25-3e85-4581-a0f3-16f77edc316c","html_url":"https://github.com/CoreJust/CoreProject2024","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"9fa8c7abdbf8d4b550516fa20015fd43d3ac3eb3"},"previous_names":["corejust/coreproject2024"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CoreJust/CoreProject2024","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoreJust%2FCoreProject2024","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoreJust%2FCoreProject2024/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoreJust%2FCoreProject2024/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoreJust%2FCoreProject2024/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CoreJust","download_url":"https://codeload.github.com/CoreJust/CoreProject2024/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CoreJust%2FCoreProject2024/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262063448,"owners_count":23252761,"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":["compiler","core","cpp","cpp20","llvm","programming-language"],"created_at":"2024-09-25T18:22:16.920Z","updated_at":"2025-10-27T08:04:19.205Z","avatar_url":"https://github.com/CoreJust.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# CoreProject 2024\n\nCore programming language repository. \nCore is a compilable programming language created using LLVM. \nIt is currently in the early stages of development.\n\n## Examples\n\n#### Factorial\n```sh\n// A function of the standard C runtime library.\nfn putchar(ch: cint): cint = native(\"putchar\")\n\nfn print(n: cint) {\n\tfn printImpl(n: cint) {\n\t\tif n != 0 {\n\t\t\tprintImpl(n / 10)\n\t\t\tputchar(48 + n % 10)\n\t\t}\n\t}\n\t\n\tif n == 0 {\n\t\tputchar(48)\n\t} elif n \u003c 0 {\n\t\tputchar(45)\n\t\tprintImpl(-n)\n\t} else {\n\t\tprintImpl(n)\n\t}\n}\n\nfn factorial(n: cint): cint {\n\tif n \u003c= 1 {\n\t\treturn 1\n\t}\n\n\treturn n * factorial(n - 1)\n}\n\nfn main(): i32 {\n\tprint(factorial(12))\n\n\treturn 0\n}\n```\n\n\n#### Reverse counting\n```sh\n// A function of the standard C runtime library.\nfn putchar(ch: cint): cint = native(\"putchar\")\n\nfn print(n: cint) {\n\tfn printImpl(n: cint) {\n\t\tif n != 0 {\n\t\t\tprintImpl(n / 10)\n\t\t\tputchar(48 + n % 10)\n\t\t}\n\t}\n\t\n\tif n == 0 {\n\t\tputchar(48)\n\t} elif n \u003c 0 {\n\t\tputchar(45)\n\t\tprintImpl(-n)\n\t} else {\n\t\tprintImpl(n)\n\t}\n}\n\nfn repeat(fun: fn(cint), cnt: cint) {\n\tif cnt \u003c 0 {\n\t\treturn\n\t} else {\n\t\tfun(cnt)\n\t\trepeat(fun, cnt - 1)\n\t}\n}\n\nfn test_fn(i: cint) {\n\tprint(i)\n\tputchar(10)\n}\n\nfn main(): i32 {\n\trepeat(test_fn, 10)\n\n\treturn 0\n}\n```\n\n\n\n#### Functional\n```sh\nfn main(): cint {\n\tprintln(reduce_range(min, 0, 90, 0))\n\tprintln(reduce_range(max, 0, 90, 0))\n\t\n\tprintln(invoke(id, 10))\n\tprintln(invoke(next, 10))\n\n\treturn 0\n}\n\nfn reduce_range(f: fn(i32, i32): i32, a: i32, b: i32, acc: i32): i32 {\n\tif a == b {\n\t\treturn f(acc, b)\n\t}\n\t\n\treturn reduce_range(f, a + 1, b, f(acc, a))\n}\n\nfn invoke(f: fn(i32): i32, x: i32): i32 = f(x)\n\nfn id(x: i32): i32 = x\n\nfn next(x: i32): i32 = x + 1\n\nfn min(a: i32, b: i32): i32 {\n\tif a \u003c b {\n\t\treturn a\n\t} else {\n\t\treturn b\n\t}\n}\n\nfn max(a: i32, b: i32): i32 {\n\tif a \u003e b {\n\t\treturn a\n\t} else {\n\t\treturn b\n\t}\n}\n\n// A function of the standard C runtime library.\nfn putchar(ch: cint): cint = native(\"putchar\")\n\nfn println(n: i32) {\n\tfn printImpl(n: i32) {\n\t\tif n != 0 {\n\t\t\tprintImpl(n / 10)\n\t\t\tputchar(48 + (n % 10) as cint)\n\t\t}\n\t}\n\t\n\tif n == 0 {\n\t\tputchar(48)\n\t} elif n \u003c 0 {\n\t\tputchar(45)\n\t\tprintImpl(-n)\n\t} else {\n\t\tprintImpl(n)\n\t}\n\t\n\tputchar(10)\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorejust%2Fcoreproject2024","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorejust%2Fcoreproject2024","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorejust%2Fcoreproject2024/lists"}