{"id":25039544,"url":"https://github.com/kkestell/fern","last_synced_at":"2026-05-02T13:31:53.067Z","repository":{"id":270960615,"uuid":"911966200","full_name":"kkestell/fern","owner":"kkestell","description":"Multi-stage optimizing compiler for a statically-typed imperative programming language.","archived":false,"fork":false,"pushed_at":"2025-05-17T11:32:53.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-17T12:30:07.027Z","etag":null,"topics":["compiler","llvm","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kkestell.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}},"created_at":"2025-01-04T10:29:17.000Z","updated_at":"2025-05-17T11:32:56.000Z","dependencies_parsed_at":"2025-05-17T12:23:27.301Z","dependency_job_id":"a88dd08a-7e45-41cf-8bf4-22636207f530","html_url":"https://github.com/kkestell/fern","commit_stats":null,"previous_names":["kkestell/fern"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kkestell/fern","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkestell%2Ffern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkestell%2Ffern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkestell%2Ffern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkestell%2Ffern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kkestell","download_url":"https://codeload.github.com/kkestell/fern/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkestell%2Ffern/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32536559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T12:25:33.646Z","status":"ssl_error","status_checked_at":"2026-05-02T12:24:51.733Z","response_time":132,"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","python"],"created_at":"2025-02-06T02:52:24.189Z","updated_at":"2026-05-02T13:31:53.048Z","avatar_url":"https://github.com/kkestell.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fern\n\nA multi-stage optimizing compiler for a statically-typed imperative programming language.\n\n## Example\n\n```\nfn fib(n: int) -\u003e int\n    if n \u003c= 1 then\n        return n\n    end\n    return fib(n - 1) + fib(n - 2)\nend\n\nfn main() -\u003e int\n    return fib(10)\nend\n```\n\n```\n$ fern example.fern\n$ ./example\n$ echo $?\n55\n```\n\n## Compilation Pipeline\n\nThe compiler implements a modern compilation pipeline with several optimization stages:\n\n1. Source code is parsed into an Abstract Syntax Tree (AST)\n2. A symbol table is generated to track variable and function scopes\n3. The AST is converted to Three-Address Code (TAC)\n4. Dead code elimination removes unreachable code paths\n5. A Control Flow Graph (CFG) is built for analysis\n6. Conversion to Static Single Assignment (SSA) form\n7. SSA is translated to LLVM Intermediate Representation (IR)\n8. Finally, LLVM compiles the IR to a native executable\n\n## TODO\n\n* [ ] Type inference\n* [ ] Arrays and composite types\n* [ ] Loop constructs (while, for)\n* [ ] Standard library functions\n* [ ] More aggressive optimizations\n* [ ] Better error messages\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkkestell%2Ffern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkkestell%2Ffern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkkestell%2Ffern/lists"}