{"id":21715142,"url":"https://github.com/clark800/lambda-zero","last_synced_at":"2025-04-09T20:11:58.416Z","repository":{"id":48806988,"uuid":"119607010","full_name":"clark800/lambda-zero","owner":"clark800","description":"minimalist pure lazy functional programming language (pythonic haskell)","archived":false,"fork":false,"pushed_at":"2025-03-19T04:22:19.000Z","size":1866,"stargazers_count":77,"open_issues_count":4,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-09T20:11:52.665Z","etag":null,"topics":["c","functional","functional-programming","haskell","krivine-machine","lambda-calculus","lazy-evaluation","minimalist","programming-language","pythonic"],"latest_commit_sha":null,"homepage":"","language":"C","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/clark800.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}},"created_at":"2018-01-30T23:20:44.000Z","updated_at":"2025-04-02T00:30:42.000Z","dependencies_parsed_at":"2023-11-30T02:24:29.734Z","dependency_job_id":"4c094b92-a2f7-427f-a0c0-a1a4fc2b42bd","html_url":"https://github.com/clark800/lambda-zero","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clark800%2Flambda-zero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clark800%2Flambda-zero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clark800%2Flambda-zero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clark800%2Flambda-zero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clark800","download_url":"https://codeload.github.com/clark800/lambda-zero/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103872,"owners_count":21048245,"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":["c","functional","functional-programming","haskell","krivine-machine","lambda-calculus","lazy-evaluation","minimalist","programming-language","pythonic"],"created_at":"2024-11-26T00:41:22.399Z","updated_at":"2025-04-09T20:11:58.392Z","avatar_url":"https://github.com/clark800.png","language":"C","readme":"# Introduction\n\nLambda Zero is a minimalist pure lazy functional programming language bootstrapped from about 2500 lines of C. It can be thought of as pythonic haskell with no IO (there is no concept of IO *within the language*, but the main function maps strings to strings and the interpreter maps the input and output of main to stdin and stdout). Due to laziness, it's possible to build interactive GUI applications using an adapter (see the Conway's [Game of Life](samples/life/life.zero) sample in the repo).\n\nFeatures include:\n* All the standard Lambda Calculus features (first class functions, closures,\n    currying, recursion, nested function definitions, ...)\n* Lazy evaluation (infinite data structures, increased modularity, ...)\n* Algebraic data types (enumerations, tuples, lists, trees, records/structs,\n    maybe/optional types, either types, monads, ...)\n* Pattern matching (case expressions, tuple destructuring, ...)\n* Automatic garbage collection\n* Semantic whitespace\n* Unicode support (UTF8)\n* User-defined lexically-scoped operator syntax and semantics\n* Hindley-Milner static type inference (implemented in Lambda Zero)\n* A self-interpreter\n\n# Sample Code\n\n### Hello World\n\n    main(input) ≔ \"hello world\"\n\n### Factorial\n\n    n ! ≔ n ⦊ (case 0 ↦ 1; case ↑ n′ ↦ n ⋅ n′ !)\n\n### Quicksort\n\n    sort ≔ (case [] ↦ []; case n ∷ ns ↦ sort(ns ¦ (≤ n)) ⧺ [n] ⧺ sort(ns ¦ (\u003e n)))\n\n### Infinite list of natural numbers\n\n    iterate(f, x) ≔ x ∷ iterate(f, f(x))\n    (…) ≔ iterate(↑)\n    naturals ≔ 0 …\n\n### Infinite list of Fibonacci numbers\n\n    fibonaccis ≔ f(0, 1) where f(m, n) ≔ m ∷ f(n, m + n)\n\n### Infinite list of prime numbers\n\n    primes ≔ p(2 …) where p ≔ (case [] ↦ []; case n ∷ ns ↦ n ∷ p(ns ¦ (% n ≠ 0)))\n\n# Building\n\nMake sure a C compiler is installed and run the `make` script in\nthe bootstrap-interpreter directory:\n\n    cd bootstrap-interpreter\n    ./make\n\n# Running\n\nFrom the bootstrap-interpreter directory:\n\n    ./run SOURCEFILE\n\nFor example, try this sample program that prints out an infinite list of prime\nnumbers:\n\n    ./run test/samples/primes.zero\n\nThe `run` script prepends the [prelude](libraries/prelude.zero)\nto the `SOURCEFILE` and passes the result to `main`.\n\n# Stability\n\nBreaking changes may be made at any time.\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclark800%2Flambda-zero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclark800%2Flambda-zero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclark800%2Flambda-zero/lists"}