Giter VIP home page Giter VIP logo

compsci220-scala's Introduction

COMPSCI220 Course Materials

This is the repository for COMPSCI 220 (Fall 2014 -- Spring 2018), which was taught in Scala. The course is no longer offered, so all materials are now available.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

Requirements

  • SBT
  • LaTeX (at least TeXLive 2015)
  • Jekyll

OLD DOCUMENTATION BELOW

**

This repository holds all course materials for CMPSCI220. The root directory holds a Vagrant environment that you should use for any course development, from updating the website to hacking on code.

The Vagrant environment has the same GUI (Lubuntu), JVM, and Scala that students use in the course, but excludes utilities such as text editors. The Vagrant environment mounts this repository at /home/vagrant/src. So, you can use a text editor on the host to edit files.

I strongly recommend using VMWare instead of VirtualBox to run the development environment. VirtualBox has terrible disk performance when working with host-mounted volumes (i.e., the /home/vagrant/src directory).

Setup

host$ vagrant up --provider virtualbox

This will take several minutes. If the Vagrantfile changes, you can either manually apply the update or run

host$ vagrant destroy

and start again.

Building

There are two ways to build the system:

  • sbt compileLib builds the library and scala220 executable so that they can be used locally. But, Docker-based testing does not work.

  • sbt compileDocker builds the library and testing system. This creates fat JARs and the Docker sandbox, which can take some time. This mode is almost identical to the setup that students have.

Releasing

Preliminaries

  1. Have a public/secret keypair in the gnupg directory that is recognized by the Launchpad CS220 PPA:

    https://launchpad.net/~arjun-guha/+archive/ubuntu/umass-cs220
    
  2. Login to the Docker registry (vm$ docker login) and have permission to update to this image:

    https://registry.hub.docker.com/u/arjunguha/cs220/
    

Release Procedure

  1. Add a new entry at the top of ppa/debian/changelog. You have to:

    a. Increment the version number,

    b. set a well-formatted date, and

    c. have two blank lines between each entry.

    See that file for several examples.

  2. Run sbt release. This command will first push the Docker image to Docker and then pushes the package to LaunchPad PPA. It takes forever for Launchpad to build. You receive errors over email.

If the Docker image is updated, you need to write a post-install script.

Creating a new course VM for students

The course VM is configured to install software from the Ubuntu PPA. If you need to build a new course VM, ensure that the PPA is up-to-date, as described above.

[FILL]

Updating the website

Run sbt compileWeb to build the website. This also rebuilds the API documentation. Run sbt publishWeb to update the website.

Releasing open-source software

We publish the support-code and submission directories as open source software. To do so, we use Subtree merging.

First time setup:

git remote add -f submission [email protected]:cmpsci220/submission.git
git remote add -f support-code [email protected]:cmpsci220/support-code.git

To push code to the open source repositories:

$ git subtree push --prefix=submission submission master
$ git subtree push --prefix=support-code support-code master

To pull code:

git fetch --all
$ git subtree pull --prefix=submission submission master
$ git subtree pull --prefix=support-code support-code master

Grading Scripts

Writing a new homework assignment

[FILL]

compsci220-scala's People

Contributors

aatxe avatar ameetrivedi avatar arjunguha avatar cassiecorey avatar dbarowy avatar developertommy avatar jcollard avatar jrbartola avatar poddarh avatar rachitnigam avatar solumin avatar stephenlee86 avatar timdrichards avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

f-0-x

compsci220-scala's Issues

After Spring 2018: issue with generators assignment

Here is a test case for filter that may lead to an infinite loop:

test("select one element of an infinite generator") {
  val gen = filter((x: Int) => x == 2, gradingFrom(0))
}

You do not have to pass this test case (and similar tests). i.e., you can assume that there is always another item that matches the predicate. This can be solved, but the assignment makes it hard to do so.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.