{"id":20506433,"url":"https://github.com/chaosunity/fangyen","last_synced_at":"2026-02-01T22:32:00.441Z","repository":{"id":109467776,"uuid":"447718024","full_name":"ChAoSUnItY/FangYen","owner":"ChAoSUnItY","description":"Concatenative programming language but written in Mandarin?!?! PogChamp 串接堆疊導向程式語言但是用中文撰寫？！？！ 太神啦","archived":false,"fork":false,"pushed_at":"2022-02-25T02:24:14.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-26T10:50:27.479Z","etag":null,"topics":["programming-language"],"latest_commit_sha":null,"homepage":"","language":"V","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/ChAoSUnItY.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":"2022-01-13T18:59:22.000Z","updated_at":"2022-02-20T18:29:37.000Z","dependencies_parsed_at":"2023-05-17T23:30:29.417Z","dependency_job_id":null,"html_url":"https://github.com/ChAoSUnItY/FangYen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ChAoSUnItY/FangYen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChAoSUnItY%2FFangYen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChAoSUnItY%2FFangYen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChAoSUnItY%2FFangYen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChAoSUnItY%2FFangYen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChAoSUnItY","download_url":"https://codeload.github.com/ChAoSUnItY/FangYen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChAoSUnItY%2FFangYen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28993253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T22:01:47.507Z","status":"ssl_error","status_checked_at":"2026-02-01T21:58:37.335Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["programming-language"],"created_at":"2024-11-15T19:57:04.457Z","updated_at":"2026-02-01T22:32:00.427Z","avatar_url":"https://github.com/ChAoSUnItY.png","language":"V","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e Fang Yen Programming Langauge\u003c/br\u003e方言程式語言 \u003c/h1\u003e\n\n##\n\n\u003e Concatenative stack-oriented programming language but written in Mandarin?!?! PogChamp \u003cbr/\u003e\n\u003e 串接堆疊導向程式語言但是用中文撰寫？！？！ 太神啦\n\n\u003cp align=\"center\"\u003e\n\n\u003ctable\u003e\n\u003ctd\u003e\n\n[繁體中文](/README_ZH.md)\n\n\u003c/td\u003e\n\u003ctd\u003e\n\nEnglish\n\n\u003c/td\u003e\n\u003c/table\u003e\n\n\u003c/p\u003e\n\nFang Yen is a concatenative programming language inspired by [Porth programming language](https://gitlab.com/tsoding/porth) and [Forth programming language](https://zh.wikipedia.org/wiki/Forth). Requires [Hieroglymph Virtual Machine](https://github.com/ChAoSUnItY/HieroglyphVM) to execute.\n\n\u003ch2\u003e Build \u003c/h2\u003e\n\u003ch3\u003e Prereuisites \u003c/h3\u003e\n\n- [V Lang](https://github.com/vlang/vlang)\n- Makefile\n\n\u003ch3\u003e Build it from source \u003c/h3\u003e\n\n```cmd\n$ git clone https://github.com/ChAoSUnItY/FangYen.git\n$ git submodule update --init --recursive   # pull Hieroglymph VM\n$ v up                                      # update V to latest version (optional but highy suggest)\n$ v --prod ./FangYen.v                      # compile Fang Yen compiler into executable\n$ ./FangYen \u003csource file path\u003e              # compile Fang Yen into bytecode and execute it\n```\n\n\u003e Note: bytecode can be found at ~/.hvm/cache\n\n\u003ch2\u003e Getting started \u003c/h2\u003e\n\u003ch3\u003e Fang Yen 101 \u003c/h3\u003e\n\nSince Fang Yen is concatenative stack-oriented programming language,\n**all single words in Fang Yen (except several keywords) has specific opcode to be emitted**.\nThat's it, no redundant operation is allowed.\n\n\u003ch3\u003e Types \u003c/h3\u003e\n\nCurrently Fang Yen has the following primitive types:\n\n- Integer  \n```c\n1234\n```\n- Boolean  \nNote that boolean is also considered as a numeric type.\n```c\n是 // Stands for true\n非 // Stands for false\n```\n- Nil\nNote that nil is also considered as a numeric type.\n```c\n空指標 // Stands for `NULL` in C\n```\n\nDeclare a primitive value will result in pushing value onto stack.\n\n\u003ch3\u003e Output \u003c/h3\u003e\n\nTo dump a value from stack (dump: pop and print), use `傾印` keyword.\n\n- Dump\n```c\n123 傾印 // this will print out 123\n```\n\n\u003ch3\u003e Arithmetic \u003c/h3\u003e\n\nNote that it would lead to undefined behavior if dividing or modding with `false` or `nil`.\n\n| Operator | Fang Yen Keyword | Appliable types |\n|:--------:|:----------------:|:---------------:|\n| + | 加 | `integer`, `boolean`, `nil` |\n| - | 減 | `integer`, `boolean`, `nil` |\n| * | 乘 | `integer`, `boolean`, `nil` |\n| / | 除 | `integer`, `boolean` (`true` only) |\n| % | 餘 | `integer`, `boolean` (`true` only) |\n\n\u003ch3\u003e Comparison \u003c/h3\u003e\n\nBesides the basic comparison operations, `boolean` and `nil` are also comparable since they both stored as byte.\n\n| Operator | Fang Yen Keyword | Appliable types |\n|:--------:|:----------------:|:---------------:|\n| == | 等於 | `All types` |\n| != | 不等於 | `All types` |\n| \u003e | 大於 | `integer`, `boolean`, `nil` |\n| \u003e= | 大等於 | `integer`, `boolean`, `nil` |\n| \u003c | 小於 | `integer`, `boolean`, `nil` |\n| \u003c= | 小等於 | `integer`, `boolean`, `nil` |\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaosunity%2Ffangyen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaosunity%2Ffangyen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaosunity%2Ffangyen/lists"}