{"id":16339948,"url":"https://github.com/ella-0/grimec","last_synced_at":"2026-04-28T15:40:49.100Z","repository":{"id":161475170,"uuid":"220619343","full_name":"Ella-0/grimec","owner":"Ella-0","description":"The Grime Compiler","archived":false,"fork":false,"pushed_at":"2021-03-05T18:36:19.000Z","size":10251,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-23T16:11:26.202Z","etag":null,"topics":["compiler","llvm"],"latest_commit_sha":null,"homepage":null,"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/Ella-0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-11-09T09:24:18.000Z","updated_at":"2023-01-27T03:43:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"de9791b3-11ca-4fe5-9d7e-10c74cd9b789","html_url":"https://github.com/Ella-0/grimec","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Ella-0/grimec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ella-0%2Fgrimec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ella-0%2Fgrimec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ella-0%2Fgrimec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ella-0%2Fgrimec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ella-0","download_url":"https://codeload.github.com/Ella-0/grimec/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ella-0%2Fgrimec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32387918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["compiler","llvm"],"created_at":"2024-10-10T23:55:33.698Z","updated_at":"2026-04-28T15:40:49.086Z","avatar_url":"https://github.com/Ella-0.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Build](https://github.com/Edward-0/grimec/workflows/Build/badge.svg)\n# Grime Compiler\nThe new static compiler for the grime programming language.\n\n## Building\n### Dependencies\n * LLVM\n#### Make\n * CMake\n```sh\nmkdir build\ncd build\ncmake -G Ninja ..\nninja\n```\n## Getting Started\n\n### Hello, World\nThis is the old syntax and what the compiler can currently handle\n```grime\nmod test::helloworld\n\next def func puts([UByte]) -\u003e Int\n\nfunc main(argc: Int, argv: [[UByte]]) -\u003e Int {\n\tvar greeting: [UByte] := \"Hello, World!\"\n\tputs(greeting)\n\tret := 0\n}\n```\nThe new syntax that needs to be implemented\n```grime\n/*\n * `!` means always run at comptime\n * `mod` is a function that tells the compiler\n * what namespace we're in\n */\nmod!(test::helloworld)\n\n/*\n * `main` is the entry point. I'll probably make it possible to have \"swissarmy-knife\" type binary\n * like busybox and toybox\n *\n * `env` is the environment; one thing I dislike is globals and this allows one to avoid that.\n * it contains everything one needs to know from constant file descriptors such as stdin and stderr\n * to environment variables and cmdline args\n * the `\u0026` prefixing `env` tells us this is a \"borrow checked pointer\" that we don't own. \n * `main` will not drop `env` `_start` is responsible for that.\n *\n * `NotZero` returns an integer type that can never ever be 0\n * `()` is basically nothing similar to rust\n * `Result` returns a structure type with a bool and a union of `E` and `T`\n * but in some cases it can be packed together for example\n * if one of the type's is a NotZero and the other is () the representation will always be the width\n * of the original integer so the return type here will always be a u32 and if it's a 0 it means there\n * is no error.\n */\npub fn main(env: \u0026std::Env) -\u003e Result!((),NotZero!(u32)) {\n\t/*\n\t * `stdout` is one of the constant file descriptors\n\t * `println` does what it says on the tin and prints with\n\t * a new line. should probably change to have a cmptime format\n\t */\n\tenv.stdout.println(\"Hello, World!\");\n\t/*\n\t * like rust this is returning without an error\n\t */\n\tOk(())\n}\n\n```\n### Usage\n\n```sh\ngrimec helloworld.gm | clang -x ir\n./a.out\n```\n```\ngrimec \u003cfile\u003e | clang -x ir -\n```\n\n## TODO\n - lexer is fundamentally broken and needs a total rewrite (most likely use FSM)\n - restructure semantic stage\n - add custom ir\n - change syntax\n - change build system to a single POSIX Makefile and a Ninja file or write a\n   very short configure POSIX shell script to generate one of your choice\n   `./configure --ninja` or `./configure --make`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fella-0%2Fgrimec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fella-0%2Fgrimec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fella-0%2Fgrimec/lists"}