{"id":24762365,"url":"https://github.com/ferdi265/lambda-compiler","last_synced_at":"2026-05-17T00:02:19.962Z","repository":{"id":70654215,"uuid":"604575530","full_name":"Ferdi265/lambda-compiler","owner":"Ferdi265","description":"A Lambda Calculus to LLVM IR compiler","archived":false,"fork":false,"pushed_at":"2024-05-10T10:43:42.000Z","size":219,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T13:34:31.978Z","etag":null,"topics":["compiler","lambda-calculus","llvm","pattern-matching","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Ferdi265.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":"2023-02-21T10:56:14.000Z","updated_at":"2024-07-20T16:36:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"db7e6b3a-47db-41dc-ba75-95e02820be6e","html_url":"https://github.com/Ferdi265/lambda-compiler","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Ferdi265/lambda-compiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ferdi265%2Flambda-compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ferdi265%2Flambda-compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ferdi265%2Flambda-compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ferdi265%2Flambda-compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ferdi265","download_url":"https://codeload.github.com/Ferdi265/lambda-compiler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ferdi265%2Flambda-compiler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262578429,"owners_count":23331620,"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":["compiler","lambda-calculus","llvm","pattern-matching","python"],"created_at":"2025-01-28T19:29:44.023Z","updated_at":"2025-10-19T12:49:39.224Z","avatar_url":"https://github.com/Ferdi265.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lambda-Compiler\n\nA Lambda Calculus to LLVM IR compiler\n\n## Installation\n\n- run `pipx install git+https://github.com/Ferdi265/lambda-compiler` to install\n- run `pipx install --editable .` for a development install\n\n`pipx` is a modern replacement for installing CLI applications with `pip`\ndirectly, since `pip` now by default forbids installing applications outside a\nvirtualenv on most distros. You can use `pip` as well, but `pipx` is\nrecommended.\n\n## Examples\n\n- a few example programs are found in the `examples/` subdirectory\n- you can create a new project by running `lambda-mkmake myproject` in a new folder\n\n## Compilation\n\nCompilation is done in five steps:\n\n- collect GNU Make dependency information for a Lambda crate (`lambda-lang2deps`)\n- collect a whole Lambda crate into one file, resolve names and macros (`lambda-lang2hlir`)\n- compile Lambda calculus expressions to simple returns, tail calls, and calls, with explicit captures (`lambda-hlir2mlir`)\n- translate the resulting intermediate language to LLVM IR (`lambda-mlir2llir`) and generate a main function (`lambda-mlir2main`)\n- compile the resulting LLVM IR together with the runtime and external IO routines into a program (`clang`)\n\n## Language\n\nLambda is an eagerly evaluated lambda calculus.\n\n- Function Application: `func arg1 arg2` is equivalent to `(func(arg1))(arg2)` in Python\n- Lambda Construction: `func arg -\u003e body` is equivalent to `func(lambda arg: body)` in Python\n- Parentheses can be used to adjust precedence:\n    - `func arg -\u003e body arg2` is equivalent to `func(lambda arg: body(arg2))` in Python\n    - `func (arg -\u003e body) arg2` is equivalent to `(func(lambda arg: body))(arg2)` in Python\n- Macros are prefixed by `!` and expand to regular calls to functions defined in `std.lambda`:\n    - `!\"string\"` expands to a call to `(std::list_n ...)` constructing a list\n      of numbers representing the UTF-8 bytes of the string\n    - `!42` expands to a call to `(std::dec2 ...)` or `(std::dec3 ...)` to\n      construct a number object. Number literals greater than 999 are currently\n      not supported.\n\nA Lambda program is a list of definitions that can only refer to previous\ndefinitions (not to themselves). This means one has to use a fixed point\ncombinator such as the y combinator to create recursive functions.\n\n### Example:\n\n```\ntrue = a -\u003e b -\u003e a;\nfalse = a -\u003e b -\u003e b;\n\nnot = a -\u003e a false true;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferdi265%2Flambda-compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fferdi265%2Flambda-compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferdi265%2Flambda-compiler/lists"}