{"id":19834796,"url":"https://github.com/jamesalbert/holyc-for-linux","last_synced_at":"2025-10-25T00:09:48.248Z","repository":{"id":57465175,"uuid":"86419032","full_name":"jamesalbert/HolyC-for-Linux","owner":"jamesalbert","description":"run HolyC on Linux secularly","archived":false,"fork":false,"pushed_at":"2022-12-11T00:03:22.000Z","size":170,"stargazers_count":339,"open_issues_count":4,"forks_count":19,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-29T04:07:26.252Z","etag":null,"topics":["holyc","linux","lords-temple","templeos","terry-davis"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/jamesalbert.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}},"created_at":"2017-03-28T05:35:37.000Z","updated_at":"2025-03-20T13:55:14.000Z","dependencies_parsed_at":"2022-09-17T18:10:14.949Z","dependency_job_id":null,"html_url":"https://github.com/jamesalbert/HolyC-for-Linux","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesalbert%2FHolyC-for-Linux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesalbert%2FHolyC-for-Linux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesalbert%2FHolyC-for-Linux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesalbert%2FHolyC-for-Linux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesalbert","download_url":"https://codeload.github.com/jamesalbert/HolyC-for-Linux/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289427,"owners_count":20914464,"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":["holyc","linux","lords-temple","templeos","terry-davis"],"created_at":"2024-11-12T12:05:38.368Z","updated_at":"2025-10-25T00:09:48.181Z","avatar_url":"https://github.com/jamesalbert.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HolyC-for-Linux\nrun HolyC on Linux secularly\n\n![Build Status](https://img.shields.io/badge/build-passing-brightgreen)\n![License](https://img.shields.io/github/license/jamesalbert/holyc-for-Linux?color=brightgreen\u0026logoColor=brightgreen)\n[![PyPI version](https://badge.fury.io/py/secularize.svg)](https://badge.fury.io/py/secularize)\n\n#### Disclaimer\n\nThis tool is in super-hella-mega alpha stage. If you use this, you will die. Or worse, your current operating system will be replaced with TempleOS. I've only tested this on `3.7-dev`.\n\n## Install\n\n```\npip install secularize\n```\n\n## Translate\n\nThe primary use is to translate holyc to c. Do this with:\n`secularize examples/test.hc`\n\nthis turns `examples/test.hc`\n```c\nF64 *s = 3;\n\nU0 test(I16 a, U8 b, F64 c) {\n  Print(\"hello\");\n}\n\nF64 pest(I8 d) {\n  Print(\"nothing\");\n}\n\nPrint(\"%s %s\", \"hello\", \"world\");\nI64 b = 2.000;\n```\n\ninto `examples/test.c`\n```c\nvoid test(short a, unsigned char b, double c)\n{\n  printf(\"hello\");\n}\n\ndouble pest(char d)\n{\n  printf(\"nothing\");\n}\n\nint main()\n{\n  double* s = 3;\n  printf(\"%s %s\", \"hello\", \"world\");\n  long b = 2.0;\n}\n```\n\n## Debugging\n\nTo add a feature, it's useful to get the AST of an expected target. To do this, write the C file you're trying to translate to, then run `secularize dump-ast name-of-file.c`. This will pretty print the AST to json.\n\n```sh\n$ cat examples/math.c\nint main()\n{\n  long a = 3;\n  long b = 2;\n}\n\n$ secularize dump-ast examples/math.c\n{\n  \"_nodetype\": \"FileAST\",\n  \"coord\": null,\n  \"ext\": [\n    {\n      \"_nodetype\": \"FuncDef\",\n      \"coord\": \"examples/math.c:1:5\",\n      \"decl\": {\n        \"_nodetype\": \"Decl\",\n        \"name\": \"main\",\n        \"quals\": [],\n        \"storage\": [],\n        \"funcspec\": [],\n        \"coord\": \"examples/math.c:1:5\",\n        \"type\": {\n          \"_nodetype\": \"FuncDecl\",\n          \"coord\": \"examples/math.c:1:5\",\n          \"type\": {\n            \"_nodetype\": \"TypeDecl\",\n            \"declname\": \"main\",\n            \"quals\": [],\n            \"coord\": \"examples/math.c:1:5\",\n            \"type\": {\n              \"_nodetype\": \"IdentifierType\",\n              \"names\": [\n                \"int\"\n              ],\n              \"coord\": \"examples/math.c:1:1\"\n            }\n          },\n          \"args\": null\n        },\n        \"init\": null,\n        \"bitsize\": null\n      },\n      \"body\": {\n        \"_nodetype\": \"Compound\",\n        \"coord\": \"examples/math.c:2:1\",\n        \"block_items\": [\n          {\n            \"_nodetype\": \"Decl\",\n            \"name\": \"a\",\n            \"quals\": [],\n            \"storage\": [],\n            \"funcspec\": [],\n            \"coord\": \"examples/math.c:3:8\",\n            \"type\": {\n              \"_nodetype\": \"TypeDecl\",\n              \"declname\": \"a\",\n              \"quals\": [],\n              \"coord\": \"examples/math.c:3:8\",\n              \"type\": {\n                \"_nodetype\": \"IdentifierType\",\n                \"names\": [\n                  \"long\"\n                ],\n                \"coord\": \"examples/math.c:3:3\"\n              }\n            },\n            \"init\": {\n              \"_nodetype\": \"Constant\",\n              \"type\": \"int\",\n              \"value\": \"3\",\n              \"coord\": \"examples/math.c:3:12\"\n            },\n            \"bitsize\": null\n          },\n          {\n            \"_nodetype\": \"Decl\",\n            \"name\": \"b\",\n            \"quals\": [],\n            \"storage\": [],\n            \"funcspec\": [],\n            \"coord\": \"examples/math.c:4:8\",\n            \"type\": {\n              \"_nodetype\": \"TypeDecl\",\n              \"declname\": \"b\",\n              \"quals\": [],\n              \"coord\": \"examples/math.c:4:8\",\n              \"type\": {\n                \"_nodetype\": \"IdentifierType\",\n                \"names\": [\n                  \"long\"\n                ],\n                \"coord\": \"examples/math.c:4:3\"\n              }\n            },\n            \"init\": {\n              \"_nodetype\": \"Constant\",\n              \"type\": \"int\",\n              \"value\": \"2\",\n              \"coord\": \"examples/math.c:4:12\"\n            },\n            \"bitsize\": null\n          }\n        ]\n      },\n      \"param_decls\": null\n    }\n  ]\n}\n\n```\n\n## What's Supported\n\n- print statements\n- primitive data types\n- basic functions\n\n## What's Not Supported\n\nEverything else. Deal with it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesalbert%2Fholyc-for-linux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesalbert%2Fholyc-for-linux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesalbert%2Fholyc-for-linux/lists"}