This is technically a post in the Lambda Calculus series but I am concerned with the implementation of my Lambda calculator today. Anybody who has looked at the code will see I have used a class hierarchy to represent Lambda expressions. I use classes because I want my objects to be of reference types so … Continue reading Protocol Oriented Programming
Blog
Numbers in The Lambda Calculus
God created the natural numbers. All else is the work of man.Leopold Kronecker We've got lists and with lists we can do pretty much any data structure we like. However, in computing, we also need numbers. Usually, numbers are thought of as fairly basic entities with respect to computing, but, in the Lambda Calculus they … Continue reading Numbers in The Lambda Calculus
Lambda Calculus: Recursion
"When preceded by its quotation yields falsehood" when preceded by its quotation yields falsehood.Willard Van Orman Quine Before we start, recursion is a tricky subject. I suggest you read this article before continuing. Also, you're going to need at least version 1.3.1 of the lambda calculator to try out the examples. This version allows variable … Continue reading Lambda Calculus: Recursion
Lists in the Lambda Calculus
Some Lambda Calculator Enhancements In version 1.2.1 of the Lambda Calculator, I have added the concept of a meta command. A meta command starts with a / (forward slash) and is used for doing things outside of the Lambda Calculus (forward slash is sort of the opposite of backslash, which is my alternate way of … Continue reading Lists in the Lambda Calculus
Higher Level Concepts In The Lambda Calculus
Some Syntactic Sugar We are going to be talking about some pretty high level concepts in this post, like true and false and maybe even the natural numbers (although that might be too high level and need to be left to the next post). You've probably realised that the Lambda Calculus has no means of … Continue reading Higher Level Concepts In The Lambda Calculus
Computation With The World’s Smallest Programming Language
Update: The latest version of the lambda calculator has line editing and a command history. It's more convenient than the version linked in the blog and is tagged 0.1.0. Note to the reader: much of this post is based on an article I found on the web called Lambda Calculus (part I). That article covers … Continue reading Computation With The World’s Smallest Programming Language
The World’s Smallest Programming Language
Update: The latest version of the lambda calculator has line editing and a command history. It's more convenient than the version linked in the blog and is tagged 0.1.0. Introduction The world's smallest programming language is probably the Lambda Calculus. The Lambda Calculus was invented by Alonzo Church in the 1930's as a means of … Continue reading The World’s Smallest Programming Language
The Forth Protocol
In which I accidentally discover a performance enhancement I'm really not a fan of the massive switch statement at the heart of the execution loop, so I have decided to see if I can do something with virtual functions or closures on a WordList. The execute function would be reduced to running a particular function … Continue reading The Forth Protocol
RE-Evaluating Forth
In which I take another crack at the evaluation cherry Just a short post to note that I have finally cracked evaluate. After the refactoring exercise, I still had a number of issues mostly caused by the design decision to put the currently interpreting word in the word list at position 0 and to use … Continue reading RE-Evaluating Forth
Forth Refactored
In which my head exploded so I had to simplify things Because my Forth interpreter is effectively event driven i.e. the input parser parses and then calls the interpreter to interpret one word, it gets very complicated when an executing word needs to pull something off the input parser. It has to exit the interpreter … Continue reading Forth Refactored