This website has been created as a study of programming languages, and how one would build an interpreter for λ-calculus, the simplest programming language.
The purpose of this website is to demonstrate fundamental concepts about programming languages via a hands-on approach. This is mainly aimed at educators & students in computer science trying to teach & learn the foundations of programming languages, and how compilers/interpreters work. A good example of a course in which this could be used is CS 45600 @ Purdue University.
There are two main ways this website achieves this goal:
The interactive λ-calculus interpreter that can be found further down on this page is implemented via recursive-descent parsing, wherein text is fed into a mechanism that attempts to match it against certain recursive rules — those that are written in reference to themselves.
The beauty with this technique is that once the text is matched with its rule, it's easy to provide JavaScript code (or any other language for that matter) that does exactly what the λ-code is supposed to do; in other words, a recursive descent parser written in JavaScript converts λ-calculus to JavaScript on the fly. Essentially, the rules become self-enforcing.
This exciting mechanism can be inspected at the GitHub repository of this project, which bears for all to see the elegant code that parses & interprets λ-calculus. There's a lot to learn from trying to understand how this code works, and I believe it provides an excellent example/case study to students in a course about programming languages.
Now that we know how to evaluate λ-calculus, we turn to its fundamental yet far-reaching implications. The so-called "simplest programming language" ushers in an incredible style of coding, one which many coders have yet to experience.
Functional programming, in which functions can be created, destroyed & operated on like any other data type, is a direct consequence of λ-calculus. This paradigm is incredibly powerful, and draws upon fundamental concepts in computer science. λ-calculus contains the rudiments of important constructs in functional programming, which is why it's a great place to start learning the domain.
This website showcases said rudiments, and provides a hands-on learning experience where prospective coders & students alike can play around with λ-terms and understand how they interact in a non-rigorous setting.
Lähteenmäki, J. M. (2019, August 26). Combinator Birds. Architecturally Elegant [Blog]. https://blog.lahteenmaki.net/combinator-birds.html
Lebec, G. (2017). Lambda Calculus — Fundamentals of Lambda Calculus & Functional Programming in JavaScript [Video]. Fullstack Academy. https://youtu.be/3VQ382QG-y4
Rojas, R. (2015, March 28). A tutorial introduction to the lambda calculus. arXiv preprint arXiv:1503.09060, 1-9. https://doi.org/10.48550/arXiv.1503.09060