I am considering taking an online class through Coursera.org. The class is offered by Stanford University. They use the Cool programming language. Does anyone have experience installing Cool in Ubuntu?


The installation instructions are on the coursera wiki page (it's very well hidden and took me some time to find).

Note that you must install the files where it tells you to, the paths seem to be hardcoded.

@chaskes's answer doesn't work because it's missing the instructions for where to install the files from the tar, as well as some required packages.

  • 1
    Please avoid giving link-only answers in the future. The link you've provided is dead now and doesn't contain the installation instructions anymore – Peeyush Kushwaha Aug 6 '18 at 5:01

According to the "longer description" document linked from the Cool Wiki page and the Stanford Compilers course page at Coursera, you won't have any trouble running Cool on Ubuntu.

A student distribution of the project is available. These distributions include object code for the coolc reference compiler, assignments, and all documentation. (Source: Cool main page)

The student distribution appears to be available only as part of a class or on request, so you can wait until you take the class.

As for installing and running:

Cool is highly portable and easy to install on any Unix machine with standard GNU software tools gmake, bison, and flex....A separate Linux distribution is made available for students to use on their home PCs. (Source: Cool "longer description")

So, again, once you receive the student version you shouldn't have any trouble. You can make sure you have the standard tools installed with:

sudo apt-get install build-essential flex bison

The Stanford course at Coursera says: Students who choose to do the project can implement it in either C++ or Java.

If you choose to use Java, you can install the JDK with:

sudo apt-get install openjdk-7-jdk
  • Close voters: This is not OT. It's about doing development on Ubuntu. :) – chaskes Mar 12 '14 at 14:05
  • Thank you for the heads up and the command line, much appreciated. – Redserpent Mar 12 '14 at 17:06
  • @karel: Thank you for editing my question, is good to learn. The kindness and focus is also much appreciated. – Redserpent Mar 12 '14 at 17:07
  • Downloaded flex bison as you suggested. As soon as I get Cool to work I'll let you know. I have 2 exams plus homework to do. Thank you for the suggestions, enjoy your day. – Redserpent Mar 13 '14 at 13:03
  • Suggestion did not work. Thus took another class. Thank you for trying. – Redserpent Mar 27 '14 at 2:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.