{"id":13749295,"url":"https://github.com/orsinium-labs/rlci","last_synced_at":"2026-02-21T09:31:53.425Z","repository":{"id":176285561,"uuid":"642817974","full_name":"orsinium-labs/rlci","owner":"orsinium-labs","description":"🦀 λ Overly-documented Rust-powered Lambda Calculus Interpreter.","archived":false,"fork":false,"pushed_at":"2025-04-03T14:52:08.000Z","size":91,"stargazers_count":64,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T21:33:39.442Z","etag":null,"topics":["fp","functional-programming","interpreter","lambda","lambda-calculus","programming-language","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":false,"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/orsinium-labs.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}},"created_at":"2023-05-19T12:16:10.000Z","updated_at":"2025-04-03T14:52:12.000Z","dependencies_parsed_at":"2024-01-13T01:48:55.049Z","dependency_job_id":"ee1ae3c2-eba7-4575-9fb8-ebb4e54e6b5f","html_url":"https://github.com/orsinium-labs/rlci","commit_stats":null,"previous_names":["orsinium-labs/rlci"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/orsinium-labs/rlci","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Frlci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Frlci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Frlci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Frlci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orsinium-labs","download_url":"https://codeload.github.com/orsinium-labs/rlci/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsinium-labs%2Frlci/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29678230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T06:23:40.028Z","status":"ssl_error","status_checked_at":"2026-02-21T06:23:39.222Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["fp","functional-programming","interpreter","lambda","lambda-calculus","programming-language","rust"],"created_at":"2024-08-03T07:00:58.692Z","updated_at":"2026-02-21T09:31:53.408Z","avatar_url":"https://github.com/orsinium-labs.png","language":"Rust","funding_links":[],"categories":["Lambda Calculus","Rust"],"sub_categories":["Libraries"],"readme":"# RLCI\n\n🦀 Overly-documented Rust-powered Lambda Calculus Interpreter.\n\n## 😎 Features\n\n+ 📚 **Overly-documented**. There are comments and docstrings for everything, almost every line. Our top priority is to provide you with a good example of building your own programming language.\n+ 🐦 **Simple**. We kept only essentials and ditched anything unneeded. Comments? Strings? System calls? Who needs it?\n+ ⚙️ **Working**. Everything possible in lambda calculus is also possible with RLCI.\n+ 🏃 **REPL**. We have an interactive input with autocomplete and a bit of syntax highlighting.\n+ 🧩 **Standard library**. We have lots of useful functions available out of the box.\n+ ⚠️ **Friendly error messages**. And we even got tracebacks!\n+ 🦀 **Rust**. Rust is a good choice for writing a programming language, thanks to binary distributions and great performance.\n\n## 🧠 Learn Lambda Calculus\n\nThe main idea of [Lambda calculus](https://en.wikipedia.org/wiki/Lambda_calculus) is pretty simple. What if you have a programming language where you can only define a single-argument function and call other functions? That's it. No integers, no strings, no loops, no conditions. Just you and functions. And turns out, you can do quite a few things. In fact, anything that any other programming language can do.\n\nThe best way to learn lambda calculus is the [Lambda Calculus from the Ground Up](https://www.youtube.com/watch?v=pkCLMl0e_0k) workshop by David Beazley. I recommend you open the Python interpreter, follow along, pause, and try to think for yourself when the speaker asks a question. It's a great exercise and this is the most mind-boggling thing I ever learned.\n\nWhen you go through the workshop, take a look at the [python-lambda-calculus](https://github.com/orsinium-labs/python-lambda-calculus) project. There, I've implemented everything covered in the workshop and a few more things, like filter, map, reduce, and signed integers.\n\n## 🤔 Motivation\n\nI had several attempts to write a programming language before. And each time I ended up with [scope creep](https://en.wikipedia.org/wiki/Scope_creep) and a spaghetti of features breaking each other and in the end, nothing works. This time, I decided to approach things differently and make the smallest possible working programming language.\n\nIf you want a [Turing complete](https://en.wikipedia.org/wiki/Turing_completeness) programming language, your best options are either [Turing machine](https://en.wikipedia.org/wiki/Turing_machine) or Lambda calculus. The thing about the Turing machine, though, is that it's quite hard to program on it anything meaningful (see [Brainfuck](https://en.wikipedia.org/wiki/Brainfuck)). But Lambda calculus is different. Lambda calculus is a real functional language and has almost everything you have in LISP or Clojure. So, here we are.\n\n## 📦 Installation\n\nIf you have cargo:\n\n```bash\ncargo install rlci\n```\n\nIf you don't, go into [releases](https://github.com/orsinium/rlci/releases) and grab a binary for your system.\n\n## 📝 Syntax\n\nEverything is a function. Every function accepts exactly one argument (you give it a name) and returns an expression. Here is one that just returns the given argument:\n\n```text\n\\x x\n```\n\nOr the one that accepts 2 arguments and returns the first one:\n\n```text\n\\a \\b a\n```\n\nTechnically, it accepts only one argument and returns another function that returns that first argument, but that works about the same as if we had a function accepting 2 arguments. This is known as [currying](https://en.wikipedia.org/wiki/Currying).\n\nYou can assign expressions to variables to be referenced later:\n\n```text\nid = \\x \\x\ntrue = \\a \\b a\n```\n\nTo call a function, specify the function you want to call and then space-separate arguments:\n\n```text\nid true     # calls `id` with true, returns `true`\ntrue id id  # cals `true` with `id` and `id`, returns the first `id`\n```\n\nYou can use parenthesis to specify the order in which they should be executed:\n\n```text\n(\\x x) (not true)  # returns `false`\n```\n\nAnd that's it. Many functions are available out-of-the-box, such as [boolean operations](src/stdlib/bool.rb), [natural numbers](src/stdlib/nat.rb), [lists](src/stdlib/list.rb), a few [recursive funtions](src/stdlib/rec.rb), and [combinators](src/stdlib/combinators.rb).\n\n## 🛠️ Usage\n\nRun REPL:\n\n```bash\nrlci repl\n```\n\nParse a module and print the result of the last expression:\n\n```bash\ncat module.txt | rlci eval\n```\n\nParse and print the AST of a module:\n\n```bash\necho 'id = λx x' | rlci parse\n```\n\n## ⚙️ Dependencies\n\n+ [pest](https://github.com/pest-parser/pest) is for parsing the language grammar into AST.\n+ [rustyline](https://github.com/kkawakam/rustyline) is for making a friendly REPL.\n+ [clap](https://github.com/clap-rs/clap) is for making a friendly CLI.\n+ [anyhow](https://github.com/dtolnay/anyhow) is for easy error handling and nice error messages.\n+ [include_dir](https://github.com/Michael-F-Bryan/include_dir) is for including stdlib into the binary.\n+ [colored](https://github.com/mackwic/colored) is for colorizing terminal output. Errors should be red!\n\n## ❓ Questions and Answers\n\n**Q: Should I use it on the production?**\n\nA: No. Modern computers are designed after the Turing machine rather than Lambda calculus. So, it will be slow. Very slow. Still better than [DrRacket](https://docs.racket-lang.org/drracket/), though.\n\n**Q: Why there are no type annotations?**\n\nA: Because there is only one type: a function.\n\n**Q: Why does it exist?**\n\nBecause I can and I needed a break from tossing JSONs from one API to another.\n\n**Q: When is the next release?**\n\nA: Lambda Calculus became feature-complete in the 1930s. I'll let you know if there is anything new.\n\n**Q: Why is it on Rust?**\n\nBecause writing things on Python or Go is too easy. Programming on Rust is like solving riddles, and I love riddles.\n\n**Q: Should I star the project?**\n\nA: Yes, it will make me look superior to the other people in the office.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forsinium-labs%2Frlci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forsinium-labs%2Frlci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forsinium-labs%2Frlci/lists"}