Project 7: Chef Program
For the past several weeks, we've looked at procedurality as the principle expressive form of computation. But our focus has been on the output of Does code mean more than the programs it runs? Is there a value to code itself?
For this last individual project, you will write a program in the esoteric programming language Chef, designed by David Morgan-Mar. Chef is based on the manipulation of data values in stacks. Variables are named after foods, stacks are called mixing bowls, and instructions are common cooking manipulations. The program itself reads like a recipe (thus the name Chef).
Rules for your completed program:
(1) It must compile and run. It need not be the most meaningful program, but it must execute and do something coherent
(2) It must read like a coherent recipe. That is, the source code should be as readable as the executable code, and it should make sense as a recipe.
(3) If you want an 'A', your recipe must also be coherent enough to be prepared in the real world. This is harder than it sounds.
Extra credit (5 points) for anyone who brings in a version of their Chef code for us to eat in class.
How to program Chef: Chef homepage: http://www.dangermouse.net/esoteric/chef.html.
Pay special attention to the recipe instructions. Sample programs can be found at the bottom of the page. I have provided a sample program I wrote, which executes, is readable, and is also cookable.
The only working Chef compiler compiles chef code to perl. In order to run Chef, you will thus need a Perl interpreter. Windows: get the free download from http://www.activestate.com/ Products/ActivePerl/
Mac: perl comes installed on Mac Next get the chef interpreter from here. Note: do not use the version you find online; it's buggy and I've fixed some of the problems in this one. Also, please note that the new liquefy command does not work in this build; use the deprecated liquify instead.
Follow the instructions to install it. Note that you will have to install it on your own computer; the labs are not equipped with chef interpreters.
To run your compiled chef programs, you need to use the perl chef interpreter, e.g. "chef.pl mychefprogram.chef"