SI 413 Fall 2023 / Project


This is the archived website of SI 413 from the Fall 2023 semester. Feel free to browse around; you may also find more recent offerings at my teaching page.

Piet

Piet was invented by David Morgan-Mar some time in the last ten years. It is another two-dimensional programming language, like befunge. But unlike every other language I know about the program is a picture. Yes, this is a graphical programming language where you draw a picture and the properties of the pixels in that picture determine the behavior of the language. In fact, the header at the top of this page is a Piet program. Go ahead and download it and try it yourself!

Useful Links

Tools

  • The interpreter we will use is npiet, version 1.3f.
    Actually we will use Dr. Roche's fork of the interpreter available on github.
  • Everything you need is already installed on CS department lab machines in the /courses/roche/413/bin folder, which should be in your PATH.

    To install on your virtual machine, follow these steps:

    1. Run sudo apt install -y libpng-dev tk groff
    2. Download the interpreter from github by running
      git clone https://github.com/dsroche/npiet
    3. cd npiet to that directory and run:
      ./configure
      make # ignore the warnings you see
      sudo make install

    How I will run your code

    The programs you submit should be in a single file called proj.png, for either part of the project. I will test your code in the same environment as the lab machines in MI 423, using the command

    npiet proj.png

    Helpful tip: You can use any graphics editor such as GIMP to edit your images. Or, you can use the npietedit program that is included in the installation above! But you may have to go back and forth in order to do things like resize the image or move things around.

    Phase 1 Requirements

    For this language, you only need to implement modification A. See the Phase 1 page for details on what this means.

    Phase 2

    See the Phase 2 Page for the list of suggested problems. Of the ones listed, I recommend the following as being most well-suited for piet:

    1. Compiler (compile to piet from some very simple language - see me)
    2. Vending Machine
    3. Frequency count (count how many times each letter occurs, maybe)
    4. Rock, Paper, Scissors
    5. ??? (you choose!)