{"id":19686309,"url":"https://github.com/calint/any-c","last_synced_at":"2026-06-14T15:32:55.157Z","repository":{"id":93319668,"uuid":"75809562","full_name":"calint/any-c","owner":"calint","description":"experimental simple language that compiles to c","archived":false,"fork":false,"pushed_at":"2018-12-06T13:37:49.000Z","size":898,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-10T07:19:20.436Z","etag":null,"topics":["c","compiler"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"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/calint.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":"2016-12-07T07:09:35.000Z","updated_at":"2022-11-14T14:54:38.000Z","dependencies_parsed_at":"2023-04-28T14:25:14.261Z","dependency_job_id":null,"html_url":"https://github.com/calint/any-c","commit_stats":null,"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calint%2Fany-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calint%2Fany-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calint%2Fany-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calint%2Fany-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/calint","download_url":"https://codeload.github.com/calint/any-c/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240993950,"owners_count":19890419,"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":["c","compiler"],"created_at":"2024-11-11T18:27:13.170Z","updated_at":"2026-06-14T15:32:50.124Z","avatar_url":"https://github.com/calint.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# any-c\n```\nexperimental simple language that compiles to c\n\n  has\n    : structs with functions\n    : static type checking\n    : deduced variable types\n    : mutable references\n    : init/free framework\n    : terse syntax\n```\n\n\nsource size\n```\ncat src/ci/* src/lib/* src/lib.h main.c | wc\n   3584    5834   87352\ncat src/ci/* src/lib/* src/lib.h main.c | gzip | wc\n     52     363   16350\n```\n\n\n\nsample source\n```\nentity{\n\tid=1\t\n\tprint{\n\t\tp(\"entity %d\\n\",id)\n\t}\n}\n\nglobal{\n\tmain{\n\t\tentity e1\n\t\tentity\u0026e2=e1\n\t\te1.print()\n\t\te2.print()\n\t\te2.id=2\n\t\te1.print()\n\t\te2.print()\t\t\n\t}\n}\n```\n\n\ncompiles to\n```\n//--- - - -------------------  - -- - - - - - - -- - - - -- - -  tidy salami\n//--- - - ---------------------  - -- - - - - - - -- - - - -- - - - -- - - -\n#include\u003cstdlib.h\u003e\n#include\u003cstdio.h\u003e\ntypedef const char* strc;\ntypedef char bool;\n#define true 1\n#define false 0\n#define strc_def \"\"\n#define bool_def false\n#define char_def 0\n#define int_def 0\n#define float_def 0.0f\n#define null 0\n//--- - - -------------------  - -- - - - - - - -- - - - -- - - - --  entity\ntypedef struct entity{\n    int id;\n}entity;\n#define entity_def (entity){1}\n//--- - - -------------------  - -- - - - - - - -- - - - -- - - - -- - funcs\ninline static void entity_print(entity*o){\n    printf(\"entity %d\\n\",o-\u003eid);\n}\n//--- - - -------------------  - -- - - - - - - -- - - - -- - - - --  global\ntypedef struct global{}global;\n#define global_def (global){}\n//--- - - -------------------  - -- - - - - - - -- - - - -- - - - -- - funcs\ninline static void global_main(global*o){\n    entity e1=entity_def;\n    entity*e2=\u0026e1;\n    entity_print(\u0026e1);\n    entity_print(e2);\n    e2-\u003eid=2;\n    entity_print(\u0026e1);\n    entity_print(e2);\n}\ninline static void global_init(global*o){}\ninline static void global_free(global*o){}\n//--- - - ---------------------  - -- - - - - - - -- - - - -- - - - -- - - -\nint main(int c,char**a){\n    global g=global_def;\n    global_init(\u0026g);\n    global_main(\u0026g);\n    global_free(\u0026g);\n    return 0;\n}\n//--- - - ---------------------  - -- - - - - - - -- - - - -- - - - -- - - -\n```\n\n\noutputs\n```\nentity 1\nentity 1\nentity 2\nentity 2\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalint%2Fany-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalint%2Fany-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalint%2Fany-c/lists"}