SI 413 Fall 2021 / Project


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

nim

Nim is a scripting language designed to support a variety of convenient target languages for compilation.

Useful Links

  • Nim Website
  • Wikipedia page
  • 99 Bottles of Beer Program, courtesy LT Moeller:
    proc get_beer(): void = 
        echo "Go to the store and buy some more, 99 bottles of beer on the wall"
    
    proc drink_beer(n: int): void =
        if n == 0:
            echo "No more bottles of beer on the wall, no more bottles of beer.\n"
        elif n == 1:
            echo "1 bottle of beer on the wall, 1 bottle of beer."
            echo "Take one down and pass it around, no more bottles of beer on the wall.\n"
        else:
            echo n, " bottles of beer on the wall, ", n, " bottles of beer"
            echo "Take one down and pass it around, ", n-1, " bottles of beer on the wall.\n"
    
    for i in countdown(99, 0):
        drink_beer(i)
    get_beer()

Tools

The nim compiler we'll use for this project is version 0.17.2.

Everything you need is already installed on CS department lab machines.

To install on your virtual machine, follow these steps:

  1. Run sudo apt install -y nim

How I will run your code

The programs you submit should be in a single file called proj.nim, for either part of the project. I will test your code by running the following commands using the software available in the lab environment or using the instructions above:

nim c proj.nim
./proj

Phase 1 Requirements

For this language, you need to implement modifications B,C,D,F,G, H, and J. 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 LANGUAGE:

  1. Matrix Calculator
  2. Image Creator
  3. Game Scheduler
  4. Hangman
  5. TODO list
  6. Game with hidden agenda
  7. Guess the language
  8. Sports Ticker
  9. Rock, Paper, Scissors
  10. Music Maker
  11. ??? (you choose!)