https://github.com/quchen/lambda-ski
A lambda and SKI calculus playground
https://github.com/quchen/lambda-ski
haskell lambda-calculus ski-calculus
Last synced: about 2 months ago
JSON representation
A lambda and SKI calculus playground
- Host: GitHub
- URL: https://github.com/quchen/lambda-ski
- Owner: quchen
- License: other
- Created: 2018-01-25T15:21:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-07T15:32:42.000Z (over 2 years ago)
- Last Synced: 2025-03-24T10:38:48.723Z (3 months ago)
- Topics: haskell, lambda-calculus, ski-calculus
- Language: Haskell
- Size: 134 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Hello SK!
=========Hello World, the most famous and basic computing problem! However, after
implementing it in several languages, I realized that this problem should be
solved once for many languages instead of having to be rewritten time and time
again. We clearly need a compiler for Hello World programs.We start by writing what we believe to be Hello World in untyped lambda
calculus. Since modern operating systems lack an interpreter by default, we had
to write one here. Unfortunately, evaluating nominal [lambda calculus][λC] is
*hard*, so we simplify the problem by transforming it into [De Bruijn][deBruijn]
form, and then evaluate that. This allowed checking that the program is indeed
Hello World. We can finally compile this lambda calculus version to a
[SK][wikipedia-SK] based one, which is easy to evaluate in many practical
langauges, such as not Java.You can view the generated Hello Worlds in the `helloworld` subdirectory, or
generate them yourself by running `scripts/generate-hello-worlds`.[deBruijn]: https://en.wikipedia.org/wiki/De_Bruijn_index
[wikipedia-SK]: https://en.wikipedia.org/wiki/SKI_combinator_calculus
[λC]: https://en.wikipedia.org/wiki/Lambda_calculus