{"id":31765111,"url":"https://github.com/perceptronv/wuyu-lang","last_synced_at":"2025-10-14T04:18:39.796Z","repository":{"id":318694604,"uuid":"1071937695","full_name":"PerceptronV/wuyu-lang","owner":"PerceptronV","description":"《無語》編譯器 — A statically-typed, dynamically-compiled language for esoteric Chinese.","archived":false,"fork":false,"pushed_at":"2025-10-08T16:32:01.000Z","size":55,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-08T18:37:22.459Z","etag":null,"topics":["aot","esoteric-chinese","esoteric-language","jit","llvm"],"latest_commit_sha":null,"homepage":"","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/PerceptronV.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-08T03:12:00.000Z","updated_at":"2025-10-08T16:32:04.000Z","dependencies_parsed_at":"2025-10-08T18:37:27.276Z","dependency_job_id":null,"html_url":"https://github.com/PerceptronV/wuyu-lang","commit_stats":null,"previous_names":["perceptronv/wuyu-lang"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/PerceptronV/wuyu-lang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerceptronV%2Fwuyu-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerceptronV%2Fwuyu-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerceptronV%2Fwuyu-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerceptronV%2Fwuyu-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PerceptronV","download_url":"https://codeload.github.com/PerceptronV/wuyu-lang/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerceptronV%2Fwuyu-lang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002382,"owners_count":26083356,"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-09T02:00:07.460Z","response_time":59,"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":["aot","esoteric-chinese","esoteric-language","jit","llvm"],"created_at":"2025-10-10T00:13:16.971Z","updated_at":"2025-10-10T00:13:19.601Z","avatar_url":"https://github.com/PerceptronV.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐲 無語\n曰：「無語者，必將開天闢地」。\n\n《無語》編譯器以上古之言納如今算術之式。例，求質數：\n\n```wuyu\n有數極限。\n曰：「君欲求何數？ 」。\n求：極限。\n\n有問列質否，廣極限益一者，為是。\n\n順數現為二漸增至極限也\n    若質否其現者如是，則\n        曰：現：「 」。\n        順數倍為二漸增至極限拆現也\n            質否其現乘倍者為非。\n```\n\n施法而得：\n```bash\n君欲求何數？ 五十\n2 3 5 7 11 13 17 19 23 29 31 37 41 43 47\n```\n\n無語卻言章次：\n- [第一回 · 速戰速決](#第一回--速戰速決)\n- [第二回 · 查言觀澀](#第二回--查言觀澀)\n- [第三回 · 編譯之法](#第三回--編譯之法)\n- [第四回 · 學而時習](#第四回--學而時習)\n- [第五回 · 法海無邊](#第五回--法海無邊)\n\n## 第一回 · 速戰速決\n\n**建基（原置 Ubuntu 25.04）**\n```bash\nsudo apt install -y build-essential cmake ninja-build \\\n    llvm-20 llvm-20-dev lld-20 zlib1g-dev\n```\n\n**構築**\n```bash\n# 克隆此經文\ngit clone https://github.com/PerceptronV/wuyu-lang\ncd wuyu-lang\n\n# 構建\n./build.sh\n\n# 測試\n./build/bin/wuyu --version\n```\n\n**開天**\n\n運 `./build/bin/wuyu`，而後施[`盤古.🐲`](docs/examples/盤古.🐲)之法：\n\n```wuyu\n曰：「天地玄黃，宇宙洪荒。」：更。\n```\n\n**辟地**\n\n```bash\n./build/bin/wuyu docs/examples/質數.🐲\n```\n\n## 第二回 · 查言觀澀\n\n### 物類\n\n```wuyu\n有數齡為二十五。        · int 齡 = 25;\n有分價為九十九點九。     · float 價 = 99.9;\n有文名為「小明」。       · string 名 = \"小明\";\n有問真假為是。          · bool 真假 = true;\n```\n\n### 算術\n\n```wuyu\n有數甲為十。\n有數乙為三。\n\n曰：甲益乙：更。  · 甲 + 乙\n曰：甲損乙：更。  · 甲 - 乙\n曰：甲乘乙：更。  · 甲 * 乙\n曰：甲除乙：更。  · 甲 / 乙\n曰：甲拆乙：更。  · 甲 // 乙\n曰：甲餘乙：更。  · 甲 % 乙\n```\n\n### 控流\n\n```wuyu\n若甲盈零則           · if (甲 \u003e 0)\n    曰：「正數」：更。  · cout \u003c\u003c \"正數\" \u003c\u003c endl;\n而則\n    曰：「非正數」：更。\n\n循甲虧十也           · while (甲 \u003c 10)\n    曰：甲：更。\n    甲增。\n\n順數甲為零漸一至十也  · for (int i = 0; i \u003c= 10; i++)\n    曰：甲：更。\n```\n\n### 函數\n\n```wuyu\n設術階乘參數量者得數           · int factorial(int n)\n    若量頂一則\n        奏一。\n    然則\n        奏量乘階乘執量損一者。 · return n * factorial(n - 1);\n\n有數果為階乘執五者。\n曰：果：更。                 · 一百二十\n```\n\n### 陣列\n\n```wuyu\n有數列例廣十者。       · int 例[10];\n例其零者為一。        · 例[0] = 1\n曰：例其零者：更。     · cout \u003c\u003c 例[0] \u003c\u003c endl;\n```\n\n## 第三回 · 編譯之法\n\n### 立時執行（JIT）\n\n```bash\n./build/bin/wuyu 心血來潮.🐲\n```\n\n### 編為標檔（AOT）\n\n```bash\n./build/bin/wuyu -c 心血來潮.🐲 -o 心血來潮.o\ngcc 心血來潮.o -o 心血來潮\n./心血來潮\n```\n\n### 編為 LLVM 中階之式\n\n```bash\n./build/bin/wuyu -l 心血來潮.🐲 -o 心血來潮.ll\ncat 心血來潮.ll\n```\n\n無語其型多變：\n\n- `.🐲` - 御用\n- `.無` - 通行\n- `.wuyu` - 西洋\n\n## 第四回 · 學而時習\n\n文法之例，乃藏[於此](docs/examples/)。\n\n### 術語\n\n| 術語 | 無語 |\n|---------|---------|\n| declare | 有 |\n| define | 設 |\n| if | 若 |\n| then | 則 |\n| else if | 而 |\n| else | 然則 |\n| while | 循 |\n| for | 順 |\n| function | 術 |\n| return | 奏 |\n| print | 曰 |\n| input | 求 |\n\n### 類別\n\n| 類別 | 無語 |\n|------|---------|\n| integer | 數 |\n| float | 分 |\n| string | 文 |\n| boolean | 問 |\n| array | 列 |\n\n### 算符\n\n| 算符 | 無語 |\n|----------|---------|\n| + | 益 |\n| - | 損 |\n| * | 乘 |\n| / | 除 |\n| // | 拆 |\n| % | 餘 |\n| = | 為 |\n| == | 如 |\n| != | 弗 |\n| \u003e | 盈 |\n| \u003c | 虧 |\n\n## 第五回 · 法海無邊\n\n《無語》 版權所有 宋亦丁 二零二五 乙巳年。\n\n此處《無語》代碼庫、軟件等之公用乃從「[GNU GENERAL PUBLIC LICENSE v3](LICENSE)」之條文。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperceptronv%2Fwuyu-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperceptronv%2Fwuyu-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperceptronv%2Fwuyu-lang/lists"}